Check totalBalance > 0 // Better account selection (#3347)

Former-commit-id: cc2aa32c6b4b0a466e47eeb63271db7f13592047
This commit is contained in:
Nicolas Gotchac
2016-11-10 18:46:03 +01:00
committed by arkpar
parent e018395c05
commit 3bcf8a84ce
3 changed files with 18 additions and 4 deletions

View File

@@ -75,7 +75,7 @@ const validateTokenAddress = (address, contract, simple) => {
return getTokenTotalSupply(address)
.then(balance => {
if (balance === null) {
if (balance === null || balance.equals(0)) {
return {
error: ERRORS.invalidTokenAddress,
valid: false