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:
parent
a195427e72
commit
66ed4dfaa3
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user