1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

Ensure sent token value is recognized as hex.

This commit is contained in:
Dan 2017-09-28 12:18:25 -02:30 committed by Chi Kei Chan
parent a195427e72
commit 66ed4dfaa3

View File

@ -165,7 +165,7 @@ SendTokenScreen.prototype.clearErrorsFor = function (field) {
SendTokenScreen.prototype.getAmountToSend = function (amount, selectedToken) {
const { decimals } = selectedToken || {}
const multiplier = Math.pow(10, Number(decimals || 0))
const sendAmount = Number(amount * multiplier).toString(16)
const sendAmount = '0x' + Number(amount * multiplier).toString(16)
return sendAmount
}