aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ui/app/actions.js2
-rw-r--r--ui/app/components/send_/send.component.js13
2 files changed, 13 insertions, 2 deletions
diff --git a/ui/app/actions.js b/ui/app/actions.js
index 071f56209..fc2a838d4 100644
--- a/ui/app/actions.js
+++ b/ui/app/actions.js
@@ -790,7 +790,7 @@ function updateSendTokenBalance ({
.then(usersToken => {
if (usersToken) {
const newTokenBalance = calcTokenBalance({ selectedToken, usersToken })
- dispatch(setSendTokenBalance(newTokenBalance))
+ dispatch(setSendTokenBalance(newTokenBalance.toString(10)))
}
})
.catch(err => {
diff --git a/ui/app/components/send_/send.component.js b/ui/app/components/send_/send.component.js
index 4cfac1bde..49731ff6a 100644
--- a/ui/app/components/send_/send.component.js
+++ b/ui/app/components/send_/send.component.js
@@ -82,7 +82,7 @@ export default class SendTransactionScreen extends PersistentForm {
} = prevProps
const uninitialized = [prevBalance, prevGasTotal].every(n => n === null)
-
+ console.log(`@#@# uninitialized`, uninitialized);
if (!uninitialized) {
const amountErrorRequiresUpdate = doesAmountErrorRequireUpdate({
balance,
@@ -120,6 +120,17 @@ export default class SendTransactionScreen extends PersistentForm {
}
componentWillMount () {
+ const {
+ from: { address, balance },
+ selectedToken,
+ tokenContract,
+ updateSendTokenBalance,
+ } = this.props
+ updateSendTokenBalance({
+ selectedToken,
+ tokenContract,
+ address,
+ })
this.updateGas()
}