From b2cb38ab2d7fee0924bd3b8b2aea4f9e23835388 Mon Sep 17 00:00:00 2001 From: Dan J Miller Date: Fri, 30 Jul 2021 18:10:19 -0230 Subject: [PATCH] Ensure createPendingTxMiddleware returns gasPrice for EIP-1559 transactions (#11685) --- app/scripts/controllers/network/util.js | 1 + app/scripts/controllers/network/util.test.js | 1 + 2 files changed, 2 insertions(+) diff --git a/app/scripts/controllers/network/util.js b/app/scripts/controllers/network/util.js index 6e61a9e01..21787fa41 100644 --- a/app/scripts/controllers/network/util.js +++ b/app/scripts/controllers/network/util.js @@ -36,6 +36,7 @@ export function formatTxMetaForRpcResult(txMeta) { }; if (maxFeePerGas && maxPriorityFeePerGas) { + formattedTxMeta.gasPrice = maxFeePerGas; formattedTxMeta.maxFeePerGas = maxFeePerGas; formattedTxMeta.maxPriorityFeePerGas = maxPriorityFeePerGas; formattedTxMeta.type = TRANSACTION_ENVELOPE_TYPES.FEE_MARKET; diff --git a/app/scripts/controllers/network/util.test.js b/app/scripts/controllers/network/util.test.js index fdf761886..251812741 100644 --- a/app/scripts/controllers/network/util.test.js +++ b/app/scripts/controllers/network/util.test.js @@ -33,6 +33,7 @@ describe('network utils', function () { blockNumber: null, from: '0xc684832530fcbddae4b4230a47e991ddcec2831d', gas: '0x7b0d', + gasPrice: '0x77359400', hash: '0x4bcb6cd6b182209585f8ad140260ddb35c81a575dd40f508d9767e652a9f60e7', input: '0x',