Skip to content

fix: remove the ability to send to btc accounts in send page#26271

Merged
montelaidev merged 22 commits intodevelopfrom
fix/ap-546
Aug 2, 2024
Merged

fix: remove the ability to send to btc accounts in send page#26271
montelaidev merged 22 commits intodevelopfrom
fix/ap-546

Conversation

@montelaidev
Copy link
Copy Markdown
Contributor

@montelaidev montelaidev commented Aug 1, 2024

Description

This PR removes BTC accounts from the account picker and Your Accounts list in the send flow.

Open in GitHub Codespaces

Related issues

Fixes: https://github.com/MetaMask/accounts-planning/issues/546

Manual testing steps

  1. Create btc account
  2. Select an evm account
  3. Click send
  4. See that the BTC account is not available in Your Accounts
  5. Click the account picker and see that the BTC account is not available.

Screenshots/Recordings

Before

Screenshot 2024-08-01 at 15 01 15
Screenshot 2024-08-01 at 15 01 18

After

Screenshot 2024-08-01 at 14 58 39
Screenshot 2024-08-01 at 14 58 43

Pre-merge author checklist

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.

@montelaidev montelaidev self-assigned this Aug 1, 2024
@montelaidev montelaidev added the team-accounts-framework Accounts team label Aug 1, 2024
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Aug 1, 2024

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.

@codecov
Copy link
Copy Markdown

codecov bot commented Aug 1, 2024

Codecov Report

Attention: Patch coverage is 93.54839% with 2 lines in your changes missing coverage. Please review.

Project coverage is 70.01%. Comparing base (20dd2d0) to head (f494669).

Files Patch % Lines
...multichain/account-list-menu/account-list-menu.tsx 91.67% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #26271      +/-   ##
===========================================
+ Coverage    70.00%   70.01%   +0.01%     
===========================================
  Files         1410     1410              
  Lines        49964    49978      +14     
  Branches     13801    13803       +2     
===========================================
+ Hits         34974    34990      +16     
+ Misses       14990    14988       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@metamaskbot
Copy link
Copy Markdown
Collaborator

Builds ready [2e1acac]
Page Load Metrics (154 ± 170 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint682491103818
domContentLoaded985322110
load421698154355170
domInteractive985312210
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 562 Bytes (0.01%)
  • common: 0 Bytes (0.00%)

@montelaidev montelaidev marked this pull request as ready for review August 1, 2024 08:46
@montelaidev montelaidev requested a review from a team as a code owner August 1, 2024 08:46
@danroc
Copy link
Copy Markdown
Contributor

danroc commented Aug 1, 2024

Tested:
image

Comment on lines +6 to +14
// eslint-disable-next-line import/no-duplicates
import { BtcAccountType, EthAccountType } from '@metamask/keyring-api';
///: BEGIN:ONLY_INCLUDE_IF(build-flask)
import { KeyringClient } from '@metamask/keyring-api';
import {
InternalAccount,
KeyringAccountType,
KeyringClient,
// eslint-disable-next-line import/no-duplicates
} from '@metamask/keyring-api';
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-posting this one, cause he was not appearing (was outdated). Maybe we can do it like this:

import {
  EthAccountType
  ///: BEGIN:ONLY_INCLUDE_IF(build-flask)
  InternalAccount,
  KeyringAccountType,
  KeyringClient,
  ///: END:ONLY_INCLUDE_IF
} from '@metamask/keyring-api';
///: BEGIN:ONLY_INCLUDE_IF(build-flask)
import { Caip2ChainId } from '@metamask/snaps-utils';

Copy link
Copy Markdown
Contributor

@ccharly ccharly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM + manually tested:

  • Created accounts:
Screenshot 2024-08-01 at 18 33 16
  • Account "to" during "Send":
Screenshot 2024-08-01 at 18 33 27
  • Account "from" during "Send":
Screenshot 2024-08-01 at 18 33 33

@metamaskbot
Copy link
Copy Markdown
Collaborator

Builds ready [cf67b29]
Page Load Metrics (234 ± 238 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint683611217737
domContentLoaded10159353718
load431781234496238
domInteractive10158353718
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 936 Bytes (0.01%)
  • common: 0 Bytes (0.00%)

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Aug 2, 2024

@metamaskbot
Copy link
Copy Markdown
Collaborator

Builds ready [f494669]
Page Load Metrics (678 ± 453 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint723581458842
domContentLoaded987302210
load402645678944453
domInteractive987302210
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 936 Bytes (0.01%)
  • common: 0 Bytes (0.00%)

@montelaidev montelaidev merged commit fbd1ea1 into develop Aug 2, 2024
@montelaidev montelaidev deleted the fix/ap-546 branch August 2, 2024 03:22
@github-actions github-actions bot locked and limited conversation to collaborators Aug 2, 2024
@metamaskbot metamaskbot added the release-12.4.0 Issue or pull request that will be included in release 12.4.0 label Aug 2, 2024
@metamaskbot metamaskbot added release-12.2.0 Issue or pull request that will be included in release 12.2.0 and removed release-12.4.0 Issue or pull request that will be included in release 12.4.0 labels Sep 2, 2024
@metamaskbot
Copy link
Copy Markdown
Collaborator

Missing release label release-12.2.0 on PR. Adding release label release-12.2.0 on PR and removing other release labels(release-12.4.0), as PR was cherry-picked in branch 12.2.0.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-12.2.0 Issue or pull request that will be included in release 12.2.0 team-accounts-framework Accounts team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants