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

Fix issue where ConfTx view lets you approve txs when the account has insufficient balance

This commit is contained in:
Frankie 2017-01-24 13:19:26 -08:00
parent 247f7aad5e
commit b2623510ae

View File

@ -136,7 +136,7 @@ ConfirmTxScreen.prototype.checkBalanceAgainstTx = function (txData) {
var balance = account ? account.balance : '0x0'
var maxCost = new BN(txData.maxCost)
var balanceBn = new BN(ethUtil.stripHexPrefix(balance), 16)
var balanceBn = new BN(ethUtil.stripHexPrefix(balance), 10)
return maxCost.gt(balanceBn)
}