-
Notifications
You must be signed in to change notification settings - Fork 892
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
Fix UI issues when migrating from rewards JSON to prefs #6057
Conversation
23fea15
to
da78793
Compare
da78793
to
a644af4
Compare
@@ -88,8 +88,11 @@ class SettingsPage extends React.Component<Props, State> { | |||
componentDidUpdate (prevProps: Props, prevState: State) { | |||
if ( | |||
this.props.rewardsData.enabledMain && | |||
prevProps.rewardsData.initializing && | |||
!this.props.rewardsData.initializing | |||
( |
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.
This change fixes an edge case where startRewards is not called if initializing is not transitioning from true to false.
@@ -76,7 +76,7 @@ interface BatLedger { | |||
OnTimer(uint32 timer_id); | |||
|
|||
GetBalanceReport(ledger.mojom.ActivityMonth month, int32 year) => | |||
(ledger.mojom.Result result, ledger.mojom.BalanceReportInfo report); | |||
(ledger.mojom.Result result, ledger.mojom.BalanceReportInfo? report); |
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.
This change fixes a debug crash which occurs GetBalanceReport
is called and an error condition is encountered.
@@ -298,7 +298,7 @@ | |||
"@types/storybook__react": "^4.0.2", | |||
"acorn": "^7.1.1", | |||
"babel-loader": "^8.1.0", | |||
"brave-ui": "github:brave/brave-ui#303a9d6424950a31836902f9bf2c03a0c174efda", | |||
"brave-ui": "github:brave/brave-ui#36f3cd135399060641123136feb8253e53d68499", |
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.
This version bump fixes an issue with the Select
component.
@@ -45,6 +45,11 @@ void Balance::Fetch(ledger::FetchBalanceCallback callback) { | |||
} | |||
|
|||
std::string payment_id = ledger_->GetPaymentId(); | |||
if (payment_id.empty()) { |
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.
This changes fixes an issue where the wallet endpoint can be requested with an empty payment ID path component.
@@ -68,7 +68,12 @@ export const rewardsPanelReducer: Reducer<RewardsExtension.State | undefined> = | |||
}) | |||
} else if (result === RewardsExtension.Result.WALLET_CORRUPT) { | |||
state.walletCorrupted = true | |||
} else if (result !== RewardsExtension.Result.LEDGER_OK) { | |||
} else if (result === RewardsExtension.Result.LEDGER_OK) { |
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.
This change fixes an issue where the panel will display the welcome UI after a migration, even when rewards is enabled.
Resolves brave/brave-browser#10717
Submitter Checklist:
npm run lint
)git rebase master
(if needed).git rebase -i
to squash commits (if needed).Test Plan:
Reviewer Checklist:
After-merge Checklist:
changes has landed on.