-
Notifications
You must be signed in to change notification settings - Fork 868
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
Introduces FetchBalanceResult
.
#17480
Introduces FetchBalanceResult
.
#17480
Conversation
9ba926d
to
67339ce
Compare
components/brave_rewards/resources/internals/components/general.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.
LGTM
018c059
to
8f15a41
Compare
A Storybook has been deployed to preview UI for the latest push |
cf4fbea
to
1018d93
Compare
A Storybook has been deployed to preview UI for the latest push |
A Storybook has been deployed to preview UI for the latest push |
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.
Android changes LGTM
fc00389
to
59f4e1e
Compare
FetchBalanceResult
.FetchBalanceResult
.
A Storybook has been deployed to preview UI for the latest push |
A Storybook has been deployed to preview UI for the latest push |
Verification PASSED on
1. Before enabling rewards2. After enabling rewards3. After connecting a custodial wallet
4. Logged out state
5. Fail the fetch balance request
|
If uplifted also uplift #17628 |
* Uplift of #17480 (squashed) to beta * [iOS] Add flag to control namespace generation for Obj-C mojom wrappers * Remove note from Reset Rewards modal --------- Co-authored-by: Kyle Hickinson <[email protected]> Co-authored-by: Emerick Rogul <[email protected]>
Resolves brave/brave-browser#28793.
This PR introduces the
base::expected<>
-style API for thefetch balance
flow, which makes it easier to add new error conditions on the backend (or fine-tune any existing ones), and to reflect them in the UI.The rest of the external wallet provider flows (
connect external wallet
,get external wallet
) already leveragebase::expected<>
-style APIs, except for external wallet transactions (BitFlyerTransfer
,GeminiTransfer
,UpholdTransfer
), which go through the contribution engine.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 lint
,npm 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:
Before enabling Rewards, there's no balance info displayed on Rewards Internals anymore:
After enabling Rewards but before connecting a custodial wallet service, we only display vBAT balance on Rewards Internals (and the
Connect account
UI on the Rewards page/Rewards panel/Rewards NTP widget):After connecting a custodial wallet service, we display both the vBAT/external wallet balance on Rewards Internals (and show the total balance on the Rewards page/Rewards panel/Rewards NTP widget):
In the logged out state, we only show vBAT balance on Rewards Internals (and the
Logged out
UI on the Rewards page/Rewards panel/Rewards NTP widget, including the tipping banner —:( You are currently logged out.
):On an error coming from a custodial wallet service balance endpoint, we show a spinner for both the vBAT/external wallet balance on Rewards Internals (and a spinner on the Rewards page/Rewards panel/Rewards NTP widget, except for the tipping banner, where we show the
Server connection error
UI):