Skip to content

Commit

Permalink
Fixes brave/brave-browser#11959 - Ensures both bitcoin.com dropdowns …
Browse files Browse the repository at this point in the history
…aren't open at the same time
  • Loading branch information
ryanml committed Oct 2, 2020
1 parent 2e20a4c commit f1b74bd
Showing 1 changed file with 20 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,18 @@ class BitcoinDotCom extends React.PureComponent<Props, State> {
}

toggleAssetsShowing = () => {
const { assetsShowing } = this.state

if (!assetsShowing) {
this.setState({
fiatCurrenciesShowing: false
})
}

this.setState({
assetsShowing: !this.state.assetsShowing
assetsShowing: !assetsShowing
})

this.props.onInteraction()
}

Expand All @@ -97,9 +106,18 @@ class BitcoinDotCom extends React.PureComponent<Props, State> {
}

toggleFiatCurrenciesShowing = () => {
const { fiatCurrenciesShowing } = this.state

if (!fiatCurrenciesShowing) {
this.setState({
assetsShowing: false
})
}

this.setState({
fiatCurrenciesShowing: !this.state.fiatCurrenciesShowing
fiatCurrenciesShowing: !fiatCurrenciesShowing
})

this.props.onInteraction()
}

Expand Down

0 comments on commit f1b74bd

Please sign in to comment.