Skip to content

Commit

Permalink
fix(sell): hide accounts with 0 balance
Browse files Browse the repository at this point in the history
  • Loading branch information
TheLeoB committed Dec 3, 2020
1 parent fc34dee commit b90d2e7
Showing 1 changed file with 14 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -145,16 +145,20 @@ const CryptoSelector: React.FC<InjectedFormProps<{}, Props> &
{orderType === 'SELL'
? coinOrder.map(coin => {
const accounts = props.accounts[coin] as Array<SwapAccountType>
return accounts.map(account => (
<CryptoAccountOption
account={account}
coins={props.coins}
isAccountSelected={false}
isSwap={false}
onClick={() => handleSell(account)}
walletCurrency={props.walletCurrency}
/>
))
return accounts.map(
account =>
account.balance !== '0' &&
account.balance !== 0 && (
<CryptoAccountOption
account={account}
coins={props.coins}
isAccountSelected={false}
isSwap={false}
onClick={() => handleSell(account)}
walletCurrency={props.walletCurrency}
/>
)
)
})
: props.pairs.map((value, index) => (
<CryptoItem
Expand Down

0 comments on commit b90d2e7

Please sign in to comment.