Skip to content
This repository has been archived by the owner on May 10, 2024. It is now read-only.

Fix #8107: Fix incorrect account opening Send from Filecoin asset detail #8118

Merged
merged 5 commits into from
Sep 22, 2023

Conversation

nuo-xu
Copy link
Contributor

@nuo-xu nuo-xu commented Sep 21, 2023

Summary of Changes

This pull request fixes #8107

Submitter Checklist:

  • Unit Tests are updated to cover new or changed functionality
  • User-facing strings use NSLocalizableString()
  • New or updated UI has been tested across:
    • Light & dark mode
    • Different size classes (iPhone, landscape, iPad)
    • Different dynamic type sizes

Test Plan:

  1. make sure you wallet has no filecoin account (create a new wallet)
  2. turn on show test networks in Settings
  3. go to FIL asset detail screen
  4. click either buy or send button
  5. you should get prompt with an alert asking you if you want to create an account
  6. Click no an the alert to dismiss the alert, you will still be at the asset detail screen, and not be redirected to other screen.
  7. Click yes to bring up account creation screen with Filecoin UI with correct Filecoin network preselected and no way to change it. (e.x if you comes from FIL on testnet asset details screen, account creation screen should pre-selected Filecoin Testnet instead of Mainnet.)
  8. Either click cancel or swipe down to dismiss account creation screen, you will still be at the asset detail screen, and not be redirected to other screen.
  9. Repeat step 4 - 6
  10. Fill in all the information or leave them as they are then click Add to create a new account
  11. Observe that the account creation screen will be dismissed and you will be redirected to Buy/Send screen depends on which button you clicked in step 8
  12. Goes back to the asset screen again
  13. repeat step 3
  14. Observe this time, you will be redirect to Buy/Send screen depends on which button you clicked in step 12 since now we a filecoin account

=====================

  1. make sure you wallet has no filecoin account (create a new wallet)
  2. turn on show test networks in Settings
  3. got buy/swap screen
  4. open network selection and choose either Filecoin Mainnet or Filecoin Testnet
  5. you should get prompt with an alert asking you if you want to create an account
  6. Click no an the alert to dismiss the alert, you will still be at the network selection screen, and not be redirected to other screen.
  7. Click yes to bring up account creation screen with Filecoin UI with correct Filecoin network preselected and no way to change it. (e.x if you comes from FIL on testnet asset details screen, account creation screen should pre-selected Filecoin Testnet instead of Mainnet.)
  8. Either click cancel or swipe down to dismiss account creation screen, you will still be at the network selection screen, and not be redirected to other screen.
  9. Repeat step 4 - 6
  10. Fill in all the information or leave them as they are then click Add to create a new account
  11. Observe that the account creation screen will be dismissed then network selection will be dismissed and the correct network has been selected.

Screenshots:

Simulator.Screen.Recording.-.iPhone.15.-.2023-09-21.at.13.30.43.mp4
Simulator.Screen.Recording.-.iPhone.15.-.2023-09-21.at.13.33.37.mp4

Reviewer Checklist:

  • Issues include necessary QA labels:
    • QA/(Yes|No)
    • bug / enhancement
  • Necessary security reviews have taken place.
  • Adequate unit test coverage exists to prevent regressions.
  • Adequate test plan exists for QA to validate (if applicable).
  • Issue and pull request is assigned to a milestone (should happen at merge time).

…sset detail when this asset has no associated keyring has been .created.
…ng created in asset details screen and network selection screen.
@nuo-xu nuo-xu added this to the 1.58 milestone Sep 21, 2023
@nuo-xu nuo-xu requested a review from a team as a code owner September 21, 2023 17:34
@nuo-xu nuo-xu self-assigned this Sep 21, 2023
Copy link
Contributor

@StephenHeaps StephenHeaps left a comment

Choose a reason for hiding this comment

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

One small bug when cancelling add account request via Add Account modal:

cancel.add.account.mp4

This might make the onCancelAddAccount: {} comment irrelevant if we use that closure to clean buy/send/swap destination.

Sources/BraveWallet/Crypto/BuySendSwap/SendTokenView.swift Outdated Show resolved Hide resolved
Sources/BraveWallet/Crypto/Stores/NetworkStore.swift Outdated Show resolved Hide resolved
Sources/BraveWallet/Extensions/ViewExtensions.swift Outdated Show resolved Hide resolved
@nuo-xu nuo-xu merged commit ffba932 into development Sep 22, 2023
8 checks passed
@nuo-xu nuo-xu deleted the bugfix/no-filecoin-send branch September 22, 2023 00:19
arthuredelstein pushed a commit to brave/brave-core that referenced this pull request Feb 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect account opening Send from Filecoin asset detail
2 participants