diff --git a/src/components/MenuWallet/index.tsx b/src/components/MenuWallet/index.tsx index 13291760..2b1f3321 100644 --- a/src/components/MenuWallet/index.tsx +++ b/src/components/MenuWallet/index.tsx @@ -92,17 +92,21 @@ export class MenuWallet extends React.Component { {Object.keys(tokens).map((addressKey: any) => { if (!addressToSymbolDecimal[addressKey]) return null const { name, decimals } = addressToSymbolDecimal[addressKey] + const tokenBalAvailable = tokens[addressKey].gt(0) + const dxTokenAvailable = dxBalances[addressKey] + const dxTokenBalAvailable = dxTokenAvailable && dxBalances[addressKey].gt(0) + return ( - tokens[addressKey].gt(0) && + (tokenBalAvailable || dxTokenBalAvailable) && {name || 'Unknown'} {(tokens[addressKey]).div(10 ** decimals).toFixed(FIXED_DECIMALS)} {// Conditionally render dxBalances column dxBalancesAvailable && - - {dxBalances[addressKey] && dxBalances[addressKey].div(10 ** decimals).toFixed(FIXED_DECIMALS)} - {dxBalances[addressKey] && dxBalances[addressKey].gt(0) && + + {dxTokenAvailable && dxBalances[addressKey].div(10 ** decimals).toFixed(FIXED_DECIMALS)} + {dxTokenBalAvailable && withdrawFromDutchX({ name, address: addressKey })}