BUG: marketplace: balance returns different types

This commit is contained in:
Victor Grau Serrat
2018-02-07 21:01:14 -07:00
parent 64e22ba27d
commit 7a89cfc02b
+4 -1
View File
@@ -246,7 +246,10 @@ class Marketplace:
)
})
balance = Web3.toInt(hexstr=balance)
try:
balance = Web3.toInt(balance) # web3 >= 4.0.0b7
except TypeError:
balance = Web3.toInt(hexstr=balance) # web3 <= 4.0.0b6
if balance > grains:
print('OK.')