aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/pending-tx/confirm-send-token.js
diff options
context:
space:
mode:
authorDan <danjm.com@gmail.com>2018-03-30 02:00:03 +0800
committerDan <danjm.com@gmail.com>2018-03-30 02:00:03 +0800
commita4594f6838a9ff38a9a6f1998850b27beebb2fbb (patch)
tree24086a2ea89ef199ab4c90a186706a7f2b7678bf /ui/app/components/pending-tx/confirm-send-token.js
parentd6ebf5d94e374adbd2c2a66e8e5fb7f35fe5b6b2 (diff)
downloadtangerine-wallet-browser-a4594f6838a9ff38a9a6f1998850b27beebb2fbb.tar.gz
tangerine-wallet-browser-a4594f6838a9ff38a9a6f1998850b27beebb2fbb.tar.zst
tangerine-wallet-browser-a4594f6838a9ff38a9a6f1998850b27beebb2fbb.zip
Show insufficient funds on confirm screen on first render.
Diffstat (limited to 'ui/app/components/pending-tx/confirm-send-token.js')
-rw-r--r--ui/app/components/pending-tx/confirm-send-token.js10
1 files changed, 9 insertions, 1 deletions
diff --git a/ui/app/components/pending-tx/confirm-send-token.js b/ui/app/components/pending-tx/confirm-send-token.js
index dd115e890..ed0be601e 100644
--- a/ui/app/components/pending-tx/confirm-send-token.js
+++ b/ui/app/components/pending-tx/confirm-send-token.js
@@ -142,12 +142,20 @@ function ConfirmSendToken () {
}
ConfirmSendToken.prototype.componentWillMount = function () {
- const { tokenContract, selectedAddress } = this.props
+ const { tokenContract, selectedAddress, updateSendErrors} = this.props
+ const txMeta = this.gatherTxMeta()
+ const balanceIsSufficient = this.isBalanceSufficient(txMeta)
tokenContract && tokenContract
.balanceOf(selectedAddress)
.then(usersToken => {
})
this.props.updateTokenExchangeRate()
+
+ updateSendErrors({
+ insufficientFunds: balanceIsSufficient
+ ? false
+ : this.props.t('insufficientFunds')
+ })
}
ConfirmSendToken.prototype.getAmount = function () {