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

Expose swap web ui on Android #17271

Merged
merged 4 commits into from
Feb 23, 2023
Merged

Conversation

vadimstruts
Copy link
Collaborator

@vadimstruts vadimstruts commented Feb 17, 2023

Implemented loading the "Swap" React page on android. It uses more or less the same front end code, so should look like the same page on desktop.

When next url: brave://wallet/swap is entered in address field, the same Swap page like on desktop is opened

But there is one requirement: your brave wallet should be initialized

Swap page interacts with the same back end like android wallet

Resolves brave/brave-browser#28102

Submitter Checklist:

  • I confirm that no security/privacy review is needed, or that I have requested one
  • There is a Expose swap web ui on Android brave-browser#28102 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:

@vadimstruts vadimstruts requested a review from a team as a code owner February 17, 2023 15:18
@github-actions github-actions bot added CI/storybook-url Deploy storybook and provide a unique URL for each build potential-layer-violation-fixes This PR touches a BUILD.gn file with check_includes=false labels Feb 17, 2023
@brave-builds
Copy link
Collaborator

A Storybook has been deployed to preview UI for the latest push

@brave-builds
Copy link
Collaborator

A Storybook has been deployed to preview UI for the latest push

@vadimstruts vadimstruts force-pushed the 28102-expose-swap-web-ui-on-android-2 branch 2 times, most recently from c16ddbe to ad309f9 Compare February 20, 2023 10:24
@brave-builds
Copy link
Collaborator

A Storybook has been deployed to preview UI for the latest push

@vadimstruts vadimstruts force-pushed the 28102-expose-swap-web-ui-on-android-2 branch from ad309f9 to 223bfff Compare February 20, 2023 15:09
@brave-builds
Copy link
Collaborator

A Storybook has been deployed to preview UI for the latest push

@brave-builds
Copy link
Collaborator

A Storybook has been deployed to preview UI for the latest push

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.

++

@vadimstruts vadimstruts force-pushed the 28102-expose-swap-web-ui-on-android-2 branch 2 times, most recently from 03c663b to b9a6f3a Compare February 23, 2023 11:00
@brave-builds
Copy link
Collaborator

A Storybook has been deployed to preview UI for the latest push

@vadimstruts vadimstruts force-pushed the 28102-expose-swap-web-ui-on-android-2 branch from b9a6f3a to ad8a77d Compare February 23, 2023 13:18
@brave-builds
Copy link
Collaborator

A Storybook has been deployed to preview UI for the latest push

Signed-off-by: Vadym Struts <vstruts@brave.com>
Signed-off-by: Vadym Struts <vstruts@brave.com>
Signed-off-by: Vadym Struts <vstruts@brave.com>
@vadimstruts vadimstruts force-pushed the 28102-expose-swap-web-ui-on-android-2 branch from ad8a77d to 42c7988 Compare February 23, 2023 15:30
Signed-off-by: Vadym Struts <vstruts@brave.com>
@vadimstruts vadimstruts force-pushed the 28102-expose-swap-web-ui-on-android-2 branch from 42c7988 to 74321b0 Compare February 23, 2023 16:07
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.

++ Front-end

@brave-builds
Copy link
Collaborator

A Storybook has been deployed to preview UI for the latest push

@vadimstruts vadimstruts added this to the 1.50.x - Nightly milestone Feb 23, 2023
@vadimstruts vadimstruts merged commit 9a4fd38 into master Feb 23, 2023
@vadimstruts vadimstruts deleted the 28102-expose-swap-web-ui-on-android-2 branch February 23, 2023 20:26
#endif
#if BUILDFLAG(IS_ANDROID)
} else if (url.is_valid() &&
(url.spec() == base::StringPrintf("%s://%s",
Copy link
Collaborator

Choose a reason for hiding this comment

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

this is not the correct way to build a URL, but regardless here you should be checking the host and path

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI/storybook-url Deploy storybook and provide a unique URL for each build potential-layer-violation-fixes This PR touches a BUILD.gn file with check_includes=false
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Expose swap web ui on Android
6 participants