Skip to content

Commit fcddd41

Browse files
chloeYuemetamaskbotjoaoloureiroprunway-github[bot]Montoya
authored
chore: stable-sync 7.75.1 into release/7.76.0 (#29822)
## **Description** Syncs `stable` (now containing the 7.75.1 release) into `release/7.76.0` so that PR #29584 (release/7.76.0 → stable) is conflict-free when ready to merge. ## **Changelog** CHANGELOG entry: null ## **Resolution notes** ## **Manual testing steps** ## **Pre-merge checklist** - [x] Merge commit (not squash) — preserves stable's parent linkage on release/7.76.0 (required for #29584 to become conflict-free) <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Medium Risk** > Medium risk because it changes token security filtering behavior (Blockaid scan now fail-open) and adjusts user routing/metrics logic in the mUSD conversion education flow; both can impact security UX and navigation outcomes. > > **Overview** > Syncs `stable` (7.75.1) into `release/7.76.0`, including changelog entries for `7.75.0`/`7.75.1`. > > Updates the patched `@metamask/assets-controllers` `MultichainAssetsController` Blockaid token filter to be **fail-open** on scan/API failures and simplifies filtering to only drop assets explicitly marked for rejection. > > Bridge UI adds a `SHOW_TOKEN_WARNINGS = false` config toggle and a `getSecurityWarnings()` helper to extract warning strings from `token.securityData`. > > mUSD conversion education flow tweaks analytics redirect attribution (removes special-casing `navigate_money_hub` for the primary CTA) and cleans up related tests; also adds a dedicated `QRSigningContext`/`useQRSigning` hook with a guard + test, and disables a flaky Predictions smoke test via `describe.skip`. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit ef5c0f7. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY --> --------- Signed-off-by: dan437 <80175477+dan437@users.noreply.github.com> Co-authored-by: metamaskbot <metamaskbot@users.noreply.github.com> Co-authored-by: João Loureiro <175489935+joaoloureirop@users.noreply.github.com> Co-authored-by: runway-github[bot] <73448015+runway-github[bot]@users.noreply.github.com> Co-authored-by: Christian Montoya <christian.montoya@consensys.net> Co-authored-by: sleepytanya <104780023+sleepytanya@users.noreply.github.com> Co-authored-by: Cal Leung <cal.leung@consensys.net> Co-authored-by: Matthew Grainger <46547583+Matt561@users.noreply.github.com> Co-authored-by: Aslau Mario-Daniel <marioaslau@gmail.com> Co-authored-by: Caainã Jeronimo <caainaje@gmail.com> Co-authored-by: Luis Taniça <matallui@gmail.com> Co-authored-by: sahar-fehri <sahar.fehri@consensys.net> Co-authored-by: tommasini <46944231+tommasini@users.noreply.github.com> Co-authored-by: sophieqgu <37032128+sophieqgu@users.noreply.github.com> Co-authored-by: Alexey Kureev <a.g.kureev@gmail.com> Co-authored-by: Baptiste Marchand <75846779+baptiste-marchand@users.noreply.github.com> Co-authored-by: Matt D. <85914066+geositta@users.noreply.github.com> Co-authored-by: VGR <VanGulckRik@gmail.com> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> Co-authored-by: saustrie-consensys <shane.austrie@consensys.net> Co-authored-by: Matthew Grainger <matthew.grainger@consensys.net> Co-authored-by: Darius Costolas <dariuscostolas@yahoo.com> Co-authored-by: Darius Costolas <10818970+meltingice1337@users.noreply.github.com> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: wachunei <1024246+wachunei@users.noreply.github.com> Co-authored-by: ieow <4881057+ieow@users.noreply.github.com> Co-authored-by: Tyler Chong <tyler.chong@consensys.net> Co-authored-by: Juanmi <95381763+juanmigdr@users.noreply.github.com> Co-authored-by: Samir Mehta <12882259+samir-acle@users.noreply.github.com> Co-authored-by: abretonc7s <107169956+abretonc7s@users.noreply.github.com> Co-authored-by: geositta <matthew.denton@consensys.net> Co-authored-by: Michal Szorad <michal.szorad@consensys.net> Co-authored-by: Javier Garcia Vera <javier.vera@consensys.net> Co-authored-by: Matthew Walsh <matthew.walsh@consensys.net> Co-authored-by: Alejandro Garcia Anglada <aganglada@gmail.com> Co-authored-by: Remi ARQUEVAUX <r.arquevaux@gmail.com> Co-authored-by: metamaskbotv2[bot] <214045046+metamaskbotv2[bot]@users.noreply.github.com> Co-authored-by: Laurel <153323700+i18nlaurel@users.noreply.github.com> Co-authored-by: Daniel <80175477+dan437@users.noreply.github.com> Co-authored-by: maxime-oe <maxime.ouairy-ext@consensys.net> Co-authored-by: infiniteflower <139582705+infiniteflower@users.noreply.github.com> Co-authored-by: Prithpal Sooriya <prithpal.sooriya@users.noreply.github.com> Co-authored-by: Prithpal Sooriya <prithpal.sooriya@gmail.com> Co-authored-by: António Regadas <antonio.regadas@consensys.net> Co-authored-by: George Marshall <george.marshall@consensys.net> Co-authored-by: tommasini <tommasini15@gmail.com> Co-authored-by: Wei Sun <wei.sun@consensys.net> Co-authored-by: Bryan Fullam <bryan.fullam@consensys.net> Co-authored-by: Vince Howard <vincenguyenhoward@gmail.com> Co-authored-by: Xiaoming Wang <7315988+dawnseeker8@users.noreply.github.com> Co-authored-by: Arafet (CN - Hong Kong) <52028926+arafetbenmakhlouf@users.noreply.github.com> Co-authored-by: Nico MASSART <NicolasMassart@users.noreply.github.com> Co-authored-by: Gaurav Goel <grvgoel19@gmail.com> Co-authored-by: MetaMask Bot <37885440+metamaskbot@users.noreply.github.com> Co-authored-by: Bruno Nascimento <brunonascimentodev@gmail.com> Co-authored-by: Pedro Pablo Aste Kompen <wachunei@gmail.com> Co-authored-by: Satyajeet Kolhapure <77279246+satyajeetkolhapure@users.noreply.github.com> Co-authored-by: Jean-Baptiste Blanc <jb.blanc@consensys.net> Co-authored-by: Brian August Nguyen <brianacnguyen@gmail.com> Co-authored-by: George Weiler <georgejweiler@gmail.com> Co-authored-by: AxelGes <34173844+AxelGes@users.noreply.github.com> Co-authored-by: Patryk Łucka <patryk.lucka@gmail.com> Co-authored-by: Gustavo Antunes <17601467+gantunesr@users.noreply.github.com> Co-authored-by: Davide Brocchetto <davide.brocchetto@consensys.net> Co-authored-by: Curtis David <Curtis.David7@gmail.com> Co-authored-by: Nick Gambino <35090461+gambinish@users.noreply.github.com> Co-authored-by: Monte Lai <monte.lai@consensys.net> Co-authored-by: Jyoti Puri <jyotipuri@gmail.com> Co-authored-by: Maarten Zuidhoorn <maarten@zuidhoorn.com> Co-authored-by: cmd-ob <ola.bale@consensys.net> Co-authored-by: João <castrofjoao@gmail.com> Co-authored-by: sophieqgu <sophieqgu@gmail.com> Co-authored-by: Mathieu Artu <mathieu.artu@consensys.net> Co-authored-by: Charly Chevalier <charlyy.chevalier@gmail.com> Co-authored-by: Bryan Fullam <8902170+bfullam@users.noreply.github.com> Co-authored-by: SteP-n-s <stylianos.panagakos@consensys.net> Co-authored-by: Edouard Bougon <15703023+EdouardBougon@users.noreply.github.com> Co-authored-by: Alex Donesky <adonesky@gmail.com> Co-authored-by: Fabio Bozzo <fabio.bozzo@gmail.com> Co-authored-by: Owen Craston <owen.craston@consensys.net> Co-authored-by: Pavel Dvorkin <pavel.dvorkin@consensys.net> Co-authored-by: Kevin Bluer <kevin@bluer.com> Co-authored-by: Nicholas Gambino <nicholas.gambino@consensys.net> Co-authored-by: Nicholas Smith <nick.smith@consensys.net> Co-authored-by: sethkfman <10342624+sethkfman@users.noreply.github.com> Co-authored-by: Nodonisko <suchydan@gmail.com> Co-authored-by: Tamas <soostamas.hu@gmail.com> Co-authored-by: ffmcgee <51971598+ffmcgee725@users.noreply.github.com> Co-authored-by: Alexandre Chappaz <alex@achappaz.fr> Co-authored-by: Harika <153644847+hjetpoluru@users.noreply.github.com> Co-authored-by: Erik Nilsson <eriks@mail.se> Co-authored-by: Patryk Łucka <5708018+PatrykLucka@users.noreply.github.com> Co-authored-by: Salim TOUBAL <salim.toubal@outlook.com> Co-authored-by: OGPoyraz <omergoktugpoyraz@gmail.com> Co-authored-by: Bernardo Garces Chapero <bernardo.chapero@consensys.net> Co-authored-by: Vinicius Stevam <45455812+vinistevam@users.noreply.github.com> Co-authored-by: sethkfman <Seth.Kaufman@consensys.net> Co-authored-by: Gauthier Petetin <gauthierpetetin@hotmail.com> Co-authored-by: Ganesh Suresh Patra <ganesh.patra@consensys.net> Co-authored-by: himanshuchawla009 <himanshuchawla2014@gmail.com> Co-authored-by: Elliot Winkler <elliot.winkler@gmail.com> Co-authored-by: Frederik Bolding <frederik.bolding@gmail.com> Co-authored-by: Charly Chevalier <charly.chevalier@consensys.net> Co-authored-by: Micaela <100321200+micaelae@users.noreply.github.com> Co-authored-by: salimtb <salim.toubal@consensys.net> Co-authored-by: Micaela Estabillo <micaela.estabillo@consensys.net> Co-authored-by: jake-perkins <128608287+jake-perkins@users.noreply.github.com> Co-authored-by: Kylan Hurt <6249205+smilingkylan@users.noreply.github.com> Co-authored-by: sethkfman <setk.kaufman@consensys.net> Co-authored-by: Prithpal Sooriya <prithpal.sooriya@consensys.net> Co-authored-by: Cursor <cursoragent@cursor.com> Co-authored-by: Christopher Ferreira <104831203+christopherferreira9@users.noreply.github.com>
1 parent 4477f76 commit fcddd41

9 files changed

Lines changed: 206 additions & 67 deletions

File tree

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
diff --git a/dist/MultichainAssetsController/MultichainAssetsController.cjs b/dist/MultichainAssetsController/MultichainAssetsController.cjs
2+
index 0f74ce9c3200043c7c8fd121218e41790c55cc0e..ee449c44281ae3dd37e73ea0e9cc0b8ee18dea0e 100644
3+
--- a/dist/MultichainAssetsController/MultichainAssetsController.cjs
4+
+++ b/dist/MultichainAssetsController/MultichainAssetsController.cjs
5+
@@ -493,7 +493,7 @@ async function _MultichainAssetsController_getAssetsMetadataFrom(assets, snapId)
6+
});
7+
}, _MultichainAssetsController_filterBlockaidSpamTokensOnAdd =
8+
/**
9+
- * Fail-closed Blockaid filter for newly detected `token:` assets (native/other namespaces unchanged).
10+
+ * Fail-open Blockaid filter for newly detected `token:` assets (native/other namespaces unchanged).
11+
*
12+
* @param assets - CAIP assets to filter.
13+
* @returns Filtered list, original order preserved.
14+
@@ -503,33 +503,25 @@ async function _MultichainAssetsController_filterBlockaidSpamTokensOnAdd(assets)
15+
if (Object.keys(tokensByChain).length === 0) {
16+
return [...assets];
17+
}
18+
- const keptTokenAssets = new Set();
19+
+ const rejectedAssets = new Set();
20+
for (const [chainName, tokenEntries] of Object.entries(tokensByChain)) {
21+
const batchOutcomes = await __classPrivateFieldGet(this, _MultichainAssetsController_instances, "m", _MultichainAssetsController_runBatchedBulkTokenScans).call(this, chainName, tokenEntries);
22+
for (const outcome of batchOutcomes) {
23+
if (outcome.status === 'rejected') {
24+
+ // Fail-open: if API fails, allow all tokens in this batch through
25+
continue;
26+
}
27+
for (const entry of outcome.entries) {
28+
const scanned = outcome.response[entry.address];
29+
+ // Reject only if we have a definitive malicious result
30+
if (scanned?.result_type &&
31+
scanned.result_type !== phishing_controller_1.TokenScanResultType.Malicious) {
32+
- keptTokenAssets.add(entry.asset);
33+
+ rejectedAssets.add(entry.asset);
34+
}
35+
}
36+
}
37+
}
38+
- return assets.filter((asset) => {
39+
- try {
40+
- if ((0, utils_1.parseCaipAssetType)(asset).assetNamespace === 'token') {
41+
- return keptTokenAssets.has(asset);
42+
- }
43+
- }
44+
- catch {
45+
- return false;
46+
- }
47+
- return true;
48+
- });
49+
+ return assets.filter((asset) => !rejectedAssets.has(asset));
50+
}, _MultichainAssetsController_findMaliciousTokensAmong =
51+
/**
52+
* SPL `token:` assets in state that Blockaid marks malicious (failed batches skipped).

CHANGELOG.md

Lines changed: 89 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,89 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [7.75.1]
11+
12+
### Fixed
13+
14+
- Fixed Hyperliquid withdraw showing $0 and being blocked for users on Unified Account mode. (#29492)
15+
16+
## [7.75.0]
17+
18+
### Added
19+
20+
- Added support for ENS v2 (#29258)
21+
- Added a Rive-based animated fox splash screen in place of the static loading spinner for a smoother app launch experience (#29003)
22+
- Hid multichain Activity entries involving tokens flagged as malicious by security scanning, consistent with how malicious tokens are handled on the assets overview (#29239)
23+
- Added Suspicious and Malicious security badges to tokens in the Swaps and Bridge asset pickers (#29070)
24+
- Added security badges to the trending tokens list (#29112)
25+
- Added live mUSD and Veda vault USD balance display on the Money account home page (#28889)
26+
- Added a new hardware connection page (#28019)
27+
- Added an A/B-tested homepage layout that separates trending sections and tracks swap analytics attribution for actions launched from homepage trending sections (#28085)
28+
- Added follow/unfollow functionality for traders (#28843)
29+
- Added hold time to the trader profile view (#28873)
30+
- Extended notification account toggles to all wallet keyrings (#27254)
31+
- Enabled MetaMask Card Cashback for US users (#29138)
32+
- Added an Ondo campaign rewards stats page (#28734)
33+
- Added a migration that resets the native balance to 0 on Tempo chains (#28869)
34+
35+
### Changed
36+
37+
- Hid token warnings in the Swaps asset picker temporarily (#29278)
38+
- Improved MetaMask Card login fields to use the design-system `TextField` with correct username/password autocomplete hints for accessibility and password managers (#29215)
39+
- Moved the Cashback action on Card Home directly under Change asset; the Change asset row no longer shows a trailing chevron in the bottom sheet (#29219)
40+
- Updated the Tempo native token logo (#29105)
41+
- Only show the Transak verify-identity policy screen once on Unified Buy; later visits skip to email entry when not logged in to Transak (#28952)
42+
- Updated token avatars to use only asset image URLs, without a curated token list fallback (#28552)
43+
- Updated the perps section on the Explore screen to display horizontal tile cards with sparkline charts (#28512)
44+
- Stopped using the token list cache for asset overview token details; decimals, aggregators, and market data now come from the asset and token rates (#28533)
45+
- Improved scroll-back user experience in the advanced chart integration on the token details page (#28451)
46+
- Updated app typography and font assets to align with the latest MetaMask design system semibold bold-weight migration (#28363)
47+
- Updated perps chart volume bars to use 30% opacity, matching the transparency style of the spot token details chart (#29132)
48+
- Updated Settings copy so the IPFS gateway is described under Security and privacy instead of Advanced (#29045)
49+
50+
### Fixed
51+
52+
- Fixed featured carousel showing secondary markets instead of the match winner for sports events (#29001)
53+
- Fixed featured carousel showing sports games that had already ended (#29000)
54+
- Fixed Tempo transactions to fall back to a classic transaction when contract deployment is required (#29078)
55+
- Fixed the Confirmation button state by adding a gasless-loading guard, consistent with Extension (#29188)
56+
- Fixed rapid market switching triggering Hyperliquid rate-limit errors (#29056)
57+
- Fixed max mUSD conversion displaying an inflated receive amount (#29175)
58+
- Fixed the mUSD logo not displayed when opening mUSD swap from Rewards (#29194)
59+
- Fixed MetaMask Card home showing zero token balances when the user is not authenticated with the card provider (#29146)
60+
- Fixed a Perps position size formatting bug that stripped valid trailing zeros on whole-unit assets (szDecimals=0), e.g. displaying "1" instead of "100" (#29016)
61+
- Fixed SRP reveal QR code styling to display consistently across light and dark themes (#28969)
62+
- Fixed a visual alignment issue in the Top Traders list where double-digit ranks appeared to be missing their trailing dot (#29099)
63+
- Fixed an iOS-only bug where the header and web content overlapped in the in-app web view screen (#29020)
64+
- Fixed quote polling so the timer stops and interactions are blocked while a quote is being processed (#28862)
65+
- Fixed `wallet_watchAsset` failing with `"Expected a value of type JSON, but received: [object Object]"` when a dapp requested the wallet to watch a token (#29030)
66+
- Fixed bridge quotes showing a misleading 0% price impact when quote price data was unavailable (#28931)
67+
- Fixed incorrect TRX "locked for" value (#29038)
68+
- Fixed a layout shift that happened when following/unfollowing traders with high PnL (#29021)
69+
- Fixed NFT ownership status not refreshing across all enabled networks when pulling to refresh (#28655)
70+
- Fixed noisy Sentry error reports from expected candle fetch cancellations during navigation (#28953)
71+
- Fixed transient UI flashes on the Buy screen (stale "Powered by" text, brief quote-fetch error banner, and a disabled-looking Continue button) when the selected token isn't supported by the current provider and the app is silently switching to a supporting one (#29178)
72+
- Fixed missing error sheet on auth server and seedless login errors (#29227)
73+
- Fixed missing token icons in the predictions pay-with picker for zero-balance tokens (#27702)
74+
75+
## [7.74.3]
76+
77+
### Fixed
78+
79+
- Fix polymarket adapter contract addresses for Android
80+
81+
## [7.74.2]
82+
83+
### Fixed
84+
85+
- Updated Polymarket adapter contracts so Polymarket prediction transactions continue working after the relayer migration. (#29573)
86+
87+
## [7.74.1]
88+
89+
### Fixed
90+
91+
- Fixed the environmental issue that push notifications not received on Android
92+
1093
## [7.74.0]
1194

1295
### Added
@@ -11288,7 +11371,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1128811371
- [#957](https://github.com/MetaMask/metamask-mobile/pull/957): fix timeouts (#957)
1128911372
- [#954](https://github.com/MetaMask/metamask-mobile/pull/954): Bugfix: onboarding navigation (#954)
1129011373

11291-
[Unreleased]: https://github.com/MetaMask/metamask-mobile/compare/v7.74.0...HEAD
11374+
[Unreleased]: https://github.com/MetaMask/metamask-mobile/compare/v7.75.1...HEAD
11375+
[7.75.1]: https://github.com/MetaMask/metamask-mobile/compare/v7.75.0...v7.75.1
11376+
[7.75.0]: https://github.com/MetaMask/metamask-mobile/compare/v7.74.3...v7.75.0
11377+
[7.74.3]: https://github.com/MetaMask/metamask-mobile/compare/v7.74.2...v7.74.3
11378+
[7.74.2]: https://github.com/MetaMask/metamask-mobile/compare/v7.74.1...v7.74.2
11379+
[7.74.1]: https://github.com/MetaMask/metamask-mobile/compare/v7.74.0...v7.74.1
1129211380
[7.74.0]: https://github.com/MetaMask/metamask-mobile/compare/v7.73.2...v7.74.0
1129311381
[7.73.2]: https://github.com/MetaMask/metamask-mobile/compare/v7.73.1...v7.73.2
1129411382
[7.73.1]: https://github.com/MetaMask/metamask-mobile/compare/v7.73.0...v7.73.1
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export const SHOW_TOKEN_WARNINGS = false;

app/components/UI/Bridge/utils/tokenUtils.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,15 @@ import { DefaultSwapDestTokens } from '../constants/default-swap-dest-tokens';
1212
import { IncludeAsset } from '../hooks/usePopularTokens';
1313
import { POLYGON_NATIVE_TOKEN } from '../constants/assets';
1414

15+
/**
16+
* Extracts security warning descriptions from a token's securityData metadata features.
17+
* Returns an empty array when the token has no security warnings.
18+
*/
19+
export const getSecurityWarnings = (
20+
token: BridgeToken | undefined | null,
21+
): string[] =>
22+
token?.securityData?.metadata?.features?.map((f) => f.description) ?? [];
23+
1524
/**
1625
* Normalizes chain-specific native token addresses to the zero address for the bridge flow.
1726
*

app/components/UI/Earn/Views/EarnMusdConversionEducationView/index.test.tsx

Lines changed: 0 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -1301,68 +1301,6 @@ describe('EarnMusdConversionEducationView', () => {
13011301
expect(mockTrackEvent).toHaveBeenCalledWith({ name: 'mock-built-event' });
13021302
});
13031303

1304-
it('includes redirects_to money_hub when secondary button pressed with deeplink, Money Hub enabled, and geo-eligible', () => {
1305-
mockSelectMoneyHubEnabledFlag.mockReturnValue(true);
1306-
mockUseParams.mockReturnValue({ isDeeplink: true });
1307-
1308-
const { getByTestId } = renderWithProvider(
1309-
<EarnMusdConversionEducationView />,
1310-
{ state: {} },
1311-
);
1312-
1313-
mockTrackEvent.mockClear();
1314-
mockCreateEventBuilder.mockClear();
1315-
mockAddProperties.mockClear();
1316-
mockBuild.mockClear();
1317-
1318-
fireEvent.press(
1319-
getByTestId(
1320-
EARN_TEST_IDS.MUSD.CONVERSION_EDUCATION_VIEW.SECONDARY_BUTTON,
1321-
),
1322-
);
1323-
1324-
expect(mockCreateEventBuilder).toHaveBeenCalledWith(
1325-
MetaMetricsEvents.MUSD_FULLSCREEN_ANNOUNCEMENT_BUTTON_CLICKED,
1326-
);
1327-
expect(mockAddProperties).toHaveBeenCalledWith({
1328-
location:
1329-
MUSD_EVENTS_CONSTANTS.EVENT_LOCATIONS.CONVERSION_EDUCATION_SCREEN,
1330-
button_type: 'secondary',
1331-
button_text: strings('earn.musd_conversion.education.secondary_button'),
1332-
redirects_to: MONEY_EVENTS_CONSTANTS.EVENT_LOCATIONS.MONEY_HUB,
1333-
});
1334-
});
1335-
1336-
it('omits redirects_to when secondary button pressed in normal non-deeplink flow', () => {
1337-
mockUseParams.mockReturnValue({ isDeeplink: false });
1338-
1339-
const { getByTestId } = renderWithProvider(
1340-
<EarnMusdConversionEducationView />,
1341-
{ state: {} },
1342-
);
1343-
1344-
mockTrackEvent.mockClear();
1345-
mockCreateEventBuilder.mockClear();
1346-
mockAddProperties.mockClear();
1347-
mockBuild.mockClear();
1348-
1349-
fireEvent.press(
1350-
getByTestId(
1351-
EARN_TEST_IDS.MUSD.CONVERSION_EDUCATION_VIEW.SECONDARY_BUTTON,
1352-
),
1353-
);
1354-
1355-
expect(mockAddProperties).toHaveBeenCalledWith({
1356-
location:
1357-
MUSD_EVENTS_CONSTANTS.EVENT_LOCATIONS.CONVERSION_EDUCATION_SCREEN,
1358-
button_type: 'secondary',
1359-
button_text: strings('earn.musd_conversion.education.secondary_button'),
1360-
});
1361-
expect(mockAddProperties).not.toHaveBeenCalledWith(
1362-
expect.objectContaining({ redirects_to: expect.anything() }),
1363-
);
1364-
});
1365-
13661304
it('tracks money_hub redirect when continue is pressed with returnTo', async () => {
13671305
mockUseParams.mockReturnValue({
13681306
returnTo: { screen: Routes.WALLET.CASH_TOKENS_FULL_VIEW },

app/components/UI/Earn/Views/EarnMusdConversionEducationView/index.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ import { selectMusdQuickConvertEnabledFlag } from '../../selectors/featureFlags'
4848
import { toChecksumAddress } from '../../../../../util/address';
4949
import { safeFormatChainIdToHex } from '../../../Card/util/safeFormatChainIdToHex';
5050
import { MONEY_EVENTS_CONSTANTS } from '../../../Money/constants/moneyEvents';
51-
import { selectMoneyHubEnabledFlag } from '../../../Money/selectors/featureFlags';
51+
import { selectMoneyHubEnabledFlag } from '../../../Money/selectors/featureFlags.ts';
5252
interface EarnMusdConversionEducationViewRouteParams {
5353
/**
5454
* Indicates if this navigation originated from a deeplink
@@ -224,8 +224,6 @@ const EarnMusdConversionEducationView = () => {
224224
: MUSD_EVENT_LOCATIONS.CUSTOM_AMOUNT_SCREEN;
225225
if (returnTo) {
226226
redirectsTo = MONEY_EVENT_LOCATIONS.MONEY_HUB;
227-
} else if (deeplinkState?.action === 'navigate_money_hub') {
228-
redirectsTo = MONEY_EVENT_LOCATIONS.MONEY_HUB;
229227
} else if (deeplinkState?.action === 'navigate_home') {
230228
redirectsTo = MUSD_EVENT_LOCATIONS.HOME_SCREEN;
231229
} else if (deeplinkState?.action === 'buy') {
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import React from 'react';
2+
import { render } from '@testing-library/react-native';
3+
4+
import { useQRSigning } from './QRSigningContext';
5+
6+
describe('QRSigningContext', () => {
7+
describe('useQRSigning', () => {
8+
it('throws when used outside HardwareWalletProvider', () => {
9+
const TestConsumer: React.FC = () => {
10+
useQRSigning();
11+
return null;
12+
};
13+
14+
expect(() => render(<TestConsumer />)).toThrow(
15+
'useQRSigning must be used within a HardwareWalletProvider',
16+
);
17+
});
18+
});
19+
});
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
import { createContext, useContext } from 'react';
2+
import { QrScanRequest } from '@metamask/eth-qr-keyring';
3+
4+
export interface QRSigningContextValue {
5+
/** The pending QR scan request from the keyring, if any. */
6+
pendingScanRequest?: QrScanRequest;
7+
/** Whether the pending request is a SIGN-type QR object. */
8+
isSigningQRObject: boolean;
9+
/** Mark the current QR scan request as completed (suppresses cancel-on-navigate). */
10+
setRequestCompleted: () => void;
11+
/** Whether the request has been completed. */
12+
isRequestCompleted: boolean;
13+
/** Reject the pending QR scan request if one exists. */
14+
cancelQRScanRequestIfPresent: () => Promise<void>;
15+
}
16+
17+
const QRSigningContext = createContext<QRSigningContextValue | undefined>(
18+
undefined,
19+
);
20+
21+
QRSigningContext.displayName = 'QRSigningContext';
22+
23+
export const useQRSigning = (): QRSigningContextValue => {
24+
const context = useContext(QRSigningContext);
25+
if (context === undefined) {
26+
throw new Error(
27+
'useQRSigning must be used within a HardwareWalletProvider',
28+
);
29+
}
30+
return context;
31+
};
32+
33+
export default QRSigningContext;

tests/smoke/predict/predict-open-position.spec.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@ const PredictionMarketFeature = async (mockServer: Mockttp) => {
5555
await POLYMARKET_POSITIONS_WITH_WINNINGS_MOCKS(mockServer, false); // do not include winnings. Claim Button is animated and problematic for e2e
5656
};
5757

58-
describe(SmokePredictions('Predictions'), () => {
58+
// Disabling because of https://consensys.slack.com/archives/C02U025CVU4/p1777884336901849
59+
describe.skip(SmokePredictions('Predictions'), () => {
5960
it('opens position on Celtics vs. Nets market', async () => {
6061
await withFixtures(
6162
{

0 commit comments

Comments
 (0)