-
Notifications
You must be signed in to change notification settings - Fork 893
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
Binance widget no longer disconnects when offline. #5275
Conversation
… offline Fixes brave/brave-browser#9254 - Fixes convert time issues when going offline
@@ -387,7 +387,11 @@ class NewTabPage extends React.Component<Props, State> { | |||
|
|||
fetchBalance = () => { | |||
chrome.binance.getAccountBalances((balances: Record<string, string>, success: boolean) => { | |||
if (!success) { | |||
const hasBalances = Object.keys(balances).length |
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 will always be empty ({}
) in an offline response. Also, we shouldn't set auth to invalid if balances simply just don't come in anyway. The success
parameter is the correct thing to go off of for that.
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
Binance widget no longer disconnects when offline.
Also by consequence convert timers reset appropriately when dropping network connection.
Fixes: brave/brave-browser#9254
Fixes: brave/brave-browser#9253
Submitter Checklist:
npm run lint
)git rebase master
(if needed).git rebase -i
to squash commits (if needed).Test Plan:
Defined in issues.
Reviewer Checklist:
After-merge Checklist:
changes has landed on.