WA-232 Fix Enabling Withdraw button when there is ETH funds
This commit is contained in:
parent
84057d03ee
commit
a5b03007a9
|
@ -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> {
|
||||||
|
|
Loading…
Reference in New Issue