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

feat(wallet): implement ramp network support #16558

Merged
merged 1 commit into from
Jan 10, 2023

Conversation

Pavneet-Sing
Copy link

@Pavneet-Sing Pavneet-Sing commented Jan 6, 2023

  • Remove wyre

Resolves brave/brave-browser#27678

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 wiki
    • npm run lint, npm run presubmit wiki, 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:

android-ramp-support.webm

Additional Info

@Pavneet-Sing Pavneet-Sing added CI/skip-linux CI/skip-macos-x64 Do not run CI builds for macOS x64 CI/skip-ios Do not run CI builds for iOS labels Jan 6, 2023
@Pavneet-Sing Pavneet-Sing self-assigned this Jan 6, 2023
@@ -967,12 +970,11 @@ public void onTextChanged(CharSequence s, int start, int before, int count) {
setSendToFromValueValidationResult(errorMessage, false, true);
});
}
} else if (mActivityType == ActivityType.BUY
&& mSelectedNetwork.chainId.equals(BraveWalletConstants.MAINNET_CHAIN_ID)) {
} else if (mActivityType == ActivityType.BUY) {
Copy link
Member

Choose a reason for hiding this comment

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

do we support buy on all networks including test nets? maybe we should exclude test chains in that place?

Copy link
Member

Choose a reason for hiding this comment

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

or it just gives an error Could not get buy URL in that case and we are ok?

Copy link
Author

Choose a reason for hiding this comment

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

Those are excluded here with allowBuy so the buy option is hidden for excluded networks.

BTW, in future, with more providers, we will have to show a message "buy not supported" based on the result of token list.

Copy link
Author

@Pavneet-Sing Pavneet-Sing Jan 6, 2023

Choose a reason for hiding this comment

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

Demo of excluded networks

ramp-excluded-networks.webm

Copy link
Member

Choose a reason for hiding this comment

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

ok, cool!

@Pavneet-Sing Pavneet-Sing force-pushed the feat-ramp-support-and-remove-wyre branch from 0764b44 to 9d6ee8a Compare January 9, 2023 07:54
Copy link
Member

@SergeyZhukovsky SergeyZhukovsky left a comment

Choose a reason for hiding this comment

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

++

@Pavneet-Sing Pavneet-Sing merged commit 1649502 into master Jan 10, 2023
@Pavneet-Sing Pavneet-Sing deleted the feat-ramp-support-and-remove-wyre branch January 10, 2023 07:39
@github-actions github-actions bot added this to the 1.49.x - Nightly milestone Jan 10, 2023
Pavneet-Sing pushed a commit that referenced this pull request Jan 10, 2023
Pavneet-Sing pushed a commit that referenced this pull request Jan 10, 2023
@srirambv
Copy link
Contributor

Verification passed on Lenovo Tab with Android 12 running 1.49.36 x64 Nightly build

  • Verified selecting Buy in the quick action shows Continue to Ramp
  • Verified clicking on Continue to Ramp loads the on-ramp page with the selected token prefilled
  • Verified if no amount is entered a default value is pre-populated on the on-ramp page
  • Verified selecting a token and clicking on Buy button shows Continue to Ramp to proceed to purchase
  • Verified able to select address in dropdown to change the deposit address on the on-ramp page
  • Verified on the on-ramp page can't change the token for which it is pre-populated
  • Encountered #27876 & #27877
16558.mp4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI/skip-ios Do not run CI builds for iOS CI/skip-macos-x64 Do not run CI builds for macOS x64
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Ramp network support and remove wyre
3 participants