Skip to content

Commit

Permalink
fix: getMinimumGasTotalInHexWei error when gasEstimateType === "fee_m…
Browse files Browse the repository at this point in the history
…arket" (#24287)

## **Description**

See Issue #24263
for investigation details

This will be a hotfix targeting v11.14.3

## **Related issues**

Fixes: #24263

## **Manual testing steps**

One way to repro is by adding the Scroll Sepholia Testnet (see:
https://docs.scroll.io/en/user-guide/setup/), then using our test dapp >
Send Eth > Send

For other repro methods, please refer to the related issue ticket

## **Screenshots/Recordings**

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

### **Before**

<!-- [screenshots/recordings] -->

### **After**

<!-- [screenshots/recordings] -->

## **Pre-merge author checklist**

- [ ] I’ve followed [MetaMask Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md).
- [ ] I've completed the PR template to the best of my ability
- [ ] I’ve included tests if applicable
- [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [ ] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

## **Pre-merge reviewer checklist**

- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.

Co-authored-by: Matthew Walsh <matthew.walsh@consensys.net>
  • Loading branch information
digiwand and matthewwalsh0 committed Apr 29, 2024
1 parent 50ef1c2 commit de092fb
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions ui/selectors/confirm-transaction.js
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,7 @@ export const transactionFeeSelector = function (state, txData) {
}
} else {
switch (gasEstimateType) {
case GasEstimateTypes.feeMarket:
case GasEstimateTypes.none:
gasEstimationObject.gasPrice = txData.txParams?.gasPrice ?? '0x0';
break;
Expand All @@ -265,8 +266,6 @@ export const transactionFeeSelector = function (state, txData) {
gasEstimationObject.gasPrice =
txData.txParams?.gasPrice ?? getAveragePriceEstimateInHexWEI(state);
break;
case GasEstimateTypes.feeMarket:
break;
default:
break;
}
Expand Down

0 comments on commit de092fb

Please sign in to comment.