aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app
diff options
context:
space:
mode:
authorKevin Serrano <kevgagser@gmail.com>2017-09-27 06:47:31 +0800
committerGitHub <noreply@github.com>2017-09-27 06:47:31 +0800
commite998d528f0af71d1163bc89fe9e81195bb4f5dc3 (patch)
tree5bb9bbcdb3db6f8c1e7a34492aad18efe28462ed /ui/app
parent57b5f15265be2ae39ddf538915f8bd57538760b6 (diff)
parent6ca519e97c4c282023ab6b7788715ff8d7ec8189 (diff)
downloadtangerine-wallet-browser-e998d528f0af71d1163bc89fe9e81195bb4f5dc3.tar
tangerine-wallet-browser-e998d528f0af71d1163bc89fe9e81195bb4f5dc3.tar.gz
tangerine-wallet-browser-e998d528f0af71d1163bc89fe9e81195bb4f5dc3.tar.bz2
tangerine-wallet-browser-e998d528f0af71d1163bc89fe9e81195bb4f5dc3.tar.lz
tangerine-wallet-browser-e998d528f0af71d1163bc89fe9e81195bb4f5dc3.tar.xz
tangerine-wallet-browser-e998d528f0af71d1163bc89fe9e81195bb4f5dc3.tar.zst
tangerine-wallet-browser-e998d528f0af71d1163bc89fe9e81195bb4f5dc3.zip
Merge branch 'master' into RemoveSlackLink
Diffstat (limited to 'ui/app')
-rw-r--r--ui/app/account-detail.js5
-rw-r--r--ui/app/components/pending-tx.js6
-rw-r--r--ui/app/conf-tx.js5
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),