Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
130 commits
Select commit Hold shift + click to select a range
8120bf6
refactor: remove password strength metrics from wallet events (#34714)
huggingbot Aug 1, 2025
3f71af6
test(e2e): Deflake `onStart` lifecycle hook test (#34769)
Mrtenz Aug 1, 2025
7cdc193
chore: bump @metamask/profile-sync-controller to ^23.0.0 (#34746)
mathieuartu Aug 1, 2025
e881172
Merge origin/main into master-sync
gauthierpetetin Aug 1, 2025
871b0a0
chore: Remove `@sentry/browser` from main bundles (#34567)
Gudahtt Aug 1, 2025
866f809
release: Master sync v13.0.0 into main (#34788)
gauthierpetetin Aug 1, 2025
607b63b
build(webpack): fix webpack build paths on windows (#34778)
davidmurdoch Aug 1, 2025
4be7602
test: remove unnecessary balance-check race in test (#34793)
davidmurdoch Aug 1, 2025
4d2d6c7
chore: cp-13.1.0 Add missing bundle environment variables (#34789)
Gudahtt Aug 1, 2025
e699f2b
fix: bump @metamask/multichain-api-client to v0.6.5 (#34783)
baptiste-marchand Aug 1, 2025
ba0fb3d
chore: updated release workflows to eliminate confusion (#34717)
bsgrigorov Aug 1, 2025
9f48c9c
fix: Fix misleading console warning (#34816)
Gudahtt Aug 1, 2025
c9ccdea
chore: put comments back in `.yarnrc.yml` (#34641)
davidmurdoch Aug 2, 2025
7569360
fix: gracefully handle account type lookup error when wallet is locke…
vinistevam Aug 4, 2025
97acbbf
fix: Hide resimulate alert if transaction is wallet initiated (#34782)
OGPoyraz Aug 4, 2025
61df9c5
test: Fix console error in onboarding E2E tests (#34627)
Gudahtt Aug 4, 2025
f3c1238
chore: Skip a flaky test for now (#34829)
dan437 Aug 4, 2025
1fe60bb
feat: consume send bundle feature flag to determine `alternateGasFee`…
vinistevam Aug 4, 2025
9fbac57
chore: Remove obsolete policy overrides (#34818)
Gudahtt Aug 4, 2025
a2867d9
fix(action): pass version tag instead of a branch name to github-tool…
gauthierpetetin Aug 4, 2025
faf3144
chore: Bump main version to 13.2.0 (#34840)
metamaskbot Aug 4, 2025
52b79d7
fix: flaky test `Address Book Sends to an address book entry on a dif…
seaona Aug 4, 2025
6e8559e
fix: flaky test `Editing Confirm Transaction goes back from confirm p…
seaona Aug 5, 2025
dae3100
fix: flaky test `Multichain Aggregated Balances shows correct aggrega…
seaona Aug 5, 2025
d53dfb9
bump(deps): Bitcoin 0.18.0 (#34741)
darioAnongba Aug 5, 2025
ce6d44d
test: Migrate request queuing dapp1-send-dapp2-signTypedData test to …
Unik0rnMaggie Aug 5, 2025
bb90c36
fix(snaps): Catch `handleSnapRequest` error in `SnapInterfaceContext`…
GuillaumeRx Aug 5, 2025
240a571
fix: Fix metric transaction type for bridge and swap transactions (#3…
OGPoyraz Aug 5, 2025
b8ebd11
test: Optimize test server shutdown (#34707)
Gudahtt Aug 5, 2025
e5a157e
fix: problem in `yarn start:with-state` (#34851)
HowardBraham Aug 5, 2025
92cd919
chore: Improve accuracy of test error inline comments (#34404)
Gudahtt Aug 5, 2025
ab8a67b
fix: flaky test `Developer Options - Sentry gives option to cause a p…
seaona Aug 5, 2025
c4b262d
test: request-queue WatchAsset flakyness (#34835)
wenfix Aug 5, 2025
39cd7bb
test: Speed up test server shutdown by closing connections (#34747)
Gudahtt Aug 5, 2025
1c90198
test: add missing tests for `getWalletIdAndNameByAccountAddress` sele…
hmalik88 Aug 5, 2025
84a33a9
refactor: DRY our HTML by using ETA partials (#34842)
davidmurdoch Aug 5, 2025
310b064
feat: better manage automatic labeling of Sentry issues (#34768)
gauthierpetetin Aug 5, 2025
942336c
feat: add `getInternalAccountByGroupAndCaip` and `getInternalAccountB…
hmalik88 Aug 5, 2025
d23a85d
fix: moved pwd-change to background cp-13.1.0 (#34852)
lwin-kyaw Aug 6, 2025
5c7ffcc
ci: post validation bot to add a checklist in `feat` and `perf` PRs #…
jvbriones Aug 6, 2025
9bb7748
feat: hide remove imported account button for social login (#34895)
lwin-kyaw Aug 6, 2025
4c37f38
feat: added onboarding download app page (#34825)
lionellbriones Aug 6, 2025
6f33b6b
test: rename POM methods to use camel case (#34902)
seaona Aug 6, 2025
89d4df3
ci: add RCA-needed label on RCA workflow (#34904)
jvbriones Aug 6, 2025
369bae9
test: Support window switching without WebSocket background connectio…
Gudahtt Aug 6, 2025
d5b5787
fix: slippage update on unified cp-13.1.0 (#34821)
ghgoodreau Aug 6, 2025
ffcafea
test: Fixed the asset list test (#34710)
hjetpoluru Aug 6, 2025
6d09a54
chore: Revert "feat: set default theme to dark (#34274)" (#34912)
davidmurdoch Aug 6, 2025
9ddf5fc
fix: add `account_type` property to the Wallet Created event cp-13.1.…
huggingbot Aug 7, 2025
7715b6f
perf: Exclude test assets in production (#34690)
FrederikBolding Aug 7, 2025
6d9d47f
chore: Bump Snaps packages (#34907)
Mrtenz Aug 7, 2025
bfecbb9
test: cleanup some Multichain API e2e tests (#34817)
jiexi Aug 7, 2025
1abaa66
chore: update browserslist dependencies (#34915)
davidmurdoch Aug 7, 2025
12d1786
fix: add slippage to quote card cp-13.1.0 (#34916)
ghgoodreau Aug 7, 2025
8f23c49
feat: add CSS-based loading timeout message (#34530)
davidmurdoch Aug 7, 2025
4f308f6
fix(security): obfuscate blurred SRP to prevent blur-reversal attacks…
davidmurdoch Aug 7, 2025
b77558b
refactor: Add route constants infrastructure for React Router v5-comp…
DDDDDanica Aug 7, 2025
8daaeaa
fix: handle undefined destination account in bridge (#34943)
ghgoodreau Aug 8, 2025
6b63526
chore: update `SEI` network's name from `Sei Network` to `Sei Mainnet…
stanleyyconsensys Aug 8, 2025
ad08b4e
fix: cp-13.1.0 bump solana snap (#34887)
xavier-brochard Aug 8, 2025
7c1a52b
fix: flaky test `Forgot password resets password and then unlock wall…
seaona Aug 8, 2025
99d7e06
fix: Remove hover state when `SnapUISelector` is disabled (#34964)
FrederikBolding Aug 8, 2025
45851c1
feat: Add the multichain account list page (#34836)
david0xd Aug 8, 2025
9b63ccf
ci: add missing teams for the `identify-codeowners` job (#34944)
jvbriones Aug 8, 2025
b8f8984
test: add power user persona E2E test (#34925)
HowardBraham Aug 8, 2025
1defdd3
chore: bump multichain account dependencies (#34963)
ccharly Aug 8, 2025
b96e992
fix: fixed invalid refresh token after login attempt cp-13.0.1 (#34961)
lwin-kyaw Aug 8, 2025
fa94a13
chore: remove old BridgeQuoteCard component (#34949)
micaelae Aug 8, 2025
f2ca1e5
fix: cp-13.0.1 correct defi polling (#34883)
bergarces Aug 8, 2025
ed9a5f1
test: move power-user.spec.ts so it runs (#34979)
HowardBraham Aug 11, 2025
295aa44
ci(next semver version): rely on package.json when crafting next semv…
gauthierpetetin Aug 11, 2025
67efc8a
refactor: use named imports for actions in `ImportSrp` (#34976)
hmalik88 Aug 11, 2025
49ffff4
feat: SWAPS-2692 price impact quotecard (#34951)
ghgoodreau Aug 11, 2025
4d90601
test: Force exit after running E2E test (#34966)
FrederikBolding Aug 11, 2025
c8dca54
test: Migrate request queuing chainid-check test to Typescript and PO…
Unik0rnMaggie Aug 11, 2025
160cbfc
ci: adapt PR size job to have permissions to add labels (#34981)
jvbriones Aug 11, 2025
c4596ed
fix: storybook g.trim bug (#35002)
georgewrmarshall Aug 11, 2025
cc4c09d
feat: allow offline unlock for social login users (#34996)
lwin-kyaw Aug 12, 2025
c307b07
test: Rename E2E test to run it in CI (#35017)
FrederikBolding Aug 12, 2025
9ffdaa8
refactor: import getCaip25PermissionFromLegacyPermissions and request…
ffmcgee725 Aug 12, 2025
6d59268
Merge origin/main into master-sync
gauthierpetetin Aug 12, 2025
db4dc71
release: Master sync v13.0.1 into main (#35027)
gauthierpetetin Aug 12, 2025
0dd6551
chore: Disable transaction resubmit (same is done in mobile) (#35028)
dan437 Aug 12, 2025
6198462
refactor(5560): migrate create-account.component.js to react-router-v…
DDDDDanica Aug 12, 2025
703afa1
refactor: Migrate `<Routes />` into a TypeScript functional component…
MajorLift Aug 13, 2025
ad5394b
fix: skip metametrics if user has already chosen an option (#35036)
lwin-kyaw Aug 13, 2025
77577f5
feat: Add the selection process for multichain accounts (#34989)
david0xd Aug 13, 2025
870644b
chore: add frax network and token logos (#34986)
saraantole Aug 13, 2025
f63c70a
feat: update seedless-onboarding-controller to 2.6.0 (#35050)
lwin-kyaw Aug 13, 2025
eff6e07
chore: bump institutional snap cp-13.1.1 (#35053)
shane-t Aug 13, 2025
4abf7d1
fix: wrap long text in `OriginPill` component (#34824)
vinistevam Aug 13, 2025
bb3024c
chore: removes the Solana modal from the initial flow (#34988)
zone-live Aug 13, 2025
b58539e
fix: show effective gas in swaps QuoteCard cp-13.1.0 (#35038)
micaelae Aug 13, 2025
0a9a6c0
feat: get all internal accounts for a given scope (non user facing ch…
owencraston Aug 13, 2025
5e642ca
fix: sanitize sensitive items from UI state (#35003)
matthiasgeihs Aug 13, 2025
a55740a
fix: work around Firefox bug by avoiding vault backup when `indexedDB…
davidmurdoch Aug 13, 2025
136faa8
chore: update design system documentation (#35103)
georgewrmarshall Aug 14, 2025
43b1d3b
feat: add discover button for Solana network (#34498)
wantedsystem Aug 14, 2025
bceab54
chore: upgrading design system library packages (#35105)
georgewrmarshall Aug 14, 2025
6074a7b
feat: Add Linea for Smart Transactions, bump smart-transactions-contr…
dan437 Aug 14, 2025
771a3cc
fix: redact email from state logs (#35119)
himanshuchawla009 Aug 14, 2025
50ad723
ci: adapt the post-merge-validation job to track progress in a sheet …
jvbriones Aug 14, 2025
10781df
Merge remote-tracking branch 'origin/master' into sync-v13.2.0-with-m…
gauthierpetetin Aug 19, 2025
d98ede4
Update Attributions
metamaskbot Aug 19, 2025
ac0e733
fix(quote card test file): remove duplicate slippage
gauthierpetetin Aug 19, 2025
ce02ead
Update Attributions
metamaskbot Aug 19, 2025
06f7732
Merge pull request #35200 from MetaMask/sync-v13.2.0-with-master
gauthierpetetin Aug 19, 2025
d1b47bf
chore: chore/13.2.0-Changelog (#35199)
metamaskbot Aug 19, 2025
ca3fa3b
release(runway): cherry-pick feat: removed `socialLogin` email from s…
runway-github[bot] Aug 20, 2025
7031398
chore: Swap token balance and metrics fixes cp-13.2.0 (#35215)
micaelae Aug 20, 2025
0c71918
release(runway): cherry-pick feat: adds the nonevm deeplink (#35303)
runway-github[bot] Aug 21, 2025
684ec72
release(runway): cherry-pick fix: audit failures `cipher-base` and `s…
runway-github[bot] Aug 22, 2025
73bd368
release(runway): cherry-pick fix: Add missing build secret to Firefox…
runway-github[bot] Aug 22, 2025
3593e0f
release(runway): cherry-pick feat(INFRA-2845): restrict release pr me…
runway-github[bot] Aug 22, 2025
0a74087
release(runway): cherry-pick fix: fix ui not loading in old browsers …
runway-github[bot] Aug 25, 2025
fee42cd
Merge remote-tracking branch 'origin/master' into sync-v13.2.0-with-m…
gauthierpetetin Aug 25, 2025
30f6d29
fix(unit test): update snapshot from multichain bridge quote card
gauthierpetetin Aug 25, 2025
36bc5a8
Merge pull request #35358 from MetaMask/sync-v13.2.0-with-master
gauthierpetetin Aug 25, 2025
0fef5fa
release(runway): cherry-pick chore: cp-13.2.0 deeplink - auto selects…
runway-github[bot] Aug 26, 2025
872f280
Merge remote-tracking branch 'origin/master' into sync-v13.2.0-with-m…
gauthierpetetin Aug 27, 2025
48aa329
Merge pull request #35420 from MetaMask/sync-v13.2.0-with-master
gauthierpetetin Aug 27, 2025
065e735
release(runway): cherry-pick fix: network manager GNS removal update…
runway-github[bot] Aug 27, 2025
7f0c0bf
chore: chore/13.2.0-Changelog (#35301)
gauthierpetetin Aug 27, 2025
bf08566
release(runway): cherry-pick fix: cp-13.2.0 show active dapp network …
runway-github[bot] Aug 28, 2025
4860284
release(runway): cherry-pick fix: cp-13.2.0 Show error when backgroun…
runway-github[bot] Aug 28, 2025
3340f70
release(runway): cherry-pick fix: skip automatic gas updates for swap…
runway-github[bot] Aug 28, 2025
11e75ce
release(runway): cherry-pick fix: Launchdarkly flag added carousel-b…
runway-github[bot] Aug 29, 2025
c6379c6
release(runway): cherry-pick fix: cp-13.2.0 Make SnapsNameProvider re…
runway-github[bot] Aug 29, 2025
7087b6a
chore: chore/13.2.0-Changelog (#35522)
gauthierpetetin Aug 29, 2025
0df1de0
release(runway): cherry-pick fix: grant permission via connected sit…
runway-github[bot] Aug 29, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat: consume send bundle feature flag to determine alternateGasFee
… support (#34733)

<!--
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 updates the logic for detecting gas station support by consuming
the new feature flag introduced by the Transactions team. This flag
indicates whether gas station is supported on a given chain

<!--
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/34733?quickstart=1)

## **Changelog**

<!--
If this PR is not End-User-Facing and should not show up in the
CHANGELOG, you can choose to either:
1. Write `CHANGELOG entry: null`
2. Label with `no-changelog`

If this PR is End-User-Facing, please write a short User-Facing
description in the past tense like:
`CHANGELOG entry: Added a new tab for users to see their NFTs`
`CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker`

(This helps the Release Engineer do their job more quickly and
accurately)
-->

CHANGELOG entry: null

## **Related issues**

Fixes: MetaMask/MetaMask-planning#5377

## **Manual testing steps**

1. Go to test dapp
2. in the section `EIP 5792`  
3. Click on `GET CAPABILITIES`
4. Confirm with
`https://tx-sentinel-ethereum-mainnet.api.cx.metamask.io/networks`

1. Go to test dapp (requires tokens to use as gas)
2. in the section `EIP 5792`  
3. Click on `SEND CALLS`
4. Select a different token and send the tx

## **Screenshots/Recordings**

[Uploading supported.webm…]()

[Screencast from 2025-07-30
14-50-49.webm](https://github.com/user-attachments/assets/d4510855-a3f2-49c1-9796-35eea117024c)

<!-- 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.
  • Loading branch information
vinistevam authored Aug 4, 2025
commit 1fe60bb0fbb6dde1ea3934e1bb390a37ea16fadc
62 changes: 62 additions & 0 deletions app/scripts/lib/transaction/eip5792.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ import {
getCapabilities,
processSendCalls,
} from './eip5792';
import { getSendBundleSupportedChains } from './sentinel-api';

const CHAIN_ID_MOCK = '0x123';
const CHAIN_ID_2_MOCK = '0xabc';
Expand Down Expand Up @@ -120,6 +121,10 @@ describe('EIP-5792', () => {
const isRelaySupportedMock: jest.MockedFn<typeof isRelaySupportedOriginal> =
jest.fn();

const getSendBundleSupportedChainsMock: jest.MockedFn<
typeof getSendBundleSupportedChains
> = jest.fn();

const validateSecurityMock: jest.MockedFunction<
Parameters<typeof processSendCalls>[0]['validateSecurity']
> = jest.fn();
Expand Down Expand Up @@ -153,6 +158,7 @@ describe('EIP-5792', () => {
isAtomicBatchSupported: isAtomicBatchSupportedMock,
getIsSmartTransaction: getIsSmartTransactionMock,
isRelaySupported: isRelaySupportedMock,
getSendBundleSupportedChains: getSendBundleSupportedChainsMock,
};

beforeEach(() => {
Expand Down Expand Up @@ -664,6 +670,9 @@ describe('EIP-5792', () => {
} as unknown as PreferencesControllerState);

isRelaySupportedMock.mockResolvedValue(true);
getSendBundleSupportedChainsMock.mockResolvedValue({
[CHAIN_ID_MOCK]: true,
});
});

it('includes atomic capability if already upgraded', async () => {
Expand Down Expand Up @@ -915,5 +924,58 @@ describe('EIP-5792', () => {
},
});
});

it('returns alternateGasFees true if send bundle is supported', async () => {
isAtomicBatchSupportedMock.mockResolvedValueOnce([
{
chainId: CHAIN_ID_MOCK,
delegationAddress: DELEGATION_ADDRESS_MOCK,
isSupported: true,
},
]);
getSendBundleSupportedChainsMock.mockResolvedValue({
[CHAIN_ID_MOCK]: true,
});

const capabilities = await getCapabilities(
getCapabilitiesHooks,
messenger,
FROM_MOCK,
[CHAIN_ID_MOCK],
);

expect(capabilities).toStrictEqual({
[CHAIN_ID_MOCK]: {
atomic: {
status: AtomicCapabilityStatus.Supported,
},
alternateGasFees: {
supported: true,
},
},
});
});

it('does not add alternateGasFees property if send bundle is not supported', async () => {
isRelaySupportedMock.mockResolvedValue(false);
getSendBundleSupportedChainsMock.mockResolvedValue({
[CHAIN_ID_MOCK]: false,
});

const capabilities = await getCapabilities(
getCapabilitiesHooks,
messenger,
FROM_MOCK,
[CHAIN_ID_MOCK],
);

expect(capabilities).toStrictEqual({
[CHAIN_ID_MOCK]: {
atomic: {
status: AtomicCapabilityStatus.Ready,
},
},
});
});
});
});
15 changes: 14 additions & 1 deletion app/scripts/lib/transaction/eip5792.ts
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,9 @@ export async function getCapabilities(
getIsSmartTransaction: (chainId: Hex) => boolean;
isAtomicBatchSupported: TransactionController['isAtomicBatchSupported'];
isRelaySupported: (chainId: Hex) => Promise<boolean>;
getSendBundleSupportedChains: (
chainIds: Hex[],
) => Promise<Record<string, boolean>>;
},
messenger: EIP5792Messenger,
address: Hex,
Expand All @@ -192,6 +195,7 @@ export async function getCapabilities(
getIsSmartTransaction,
isAtomicBatchSupported,
isRelaySupported,
getSendBundleSupportedChains,
} = hooks;

let chainIdsNormalized = chainIds?.map(
Expand All @@ -215,6 +219,7 @@ export async function getCapabilities(
batchSupport,
getIsSmartTransaction,
isRelaySupported,
getSendBundleSupportedChains,
messenger,
);

Expand Down Expand Up @@ -503,6 +508,9 @@ async function getAlternateGasFeesCapability(
batchSupport: IsAtomicBatchSupportedResult,
getIsSmartTransaction: (chainId: Hex) => boolean,
isRelaySupported: (chainId: Hex) => Promise<boolean>,
getSendBundleSupportedChains: (
chainIds: Hex[],
) => Promise<Record<string, boolean>>,
messenger: EIP5792Messenger,
) {
const simulationEnabled = messenger.call(
Expand All @@ -515,6 +523,9 @@ async function getAlternateGasFeesCapability(
.map((chainId) => isRelaySupported(chainId)),
);

const sendBundleSupportedChains =
await getSendBundleSupportedChains(chainIds);

const updatedBatchSupport = batchSupport.map((support, index) => ({
...support,
relaySupportedForChain: relaySupportedChains[index],
Expand All @@ -530,10 +541,12 @@ async function getAlternateGasFeesCapability(
const { isSupported = false, relaySupportedForChain } = chainBatchSupport;

const isSmartTransaction = getIsSmartTransaction(chainId);
const isSendBundleSupported = sendBundleSupportedChains[chainId] ?? false;

const alternateGasFees =
simulationEnabled &&
(isSmartTransaction || (isSupported && relaySupportedForChain));
((isSmartTransaction && isSendBundleSupported) ||
(isSupported && relaySupportedForChain));

if (alternateGasFees) {
acc[chainId as Hex] = {
Expand Down
Loading
Loading