diff options
author | kumavis <kumavis@users.noreply.github.com> | 2017-09-28 07:04:51 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-28 07:04:51 +0800 |
commit | 15b2823e546cfefd7e867f078b4385ddc6be3a0f (patch) | |
tree | 448a321264f3d648d6edee7e90c6f487bc31084b /ui/app | |
parent | 734490c58c25587a247e48eea086880bcb6a14fe (diff) | |
parent | ecf909e140b2fc99afbd15f6f0882dd17e3ecb88 (diff) | |
download | tangerine-wallet-browser-15b2823e546cfefd7e867f078b4385ddc6be3a0f.tar tangerine-wallet-browser-15b2823e546cfefd7e867f078b4385ddc6be3a0f.tar.gz tangerine-wallet-browser-15b2823e546cfefd7e867f078b4385ddc6be3a0f.tar.bz2 tangerine-wallet-browser-15b2823e546cfefd7e867f078b4385ddc6be3a0f.tar.lz tangerine-wallet-browser-15b2823e546cfefd7e867f078b4385ddc6be3a0f.tar.xz tangerine-wallet-browser-15b2823e546cfefd7e867f078b4385ddc6be3a0f.tar.zst tangerine-wallet-browser-15b2823e546cfefd7e867f078b4385ddc6be3a0f.zip |
Merge branch 'master' into new-currency-test
Diffstat (limited to 'ui/app')
-rw-r--r-- | ui/app/account-detail.js | 5 | ||||
-rw-r--r-- | ui/app/components/pending-tx.js | 6 | ||||
-rw-r--r-- | ui/app/conf-tx.js | 5 |
3 files changed, 9 insertions, 7 deletions
diff --git a/ui/app/account-detail.js b/ui/app/account-detail.js index 02089ecd0..90724dc3f 100644 --- a/ui/app/account-detail.js +++ b/ui/app/account-detail.js @@ -32,6 +32,7 @@ function mapStateToProps (state) { currentCurrency: state.metamask.currentCurrency, currentAccountTab: state.metamask.currentAccountTab, tokens: state.metamask.tokens, + computedBalances: state.metamask.computedBalances, } } @@ -45,7 +46,7 @@ AccountDetailScreen.prototype.render = function () { var selected = props.address || Object.keys(props.accounts)[0] var checksumAddress = selected && ethUtil.toChecksumAddress(selected) var identity = props.identities[selected] - var account = props.accounts[selected] + var account = props.computedBalances[selected] const { network, conversionRate, currentCurrency } = props return ( @@ -180,7 +181,7 @@ AccountDetailScreen.prototype.render = function () { }, [ h(EthBalance, { - value: account && account.balance, + value: account && account.ethBalance, conversionRate, currentCurrency, style: { diff --git a/ui/app/components/pending-tx.js b/ui/app/components/pending-tx.js index c3350fcc1..6f8c19a3c 100644 --- a/ui/app/components/pending-tx.js +++ b/ui/app/components/pending-tx.js @@ -33,7 +33,7 @@ function PendingTx () { PendingTx.prototype.render = function () { const props = this.props - const { currentCurrency, blockGasLimit } = props + const { currentCurrency, blockGasLimit, computedBalances } = props const conversionRate = props.conversionRate const txMeta = this.gatherTxMeta() @@ -42,8 +42,8 @@ PendingTx.prototype.render = function () { // Account Details const address = txParams.from || props.selectedAddress const identity = props.identities[address] || { address: address } - const account = props.accounts[address] - const balance = account ? account.balance : '0x0' + const account = computedBalances[address] + const balance = account ? account.ethBalance : '0x0' // recipient check const isValidAddress = !txParams.to || util.isValidAddress(txParams.to) diff --git a/ui/app/conf-tx.js b/ui/app/conf-tx.js index 1ee4166f7..15fb9a59f 100644 --- a/ui/app/conf-tx.js +++ b/ui/app/conf-tx.js @@ -29,6 +29,7 @@ function mapStateToProps (state) { conversionRate: state.metamask.conversionRate, currentCurrency: state.metamask.currentCurrency, blockGasLimit: state.metamask.currentBlockGasLimit, + computedBalances: state.metamask.computedBalances, } } @@ -39,7 +40,7 @@ function ConfirmTxScreen () { ConfirmTxScreen.prototype.render = function () { const props = this.props - const { network, provider, unapprovedTxs, currentCurrency, + const { network, provider, unapprovedTxs, currentCurrency, computedBalances, unapprovedMsgs, unapprovedPersonalMsgs, conversionRate, blockGasLimit } = props var unconfTxList = txHelper(unapprovedTxs, unapprovedMsgs, unapprovedPersonalMsgs, network) @@ -48,7 +49,6 @@ ConfirmTxScreen.prototype.render = function () { var txParams = txData.params || {} var isNotification = isPopupOrNotification() === 'notification' - log.info(`rendering a combined ${unconfTxList.length} unconf msg & txs`) if (unconfTxList.length === 0) return h(Loading, { isLoading: true }) @@ -104,6 +104,7 @@ ConfirmTxScreen.prototype.render = function () { currentCurrency, blockGasLimit, unconfTxListLength, + computedBalances, // Actions buyEth: this.buyEth.bind(this, txParams.from || props.selectedAddress), sendTransaction: this.sendTransaction.bind(this), |