Skip to content
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

Use only filecoin mainnet by default #13732

Merged
merged 4 commits into from
Jun 13, 2022
Merged

Use only filecoin mainnet by default #13732

merged 4 commits into from
Jun 13, 2022

Conversation

cypt4
Copy link
Collaborator

@cypt4 cypt4 commented Jun 10, 2022

Use only filecoin mainnet by default
Resolves brave/brave-browser#23367
Put filecoin testnet under feature flag, mainnet is by default

Submitter Checklist:

  • I confirm that no security/privacy review is needed, or that I have requested one
  • There is a ticket for my issue
  • Used Github auto-closing keywords in the PR description above
  • Wrote a good PR/commit description
  • Squashed any review feedback or "fixup" commits before merge, so that history is a record of what happened in the repo, not your PR
  • Added appropriate labels (QA/Yes or QA/No; release-notes/include or release-notes/exclude; OS/...) to the associated issue
  • Checked the PR locally: npm run test -- brave_browser_tests, npm run test -- brave_unit_tests, npm run lint, npm run gn_check, npm run tslint
  • Ran git rebase master (if needed)

Reviewer Checklist:

  • A security review is not needed, or a link to one is included in the PR description
  • New files have MPL-2.0 license header
  • Adequate test coverage exists to prevent regressions
  • Major classes, functions and non-trivial code blocks are well-commented
  • Changes in component dependencies are properly reflected in gn
  • Code follows the style guide
  • Test plan is specified in PR before merging

After-merge Checklist:

Test Plan:

  1. Create new wallet
  2. Check that there is no filecoin testnet or localhost in network list.
  3. Add filecoin acc with different ways(via create, import and hardware import).
  4. Check that all dialogs don't contain network chooser and will create filenet account.
  5. Check that all accounts starts with 'f'.
  6. Make filecoin transaction to created accounts and then back from account with mainnet filecoins.

Please note that there may be artifacts when update brave with existed filecoin accs created before this PR, but it is ok because real users don't have filecoin accs yet.

@cypt4 cypt4 requested a review from a team as a code owner June 10, 2022 13:57
@cypt4 cypt4 changed the title Brave 23367 Use only filecoin mainnet by default Jun 10, 2022
@yrliou yrliou self-requested a review June 10, 2022 14:18
@cypt4 cypt4 assigned cypt4 and unassigned spylogsster and cypt4 Jun 10, 2022
@cypt4 cypt4 force-pushed the brave_23367 branch 4 times, most recently from 3c2ba0d to 6d2defc Compare June 12, 2022 13:49
@cypt4 cypt4 requested a review from spylogsster June 13, 2022 08:48
@cypt4 cypt4 force-pushed the brave_23367 branch 2 times, most recently from 290a0ce to e7fa077 Compare June 13, 2022 13:36
Comment on lines +142 to +144
IsFilecoinTestnetEnabled() ? mojom::kFilecoinTestnet
: mojom::kFilecoinMainnet)
Copy link
Member

Choose a reason for hiding this comment

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

As mentioned in DM, please add comment here to explain why this is fine for now.

Copy link
Member

@yrliou yrliou left a comment

Choose a reason for hiding this comment

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

LGTM

Resoves brave/brave-browser#23367
Put filecoin testnet under feature flag, mainnet is by default
Copy link
Contributor

@Douglashdaniel Douglashdaniel left a comment

Choose a reason for hiding this comment

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

Can we update this line
https:/brave/brave-core/blob/master/components/brave_wallet_ui/components/desktop/network-filter-selector/index.tsx#L94

to something like this

{/* Disabled Filecoin Submenu until testnetworks are enabled */}
{isTestNetworksEnabled && network.coin !== BraveWallet.CoinType.FIL &&

That away it will prevent this Submenu for Filecoin until test networks are supported.

Screen Shot 2022-06-13 at 12 55 52 PM

@cypt4
Copy link
Collaborator Author

cypt4 commented Jun 13, 2022

Done

Copy link
Contributor

@Douglashdaniel Douglashdaniel left a comment

Choose a reason for hiding this comment

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

LGTM

@yrliou yrliou merged commit f148ec6 into master Jun 13, 2022
@yrliou yrliou deleted the brave_23367 branch June 13, 2022 20:17
@github-actions github-actions bot added this to the 1.41.x - Nightly milestone Jun 13, 2022
yrliou added a commit that referenced this pull request Jun 13, 2022
 Use only filecoin mainnet by default
@srirambv
Copy link
Contributor

Verification passed on

Brave 1.41.61 Chromium: 103.0.5060.42 (Official Build) nightly (64-bit)
Revision de0d840bf9439c31bd86bf74f065c31fdf9b208d-refs/branch-heads/5060@{#667}
OS Windows 11 Version 21H2 (Build 22000.708)
  • Verified test plan from PR
  • Verified only mainnet account for Filecoin is created
  • Verified importing via hardware key works fine
  • Verified when testnets are enabled, there is not Filecoin Testnet or Filecoin Localhost is shown in the network selector dropdown
  • Encountered #23441
Create Account Import from Ledger Testnets
13762-Create.Account.mp4
13762-Import.from.Ledger.mp4
13762-Testnets.mp4

@srirambv
Copy link
Contributor

srirambv commented Jun 14, 2022

Still need to verify the transactions on mainnet. Should be ready for uplift once its done.

Edit: Verified sending FIL coin on mainnet works fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Disable Filecoin testnets
5 participants