Skip to content

Commit 0ef0d54

Browse files
authored
fix: increase gas limit validation threshold (#29264)
<!-- Please submit this PR as a draft initially. Do not mark it as "Ready for review" until the template has been completely filled out, and PR status checks have passed at least once. --> ## **Description** This PR aims to increase the gas limit validation threshold to 30M. <!-- Write a short description of the changes included in this pull request, also include relevant motivation and context. Have in mind the following questions: 1. What is the reason for the change? 2. What is the improvement/solution? --> [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/29264?quickstart=1) ## **Related issues** Fixes: #21927 ## **Manual testing steps** 1. send a transaction 2. edit gaslimit on advance tab ## **Screenshots/Recordings** [Screencast from 17-12-2024 08:51:19.webm](https://github.com/user-attachments/assets/a8ff1e67-681f-4d6f-9dd8-b0ff79d86baa) <!-- 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** - [x] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Extension Coding Standards](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [x] I've completed the PR template to the best of my ability - [x] I’ve included tests if applicable - [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-extension/blob/main/.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.
1 parent b9c5763 commit 0ef0d54

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

ui/pages/confirmations/components/advanced-gas-fee-popover/advanced-gas-fee-gas-limit/advanced-gas-fee-gas-limit.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ describe('AdvancedGasFeeGasLimit', () => {
101101
),
102102
).toBeInTheDocument();
103103
fireEvent.change(document.getElementsByTagName('input')[0], {
104-
target: { value: 8000000 },
104+
target: { value: 80000000 },
105105
});
106106
expect(
107107
screen.queryByText(
@@ -154,7 +154,7 @@ describe('AdvancedGasFeeGasLimit', () => {
154154
);
155155
expect(
156156
screen.queryByText(
157-
`Gas limit must be greater than 29999 and less than 7920050`,
157+
`Gas limit must be greater than 29999 and less than 30000000`,
158158
),
159159
).toBeInTheDocument();
160160
});

ui/pages/confirmations/send/send.constants.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { EtherDenomination } from '../../../../shared/constants/common';
55
const MIN_GAS_PRICE_DEC = '0';
66
const MIN_GAS_PRICE_HEX = parseInt(MIN_GAS_PRICE_DEC, 10).toString(16);
77
const MIN_GAS_LIMIT_DEC = new Numeric('21000', 10);
8-
const MAX_GAS_LIMIT_DEC = '7920027';
8+
const MAX_GAS_LIMIT_DEC = '30000000';
99

1010
const HIGH_FEE_WARNING_MULTIPLIER = 1.5;
1111
const MIN_GAS_PRICE_GWEI = new Numeric(

0 commit comments

Comments
 (0)