aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorKevin Serrano <kevgagser@gmail.com>2016-08-17 01:48:31 +0800
committerKevin Serrano <kevgagser@gmail.com>2016-08-17 01:48:31 +0800
commit7d1b2db87e9d66735d0de04dc5e8c53e72e8431b (patch)
tree1152360fd3b9e17d379ecbc0595299c40eb3068a /ui
parent009784c79b5c0ebfd9dbe9536870c55e906e914d (diff)
downloadtangerine-wallet-browser-7d1b2db87e9d66735d0de04dc5e8c53e72e8431b.tar
tangerine-wallet-browser-7d1b2db87e9d66735d0de04dc5e8c53e72e8431b.tar.gz
tangerine-wallet-browser-7d1b2db87e9d66735d0de04dc5e8c53e72e8431b.tar.bz2
tangerine-wallet-browser-7d1b2db87e9d66735d0de04dc5e8c53e72e8431b.tar.lz
tangerine-wallet-browser-7d1b2db87e9d66735d0de04dc5e8c53e72e8431b.tar.xz
tangerine-wallet-browser-7d1b2db87e9d66735d0de04dc5e8c53e72e8431b.tar.zst
tangerine-wallet-browser-7d1b2db87e9d66735d0de04dc5e8c53e72e8431b.zip
linting and ignoring.
Diffstat (limited to 'ui')
-rw-r--r--ui/app/account-detail.js1
-rw-r--r--ui/app/actions.js5
-rw-r--r--ui/app/components/account-eth-balance.js2
-rw-r--r--ui/app/components/eth-balance.js1
-rw-r--r--ui/app/config.js12
-rw-r--r--ui/app/util.js2
6 files changed, 8 insertions, 15 deletions
diff --git a/ui/app/account-detail.js b/ui/app/account-detail.js
index 7236a2471..190045c02 100644
--- a/ui/app/account-detail.js
+++ b/ui/app/account-detail.js
@@ -10,7 +10,6 @@ const valuesFor = require('./util').valuesFor
const Identicon = require('./components/identicon')
const AccountEtherBalance = require('./components/account-eth-balance')
-const EtherBalance = require('./components/eth-balance')
const TransactionList = require('./components/transaction-list')
const ExportAccountView = require('./components/account-export')
const ethUtil = require('ethereumjs-util')
diff --git a/ui/app/actions.js b/ui/app/actions.js
index 464395a82..dadf124d8 100644
--- a/ui/app/actions.js
+++ b/ui/app/actions.js
@@ -236,16 +236,11 @@ function revealAccount () {
}
}
-
-
function setCurrentFiat (fiat) {
return (dispatch) => {
dispatch(this.showLoadingIndication())
_accountManager.setCurrentFiat(fiat, (data, err) => {
dispatch(this.hideLoadingIndication())
- console.log("NEW THINGS")
- console.log("==========")
- console.log(data.currentFiat, data.conversionRate, data.conversionDate)
dispatch({
type: this.SET_CURRENT_FIAT,
value: {
diff --git a/ui/app/components/account-eth-balance.js b/ui/app/components/account-eth-balance.js
index b748ea2ea..4cdab235a 100644
--- a/ui/app/components/account-eth-balance.js
+++ b/ui/app/components/account-eth-balance.js
@@ -65,7 +65,7 @@ EthBalanceComponent.prototype.renderBalance = function (value, state) {
h('.flex-column', [
h(Tooltip, {
position: 'bottom',
- title: `${balance} ${label}`,
+ title: `${ethNumber} ${ethSuffix}`,
}, [
h('.flex-row', {
style: {
diff --git a/ui/app/components/eth-balance.js b/ui/app/components/eth-balance.js
index a5584a235..6c324c947 100644
--- a/ui/app/components/eth-balance.js
+++ b/ui/app/components/eth-balance.js
@@ -1,7 +1,6 @@
const Component = require('react').Component
const h = require('react-hyperscript')
const inherits = require('util').inherits
-const connect = require('react-redux').connect
const formatBalance = require('../util').formatBalance
const generateBalanceObject = require('../util').generateBalanceObject
const Tooltip = require('./tooltip.js')
diff --git a/ui/app/config.js b/ui/app/config.js
index 664bcd2a7..c86d377bb 100644
--- a/ui/app/config.js
+++ b/ui/app/config.js
@@ -4,7 +4,7 @@ const h = require('react-hyperscript')
const connect = require('react-redux').connect
const actions = require('./actions')
const currencies = require('./conversion-util').availableCurrencies.rows
-const Select = require('react-select')
+// const Select = require('react-select')
module.exports = connect(mapStateToProps)(ConfigScreen)
@@ -103,27 +103,27 @@ ConfigScreen.prototype.render = function () {
function currentConversionInformation (metamaskState, state) {
var currentFiat = metamaskState.currentFiat
- return h('div'), [
+ return h('div', [
h('span', {style: { fontWeight: 'bold', paddingRight: '10px'}}, 'Current Conversion'),
h('select#currentFiat', {
onChange (event) {
event.preventDefault()
- var element = document.getElementById("currentFiat")
+ var element = document.getElementById('currentFiat')
var newFiat = element.value
state.dispatch(actions.setCurrentFiat(newFiat))
},
value: currentFiat,
defaultValue: currentFiat,
}, currencies.map((currency) => {
- return h('option', {key: currency.code, value: currency.code}, `${currency.code} - ${currency.name}`)
- })
+ return h('option', {key: currency.code, value: currency.code}, `${currency.code} - ${currency.name}`)
+ })
// [
// h('option', {key: 'USD', value: 'USD'}, 'USD'),
// h('option', {key: 'EUR', value: 'EUR'}, 'EUR'),
// h('option', {key: 'JPY', value: 'JPY'}, 'JPY'),
// ]
),
- ]
+ ])
}
function currentProviderDisplay (metamaskState) {
diff --git a/ui/app/util.js b/ui/app/util.js
index eac895ddd..e1fd6e399 100644
--- a/ui/app/util.js
+++ b/ui/app/util.js
@@ -145,7 +145,7 @@ function shortenBalance (balance, decimalsToKeep = 1) {
} else if (convertedBalance > 1000) {
truncatedValue = (balance / 1000).toFixed(decimalsToKeep)
return `>${truncatedValue}k`
- } else if (convertedBalance == 0) {
+ } else if (convertedBalance === 0) {
return '0'
} else if (convertedBalance < 1) {
var exponent = balance.match(/\.0*/)[0].length