-
Notifications
You must be signed in to change notification settings - Fork 889
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
fix(wallet): Filter Select Account by Mainnet or Testnet #24096
fix(wallet): Filter Select Account by Mainnet or Testnet #24096
Conversation
A Storybook has been deployed to preview UI for the latest push |
components/brave_wallet_ui/page/screens/composer_ui/select_token_modal/select_token_modal.tsx
Outdated
Show resolved
Hide resolved
components/brave_wallet_ui/page/screens/composer_ui/select_token_modal/select_token_modal.tsx
Outdated
Show resolved
Hide resolved
components/brave_wallet_ui/page/screens/composer_ui/select_token_modal/select_token_modal.tsx
Outdated
Show resolved
Hide resolved
components/brave_wallet_ui/page/screens/composer_ui/select_token_modal/select_token_modal.tsx
Outdated
Show resolved
Hide resolved
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.
Approved with suggestions
90a69ef
to
8dceff0
Compare
A Storybook has been deployed to preview UI for the latest push |
8dceff0
to
e489b94
Compare
A Storybook has been deployed to preview UI for the latest push |
return accounts.filter((account) => | ||
BitcoinMainnetKeyringIds.includes(account.accountId.keyringId) | ||
) |
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.
Folks, there is
export const networkSupportsAccount = (
network: Pick<BraveWallet.NetworkInfo, 'coin' | 'supportedKeyrings'>,
accountId: BraveWallet.AccountId
) => {
return (
network.coin === accountId.coin &&
network.supportedKeyrings.includes(accountId.keyringId)
)
}
for that purpose
@josheleonard @Douglashdaniel fyi
Verification passed on
24096.mp4 |
Description
Fixes a bug when selecting a
Token
to send, theSelect Account
prompt was not filtering accounts byTestnet Accounts
vsMainnet Accounts
forBitcoin
,ZCash
andFilecoin
.Resolves brave/brave-browser#38927
Submitter Checklist:
QA/Yes
orQA/No
;release-notes/include
orrelease-notes/exclude
;OS/...
) to the associated issuenpm run test -- brave_browser_tests
,npm run test -- brave_unit_tests
wikinpm run presubmit
wiki,npm run gn_check
,npm run tslint
git rebase master
(if needed)Reviewer Checklist:
gn
After-merge Checklist:
changes has landed on
Test Plan:
Send
screen and selectBitcoin
,Zcash
orFilecoin
to send.Select Account
prompt appears, it should filter accounts based onTestnet
orMainnet
.Before:
Screen.Recording.3.mov
After:
Screen.Recording.4.mov