Skip to content

Commit

Permalink
chore: Patch GasFeeController to revert API URL (#10044)
Browse files Browse the repository at this point in the history
## **Description**

1. There is a caching issue with some of the GasFeeController API URLs.
The decision has been made to patch it for the time being.

Mobile Core issue:
https://github.com/orgs/MetaMask/projects/60/views/6?pane=issue&itemId=67345155
Slack conversation:
https://consensys.slack.com/archives/C01V1L10W2E/p1718117049087139
Similar PR for Extension:
MetaMask/metamask-extension#25230
Core PR: MetaMask/core#4403
Core branch: `patch/extension-gas-api-endpoint`
## **Related issues**

Fixes:
https://github.com/orgs/MetaMask/projects/60/views/6?pane=issue&itemId=67345155

## **Manual testing steps**

1. Go to app and make sure gas fees are being calculated correctly.

## **Screenshots/Recordings**

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

### **Before**


https://github.com/MetaMask/metamask-mobile/assets/6249205/bd45fcee-b64c-41c1-903e-1671c4a59392

### **After**


https://github.com/MetaMask/metamask-mobile/assets/6249205/0099be03-fb5a-465c-9734-37451b6f5019

## **Pre-merge author checklist**

- [X] I’ve followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile
Coding
Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [X] I've completed the PR template to the best of my ability
- [X] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-mobile/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.
  • Loading branch information
kylanhurt authored Jun 20, 2024
1 parent 4b659a8 commit 8912e91
Show file tree
Hide file tree
Showing 2 changed files with 377 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/core/Engine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,10 @@ class Engine {
);
},
clientId: AppConstants.SWAPS.CLIENT_ID,
infuraAPIKey: process.env.MM_INFURA_PROJECT_ID || NON_EMPTY,
legacyAPIEndpoint:
'https://gas.api.cx.metamask.io/networks/<chain_id>/gasPrices',
EIP1559APIEndpoint:
'https://gas.api.cx.metamask.io/networks/<chain_id>/suggestedGasFees',
});

const phishingController = new PhishingController({
Expand Down
Loading

0 comments on commit 8912e91

Please sign in to comment.