mirror of
https://github.com/wassname/catalyst.git
synced 2026-06-28 10:15:34 +08:00
BUG: marketplace: balance returns different types
This commit is contained in:
@@ -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.')
|
||||
|
||||
Reference in New Issue
Block a user