fix: get collectibles failure when using testnet

This commit is contained in:
Richard Ramos 2020-07-30 12:23:42 -04:00
parent 983d258a9a
commit 484c647f39
No known key found for this signature in database
GPG Key ID: 80D4B01265FDFE8F
1 changed files with 4 additions and 0 deletions

View File

@ -71,6 +71,8 @@ proc getEthermons*(address: EthAddress): seq[Collectible] =
result = @[]
try:
let contract = getContract("ethermon")
if contract == nil: return
let tokens = tokensOfOwnerByIndex(contract, address)
if (tokens.len == 0):
@ -95,6 +97,8 @@ proc getKudos*(address: EthAddress): seq[Collectible] =
result = @[]
try:
let contract = getContract("kudos")
if contract == nil: return
let tokens = tokensOfOwnerByIndex(contract, address)
if (tokens.len == 0):