WA-232 Fix Enabling Withdraw button when there is ETH funds

This commit is contained in:
apanizo 2018-07-11 13:46:33 +02:00
parent 84057d03ee
commit a5b03007a9
1 changed files with 4 additions and 4 deletions

View File

@ -42,13 +42,13 @@ const listStyle = {
width: '100%', width: '100%',
} }
const getEthBalanceFrom = (balances: Map<string, Token>) => { const getEthBalanceFrom = (tokens: List<Token>) => {
const ethBalance = balances.get('ETH') const ethToken = tokens.filter(token => token.get('symbol') === 'ETH')
if (!ethBalance) { if (ethToken.count() === 0) {
return 0 return 0
} }
return Number(ethBalance.get('funds')) return Number(ethToken.get(0).get('funds'))
} }
class GnoSafe extends React.PureComponent<SafeProps, State> { class GnoSafe extends React.PureComponent<SafeProps, State> {