Skip to content

Commit eb0c8f0

Browse files
committed
fix zero balance detection
1 parent 0e1bc12 commit eb0c8f0

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

convex_api/convex_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ def get_balance(self, address_account, account_from=None):
150150

151151
result = self._transaction_query(address_from, line)
152152
except ConvexAPIError as error:
153-
if error.code != 'UNDECLARED':
153+
if error.code != 'NOBODY':
154154
raise
155155
else:
156156
value = result['value']

tests/intergration/test_ddo_register_contract.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ def test_contract_ddo_transfer(convex, test_account, other_account):
276276

277277
auto_topup_account(convex, test_account)
278278

279-
contract_address = convex.get_address('starfish-did-registry', test_account)
279+
contract_address = convex.get_address(CONTRACT_NAME, test_account)
280280
assert(contract_address)
281281

282282
did = f'0x{secrets.token_hex(32)}'
@@ -330,7 +330,7 @@ def test_contract_ddo_transfer(convex, test_account, other_account):
330330
assert(result['value'] == did)
331331

332332
def test_contract_ddo_bulk_register(convex, test_account):
333-
contract_address = convex.get_address('starfish-did-registry', test_account)
333+
contract_address = convex.get_address(CONTRACT_NAME, test_account)
334334
assert(contract_address)
335335

336336
for index in range(0, 2):
@@ -346,7 +346,7 @@ def test_contract_ddo_bulk_register(convex, test_account):
346346

347347
def test_contract_ddo_dump(convex, test_account, other_account):
348348

349-
contract_address = convex.get_address('starfish-did-registry', test_account)
349+
contract_address = convex.get_address(CONTRACT_NAME, test_account)
350350
assert(contract_address)
351351

352352
did_list = []

0 commit comments

Comments
 (0)