aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/send-token
diff options
context:
space:
mode:
authorChi Kei Chan <chikeichan@gmail.com>2017-09-14 16:09:57 +0800
committerChi Kei Chan <chikeichan@gmail.com>2017-09-14 16:09:57 +0800
commit93a1089e085cb70ddbd58721a140ab8d3b6b79eb (patch)
tree0d9f3144de3a5f930a25f195f1568a3499ec019d /ui/app/components/send-token
parentd722c1045f70954cb1a97de52cae5084a6f14815 (diff)
downloadtangerine-wallet-browser-93a1089e085cb70ddbd58721a140ab8d3b6b79eb.tar.gz
tangerine-wallet-browser-93a1089e085cb70ddbd58721a140ab8d3b6b79eb.tar.zst
tangerine-wallet-browser-93a1089e085cb70ddbd58721a140ab8d3b6b79eb.zip
Show token tx properly
Diffstat (limited to 'ui/app/components/send-token')
-rw-r--r--ui/app/components/send-token/index.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/ui/app/components/send-token/index.js b/ui/app/components/send-token/index.js
index a3332ca9e..72fb593be 100644
--- a/ui/app/components/send-token/index.js
+++ b/ui/app/components/send-token/index.js
@@ -141,6 +141,7 @@ SendTokenScreen.prototype.submit = function () {
hideWarning,
addToAddressBook,
signTokenTx,
+ selectedToken,
} = this.props
const { nickname = ' ' } = identities[to] || {}
@@ -161,7 +162,11 @@ SendTokenScreen.prototype.submit = function () {
gasPrice: gasPrice,
}
- signTokenTx(selectedTokenAddress, to, Number(amount).toString(16), txParams)
+ const { decimals } = selectedToken || {}
+ const multiplier = Math.pow(10, Number(decimals || 0))
+ const sendAmount = Number(amount * multiplier).toString(16)
+
+ signTokenTx(selectedTokenAddress, to, sendAmount, txParams)
}
SendTokenScreen.prototype.renderToAddressInput = function () {