[pull] main from MetaMask:main#301
Merged
Merged
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** This PR fixes the issue where android does not show a disabled state when back up and sync is disabled. <!-- 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? --> ## **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: Fixes the disabled appearance for backup and sync on android. ## **Related issues** Fixes: #20034 Fixes: https://consensyssoftware.atlassian.net/browse/MUL-1213?atlOrigin=eyJpIjoiNWZmODdiY2NlZTJiNDAwMGEyZjcyOWUwNjI0OTNlYWYiLCJwIjoiaiJ9 ## **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** [mul-1213-before.webm](https://github.com/user-attachments/assets/97d7dcad-cdc7-417b-a29a-1243adef246f) <!-- [screenshots/recordings] --> ### **After** [mul-1213-after.webm](https://github.com/user-attachments/assets/aaad6fb7-99f1-465b-895e-d422717f6adf) <!-- [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] > Adjusts Backup & Sync feature toggles to properly display a disabled state on Android by computing a memoized disabled flag and updating Switch track colors. > > - **UI (BackupAndSyncFeaturesToggles)** > - Compute `isDisabled` via `useMemo` from `isBackupAndSyncEnabled` and `isBackupAndSyncUpdateLoading`. > - Update `Switch` `trackColor.true` to show `colors.border.muted` when disabled or off (Android-specific behavior), otherwise `colors.primary.default`. > - **Tests** > - Update snapshots to reflect muted disabled track/tint colors. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 53a88cb. 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 early return empty contacts for nonEVM send flow contact recipients. BTC feature is getting released in this release hence there is no need for changelog. ## **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: #22205 ## **Manual testing steps** Contacts shouldn't appear for nonEVM send flow as it's EVM only. ## **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] > Ensure `useContacts` returns an empty list for non-EVM send types and add a test to cover it. > > - **Hooks**: > - `useContacts`: include `isNonEvmSendType` from `useSendType` and early-return `[]` when true; retain EVM-only address filtering logic. > - **Tests**: > - Add test verifying empty contacts when `isNonEvmSendType` is true. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 31d42ce. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
This PR fix QR not match in swap page. <!-- 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? --> ## **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: Change the name of QR in swap page to match the name in account list. ## **Related issues** Fixes: #20839 ## **Manual testing steps** Android 1. Add hardware wallet 2. Import QR accounts 3. Initiate Swap via QR account (POL-> USDT) 4. Verify account name on swap confirmation screen is same as account list account name ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** https://github.com/user-attachments/assets/91c7c831-537b-4f44-be41-4519e42fcaaf <!-- [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** - [x] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [x] 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] > Displays account group name (when available) with truncated label and restructures AccountInfoCard layout; adds helper for short names and updates snapshots. > > - **UI** > - **AccountInfoCard (`app/components/UI/AccountInfoCard/index.js`)**: > - Resolve account label from `accountToGroupMap` (fallback to `renderAccountName`); wire new prop via `selectAccountToGroupMap`. > - Truncate long account names using new `renderShortAccountName`; add `tooltip` with full name. > - Restructure layout: separate rows for `accountName`, `address`, and `balance`; add `marginLeft: 8`; remove parentheses around `address`. > - **Utils** > - **`app/util/address/index.ts`**: Add `renderShortAccountName(accountName, chars=20)`. > - **Tests/Snapshots** > - Update snapshots for `AccountInfoCard` and `AccountApproval` to reflect name truncation, tooltip, address formatting, and layout changes. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 1f3d783. 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** This PR fixes backdrop press on edit rpc bottom sheets <!-- 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? --> ## **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 preventing edit rpc bottom sheet to close ## **Related issues** Fixes: https://consensyssoftware.atlassian.net/browse/TMCU-21 ## **Manual testing steps** ```gherkin Feature: Edit rpc url Scenario: user is adding new custom network Given user onboarded When user navigates to Activity > Networks dropdown > Custom > + Add a custom network > RPC URL Then user is able to close bottom sheet by clicking above the bottom sheet ``` ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** https://github.com/user-attachments/assets/af8e59be-ac66-4d5f-b679-4919c42e423a <!-- [screenshots/recordings] --> ### **After** https://github.com/user-attachments/assets/4e33f3c7-3ba4-469d-807e-17714703a78d <!-- [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] > Enables closing bottom sheets via backdrop tap/swipe and refactors Bridge to use shared parse/format utilities with minor UI loading improvements. > > - **Modals**: > - `app/components/UI/NetworkModal/index.tsx`: Add `onBackdropPress` and `onSwipeComplete` to close on backdrop tap/swipe. > - `app/components/UI/ReusableModal/index.tsx`: Make backdrop a pressable `TouchableOpacity` that dismisses; remove inner blocking touchable. > - *Tests/Snapshots*: Update affected snapshots (`CollectibleModal`, `LedgerMessageSignModal`, `ReusableModal`, `UpdateNeeded`, `AssetOptions`, `NetworkSelector`) to reflect interactive backdrop. > - **Bridge**: > - Consolidate amount parsing: switch imports to `../../Ramp/Aggregator/utils/parseAmount` in `TokenInputArea`, `TokenSelectorItem`, and `useIntentAmount`. > - Replace custom currency formatter by importing `formatCurrency` from `../../Ramp/Deposit/utils`; remove `utils/currencyUtils.ts` and its tests. > - UI: Use `SkeletonText` for loading balances in `TokenSelectorItem`. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 02180ed. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )