mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Correct data length calculation
This commit is contained in:
parent
5faa64817c
commit
c2655bef5a
@ -34,7 +34,7 @@ PTXP.render = function () {
|
|||||||
var gasCost = ethUtil.stripHexPrefix(txParams.gas || baseFeeHex)
|
var gasCost = ethUtil.stripHexPrefix(txParams.gas || baseFeeHex)
|
||||||
var txValue = ethUtil.stripHexPrefix(txParams.value || '0x0')
|
var txValue = ethUtil.stripHexPrefix(txParams.value || '0x0')
|
||||||
var maxCost = ((new BN(txValue, 16)).add(new BN(gasCost, 16))).toString(16)
|
var maxCost = ((new BN(txValue, 16)).add(new BN(gasCost, 16))).toString(16)
|
||||||
var dataLength = txParams.data ? txParams.data.length - 2 : 0
|
var dataLength = txParams.data ? (txParams.data.length - 2) / 2 : 0
|
||||||
|
|
||||||
console.dir(identity)
|
console.dir(identity)
|
||||||
console.dir({props})
|
console.dir({props})
|
||||||
|
Loading…
Reference in New Issue
Block a user