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

fix unsafe destructuring instance (#11351)

This commit is contained in:
Alex Donesky 2021-06-21 09:28:35 -05:00 committed by GitHub
parent 7cc747c792
commit 27389fc71e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 6 deletions

View File

@ -203,9 +203,7 @@ export function updateTxDataAndCalculate(txData) {
// if the gas price from our infura endpoint is null or undefined
// use the metaswap average price estimation as a fallback
let {
txParams: { gasPrice },
} = txData;
let { txParams: { gasPrice } = {} } = txData;
if (!gasPrice) {
gasPrice = getAveragePriceEstimateInHexWEI(state) || '0x0';
}

View File

@ -223,9 +223,7 @@ export const transactionFeeSelector = function (state, txData) {
// if the gas price from our infura endpoint is null or undefined
// use the metaswap average price estimation as a fallback
let {
txParams: { gasPrice },
} = txData;
let { txParams: { gasPrice } = {} } = txData;
if (!gasPrice) {
gasPrice = getAveragePriceEstimateInHexWEI(state) || '0x0';
}