This repository was archived by the owner on Feb 18, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -92,17 +92,21 @@ export class MenuWallet extends React.Component<WalletProps, WalletState> {
9292 { Object . keys ( tokens ) . map ( ( addressKey : any ) => {
9393 if ( ! addressToSymbolDecimal [ addressKey ] ) return null
9494 const { name, decimals } = addressToSymbolDecimal [ addressKey ]
95+ const tokenBalAvailable = tokens [ addressKey ] . gt ( 0 )
96+ const dxTokenAvailable = dxBalances [ addressKey ]
97+ const dxTokenBalAvailable = dxTokenAvailable && dxBalances [ addressKey ] . gt ( 0 )
98+
9599 return (
96- tokens [ addressKey ] . gt ( 0 ) &&
100+ ( tokenBalAvailable || dxTokenBalAvailable ) &&
97101 < tr key = { addressKey } >
98102 < td > { name || 'Unknown' } </ td >
99103 < td > { ( tokens [ addressKey ] ) . div ( 10 ** decimals ) . toFixed ( FIXED_DECIMALS ) } </ td >
100104
101105 { // Conditionally render dxBalances column
102106 dxBalancesAvailable &&
103- < td className = { dxBalances [ addressKey ] && dxBalances [ addressKey ] . gt ( 0 ) ? 'withPic' : '' } >
104- { dxBalances [ addressKey ] && dxBalances [ addressKey ] . div ( 10 ** decimals ) . toFixed ( FIXED_DECIMALS ) }
105- { dxBalances [ addressKey ] && dxBalances [ addressKey ] . gt ( 0 ) &&
107+ < td className = { dxTokenBalAvailable ? 'withPic' : '' } >
108+ { dxTokenAvailable && dxBalances [ addressKey ] . div ( 10 ** decimals ) . toFixed ( FIXED_DECIMALS ) }
109+ { dxTokenBalAvailable &&
106110 < img
107111 src = { require ( 'assets/claim.svg' ) }
108112 onClick = { ( ) => withdrawFromDutchX ( { name, address : addressKey } ) }
You can’t perform that action at this time.
0 commit comments