Skip to content

Commit

Permalink
Merge pull request #5265 from brave/fix-9244
Browse files Browse the repository at this point in the history
Disconnects the Binance widget upon hiding
  • Loading branch information
ryanml authored Apr 16, 2020
2 parents e8dd766 + 3fa4591 commit 574b538
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions components/brave_new_tab_ui/containers/newTab/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,13 @@ class NewTabPage extends React.Component<Props, State> {
}

this.props.saveShowBinance(!showBinance)

// If we are about to hide the widget, disconnect
if (showBinance) {
chrome.binance.revokeToken(() => {
this.disconnectBinance()
})
}
}

setBinanceBalances = (balances: Record<string, string>) => {
Expand Down

0 comments on commit 574b538

Please sign in to comment.