-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
chore: sync stable to main for version 7.61.0 #22951
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
<!--
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**
<!--
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?
-->
This PR addresses two issues related to the Card feature and onboarding
experience:
- Delegation refresh issue: After completing a successful delegation,
some data were not properly updated when navigating back to the CardHome
screen. This fix ensures all relevant data refresh correctly to reflect
the latest state.
- KYC WebView permissions: Removed a property that was preventing the
KYC WebView during onboarding from requesting camera and microphone
access, restoring the expected behavior for KYC verification.
## **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: Data not refreshing properly on CardHome after
successful delegation
CHANGELOG entry: KYC WebView not requesting camera and microphone access
during onboarding
## **Related issues**
Fixes:
## **Manual testing steps**
```gherkin
Feature: my feature name
Scenario: user [verb for user action]
Given [describe expected initial app state]
When user [verb for user action]
Then [describe expected outcome]
```
## **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**
- [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 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-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.
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> Adds a post-delegation delay and cache clear to refresh Card data,
consolidates loading/navigation handling, removes token priority update,
and re-enables KYC camera/mic prompts.
>
> - **Card — Spending Limit
(`app/components/UI/Card/Views/SpendingLimit/SpendingLimit.tsx`)**:
> - Aggregate loading state via `isProcessing` + `isDelegationLoading`
(`isLoading`); block back/cancel while loading; update button
`disabled`/`loading` states.
> - On confirm: validate SDK (error toast if missing), submit
delegation, wait 3s,
`dispatch(clearCacheData('card-external-wallet-details'))`, show success
toast, then navigate back.
> - Remove token priority update flow and related utilities; simplify
logic.
> - **Tests (`SpendingLimit.test.tsx`)**:
> - Remove token-priority mocks/tests; adjust expectations to await 3s
delay, cache clear, success toast, and navigation.
> - Add/modify loading and navigation blocking/cancel behavior tests.
> - **Onboarding — KYC WebView
(`app/components/UI/Card/components/Onboarding/KYCWebview.tsx`)**:
> - Remove `mediaCapturePermissionGrantType` to allow camera/microphone
permission prompts.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
4e1ae30. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
…ted chains (#22631) <!-- 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** <!-- 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? --> Fixed a crash in the Bridge feature that occurred when attempting to fetch token icons for chains not supported by the tokenIcons API. **The Problem:** The `getTokenIconUrl` function in `app/components/UI/Bridge/utils/index.ts` was calling `formatAddressToAssetId` from `@metamask/bridge-controller`, which throws errors for unsupported chains. This unhandled error was causing the app to crash when users attempted to open the Card home screen. The crash occurred through the following chain: Card home uses the `useTokensWithBalance` hook, which calls `getTokenIconUrl` in the background to fetch icons for all tokens. When processing tokens on unsupported chains, `formatAddressToAssetId` would throw an uncaught exception that propagated up the stack and crashed the app, making the entire Card feature inaccessible to users. **The Solution:** Added proper error handling by wrapping the `formatAddressToAssetId` call in a try-catch block. The function now gracefully returns `undefined` instead of propagating the error, preventing app crashes. Also enhanced the inline documentation to clearly explain why this error suppression is expected and necessary. Additionally, added comprehensive test coverage for all error scenarios including unsupported chains, invalid address formats, and null/undefined return values. ## **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: Fixed crash when fetching token icons for unsupported chains in Bridge ## **Related issues** Fixes: #22475 ## **Manual testing steps** As a Card holder, open the Card home screen and check if the fail still happening. should see the card-related info like balance and selected asset, without any crashes or failures. ```gherkin Feature: Card home screen loads with tokens on unsupported chains Scenario: Card home displays correctly with tokens on unsupported chains Given the user is logged into MetaMask Mobile And the user has an active Card And the user has tokens on chains not supported by the tokenIcons API When the user navigates to the Card home screen Then the Card home screen loads successfully without crashes And the Card balance is displayed correctly And the selected asset information is visible And token list is rendered (with or without icons for unsupported chains) And all Card functionality remains operational ``` ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> https://github.com/user-attachments/assets/4ae409f8-9e7d-4258-8e07-a4a85b78db58 ### **After** <!-- [screenshots/recordings] --> https://github.com/user-attachments/assets/320c71a2-5fcb-495f-b576-148fb0a7661c ## **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 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-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. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Wraps token icon URL generation in try/catch to return undefined on errors and adds comprehensive tests for EVM/Solana behavior and error cases. > > - **Bridge utils**: > - Wrap `getTokenIconUrl` call to `formatAddressToAssetId` in a try/catch and return `undefined` on errors; retain EVM lowercasing and URL formatting. > - **Tests** (`app/components/UI/Bridge/utils/index.test.ts`): > - Mock `formatAddressToAssetId` and `isNonEvmChainId` from `@metamask/bridge-controller`. > - Add cases for `getTokenIconUrl` covering native/ERC20 (EVM), Solana native/SPL, `null`/`undefined` returns, and thrown errors (unsupported chain, invalid address). > - Verify `wipeBridgeStatus` behavior: twice for EVM (original + lowercase) and once for Solana; minor test description cleanups. > - Keep `isBridgeAllowed` tests intact with minor wording tweaks. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit c7809ae. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
<!-- 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** <!-- 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? --> This PR solves the issue where users with alphanumeric ZIP/postal codes (such as those in the UK) are unable to complete the onboarding flow because the ZIP code field only accepts numeric input. The keyboard shown is numeric-only, and the field does not allow typing letters, preventing users from entering valid postal codes. ## **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: Fix ZIP Code Input Blocks Letters on Card Onboarding flow ## **Related issues** Fixes: #22633 ## **Manual testing steps** ```gherkin Feature: my feature name Scenario: user [verb for user action] Given [describe expected initial app state] When user [verb for user action] Then [describe expected outcome] ``` ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> <img width="332" height="720" alt="image" src="https://github.com/user-attachments/assets/1a5056ed-225c-49f1-ac1a-f94a0162b15d" /> ### **After** <!-- [screenshots/recordings] --> <img width="332" height="720" alt="Simulator Screenshot - iPhone 16 - 2025-11-13 at 11 08 53" src="https://github.com/user-attachments/assets/26cb5338-e93c-485e-bcc6-51b7b447cf15" /> ## **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 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-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. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Change `keyboardType` of the `zipCode` `TextField` in `PhysicalAddress.tsx` from `number-pad` to `default` to allow alphanumeric input. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 6082943. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
…22658) <!-- 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** <!-- 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? --> Fixed a bug where USDC and USDT (and other non-enabled tokens) were displaying zero balances in the MetaMask Card feature, even when users had actual balances in their wallets. Root Causes: - ChainId Format Mismatch: The tokensWithBalance hook returns tokens with hex chainId format (e.g., 0xe708), but the lookup was comparing against CAIP format (e.g., eip155:59144), causing the comparison to always fail. - Case-Sensitive Address Comparison: Token addresses from tokensWithBalance use checksum format (mixed case), but the comparison was done with strict equality against lowercase addresses, causing matches to fail. Solution: - Updated the token lookup to use the normalized assetChainId (hex format) instead of the raw CAIP chainId - Made address comparisons case-insensitive by converting both sides to lowercase before comparison - Fixed unit tests to use the correct chainId format in their mocks ## **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: Fixed a bug where USDC, USDT, and other non-enabled tokens displayed zero balances in MetaMask Card when users had actual wallet balances ## **Related issues** Fixes: ## **Manual testing steps** ```gherkin Feature: Display correct token balances in MetaMask Card Scenario: user views non-enabled tokens with wallet balances Given user has USDC and USDT balances in their Linea wallet And these tokens are not enabled for the card (no delegation) When user opens the MetaMask Card token selection screen Then user sees the correct USDC balance (not $0.00) And user sees the correct USDT balance (not $0.00) And balances match what's shown in the main wallet view ``` ## **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** - [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 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-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. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Normalizes chainId to hex and makes address comparison case-insensitive in `useAssetBalances`, fixing zero balances for non-enabled tokens; updates tests to use hex chainId mocks. > > - **Hook (`useAssetBalances.tsx`)**: > - Normalize EVM `chainId` to hex via `safeFormatChainIdToHex` when matching `tokensWithBalance`. > - Use case-insensitive address comparison for token matching. > - Clarify mapping keys and retain wallet asset fallback; no behavior changes to Solana flow. > - **Tests (`useAssetBalances.test.ts`)**: > - Update mocked `chainId` values to hex (e.g., `"0xe708"`). > - Validate balance selection for enabled/limited and non-enabled tokens using corrected matching logic. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit bf7ab92. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
…oarding flow cp-7.58.3 (#22740) - chore: Update Spanish strings for Card onboarding flow cp-7.58.3 (#22733) Correct translation for card onboarding flow in Spanish <!-- 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** <!-- 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? --> A typo and poor translation in the card onboarding flow needed correcting for Spanish ## **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: n/a ## **Manual testing steps** ```gherkin Feature: my feature name Scenario: user [verb for user action] Given [describe expected initial app state] When user [verb for user action] Then [describe expected outcome] ``` ## **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** - [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 - [ ] 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-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. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Refines Spanish text for MetaMask Card onboarding by correcting the non-cardholder title and description. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 356e6fb. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY --> [a4bf0dd](a4bf0dd) Co-authored-by: Christian Montoya <christian.montoya@consensys.net>
…ent issue + undefined balances (#22737) - fix(card): cp-7.58.3 physical address consent issue + undefined balances (#22676) <!-- 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** <!-- 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? --> This PR hardens several Card flows: - Mailing-address consent now recreates or reuses onboarding consent defensively, mirroring the logic in the physical-address step. - useWrapWithCache, CardHome, and their test suites now treat cache errors and expired-card tokens consistently; the home screen shows a dedicated spinner while auth cleanup runs and only processes each auth error once. - Onboarding/Complete now calls navigation.dispatch(StackActions.replace(...)) (with updated tests) so we don’t stack duplicate routes after successful onboarding. - Card login path surfaces the new ACCOUNT_DISABLED error type with the correct localized messaging. - These fixes resolve missing-consent crashes, inconsistent priority-token balances, brittle token-expiration UX, and the lingering navigation issue after onboarding. ## **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: Improved MetaMask Card onboarding and home flows (defensive consent creation, consistent balance caching, robust expired-token handling, and navigation fixes). ## **Related issues** Fixes: ## **Manual testing steps** ```gherkin Feature: my feature name Scenario: user [verb for user action] Given [describe expected initial app state] When user [verb for user action] Then [describe expected outcome] ``` ## **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** - [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 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-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. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Strengthens Card onboarding and home flows with defensive consent creation/linking, robust auth error cleanup/navigation, corrected fiat balance formatting, improved cache/error handling, and SDK support for consent lookup plus ACCOUNT_DISABLED errors. > > - **Card UI/Navigation**: > - `CardHome`: Detects auth errors once, clears token/state, and replaces route to `Routes.CARD.WELCOME`; shows loading spinner during cleanup; loads data on first open. > - `Onboarding/Complete`: Uses `navigation.dispatch(StackActions.replace(...))` to go to HOME/AUTHENTICATION; resets onboarding state. > - **Onboarding Consent (Defensive)**: > - `PhysicalAddress`/`MailingAddress`: Reuse existing consent, create if missing, skip when already completed, link user post-registration, and clear `consentSetId` in Redux. > - **Hooks**: > - `useAssetBalances`: Handles `tokenRateUndefined`/loading sentinels, reformats raw fiat strings with currency detection, and falls back to token amounts; enriches raw values. > - `useWrapWithCache`: Returns `Error` objects (not booleans), avoids auto-refetch on error/while loading, and only caches non-null results. > - `useGetCardExternalWalletDetails`/`useGetDelegationSettings`: Include error objects; auto-fetch only when SDK/auth/settings ready. > - `useCardDetails`: Surfaces real errors; preserves warnings and polling behavior. > - `useCardProviderAuthentication`: Maps `ACCOUNT_DISABLED` to server message. > - **SDK/Types**: > - `CardSDK`: Adds `getConsentSetByOnboardingId`, maps disabled accounts to `ACCOUNT_DISABLED` error; various request/response hardening. > - `types`: Add `ACCOUNT_DISABLED`, `ConsentSet`/`GetOnboardingConsentResponse`. > - **Tests**: > - Extensive updates/additions across components and hooks to validate new consent logic, navigation replaces, fiat formatting, cache/error behavior, and SDK endpoints. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit eaef69b. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY --> [0828e98](0828e98) Co-authored-by: Bruno Nascimento <brunonascimentodev@gmail.com>
<!--
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**
<!--
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?
-->
hotfix release for 7.58.3
## **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:
## **Manual testing steps**
```gherkin
Feature: my feature name
Scenario: user [verb for user action]
Given [describe expected initial app state]
When user [verb for user action]
Then [describe expected outcome]
```
## **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 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).
- [ ] 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-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.
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Wrong variable in debug output for build number
Line 653 prints $APP_SEM_VER_NAME_TMP when it should print $APP_BUILD_NUMBER_TMP. This debug message is shown when version extraction fails, but will display the semantic version instead of the build number, making it misleading when troubleshooting extraction failures.
bitrise.yml#L652-L653
Lines 652 to 653 in 90bd184
| echo "APP_SEM_VER_NAME: $APP_SEM_VER_NAME_TMP" | |
| echo "APP_BUILD_NUMBER: $APP_SEM_VER_NAME_TMP" |
| "build:ios:flask:dev": "./scripts/build.sh ios flask dev", | ||
| "build:ios:flask:test": "./scripts/build.sh ios flask test", | ||
| "build:ios:flask:e2e": "BRIDGE_USE_DEV_APIS=true ./scripts/build.sh ios flask e2e", | ||
| "build:ios:flask:e2e": "./scripts/build.sh ios flask e2e", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Inconsistent BRIDGE_USE_DEV_APIS flag in Flask e2e builds
The build:android:flask:e2e and build:ios:flask:e2e commands no longer include BRIDGE_USE_DEV_APIS=true, but the corresponding start:android:e2e:flask and start:ios:e2e:flask commands retain it. This inconsistency could cause Flask e2e builds to behave differently depending on whether they're started via dev commands or pre-release build commands, potentially causing test failures or unexpected behavior.
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsThis is a version downgrade from 7.61.0 to 7.58.3 (patch release) with cherry-picked fixes. The changes involve:
Risk Assessment: HIGH
The conservative approach is to run tests for all affected features: Card, Ramps, Core wallet functionality, and Assets management. |
This PR syncs the stable branch to main for version 7.61.0.
Synchronization Process:
File Preservation:
Preserves specific files from the stable branch:
Indicates the next version candidate of main to 7.61.0
Note
Aligns app to version 7.58.3 across platforms, expands Bitrise with QA Flask and beta workflows, updates build scripts, and removes iOS Expo.plist.
7.58.3and build/code3055inandroid/app/build.gradle, iOS project configs,bitrise.yml, andpackage.json.CHANGELOG.mdwith7.58.3fixes and comparison links.create_qa_flask_builds_pipeline,create_build_qa_flask,build_android_qa_flask,build_ios_qa_flask).build_android_beta,build_ios_beta).METAMASK_BUILD_TYPEand support pre-release bundle builds; improved error handling.Expo.plistreferences from targets/resources.MARKETING_VERSION/CURRENT_PROJECT_VERSIONto7.58.3/3055across targets.versionName/versionCodeto7.58.3/3055.package.jsonscripts (watch/e2e/pre-release bundle commands) and formatting/linting.crypto-js,react-native-blob-jsi-helper,react-native-webview-invoke; align MM controller package versions).Written by Cursor Bugbot for commit 90bd184. This will update automatically on new commits. Configure here.