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

Create new flag for simple sends to avoid overloading other flag

This commit is contained in:
Dan Finlay 2018-01-16 11:05:11 -08:00
parent 6cfaf03b3d
commit 8fb62b97c5

View File

@ -53,7 +53,7 @@ module.exports = class txProvideUtil {
const code = await this.query.getCode(recipient)
if (hasRecipient && (!code || code === '0x')) {
txParams.gas = SIMPLE_GAS_COST
txMeta.gasLimitSpecified = true // Prevents buffer addition
txMeta.simpleSend = true // Prevents buffer addition
return SIMPLE_GAS_COST
}
@ -72,7 +72,7 @@ module.exports = class txProvideUtil {
// if gasLimit was specified and doesnt OOG,
// use original specified amount
if (txMeta.gasLimitSpecified) {
if (txMeta.gasLimitSpecified || txMeta.simpleSend) {
txMeta.estimatedGas = txParams.gas
return
}