Skip to content

Commit

Permalink
Property lookup safety improvement in selectors/confirm-transaction
Browse files Browse the repository at this point in the history
  • Loading branch information
danjm committed Jul 29, 2021
1 parent fd1ffe2 commit 91f6d2b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ui/selectors/confirm-transaction.js
Original file line number Diff line number Diff line change
Expand Up @@ -253,10 +253,12 @@ export const transactionFeeSelector = function (state, txData) {
} else {
gasEstimationObject.maxFeePerGas =
txData.txParams?.maxFeePerGas ??
decGWEIToHexWEI(gasFeeEstimates.medium.suggestedMaxFeePerGas);
decGWEIToHexWEI(gasFeeEstimates?.medium.suggestedMaxFeePerGas);
gasEstimationObject.maxPriorityFeePerGas =
txData.txParams?.maxPriorityFeePerGas ??
decGWEIToHexWEI(gasFeeEstimates.medium.suggestedMaxPriorityFeePerGas);
decGWEIToHexWEI(
gasFeeEstimates?.medium.suggestedMaxPriorityFeePerGas,
);
gasEstimationObject.baseFeePerGas = decGWEIToHexWEI(
gasFeeEstimates.estimatedBaseFee,
);
Expand Down

0 comments on commit 91f6d2b

Please sign in to comment.