fix: get collectibles failure when using testnet
This commit is contained in:
parent
983d258a9a
commit
484c647f39
|
@ -71,6 +71,8 @@ proc getEthermons*(address: EthAddress): seq[Collectible] =
|
||||||
result = @[]
|
result = @[]
|
||||||
try:
|
try:
|
||||||
let contract = getContract("ethermon")
|
let contract = getContract("ethermon")
|
||||||
|
if contract == nil: return
|
||||||
|
|
||||||
let tokens = tokensOfOwnerByIndex(contract, address)
|
let tokens = tokensOfOwnerByIndex(contract, address)
|
||||||
|
|
||||||
if (tokens.len == 0):
|
if (tokens.len == 0):
|
||||||
|
@ -95,6 +97,8 @@ proc getKudos*(address: EthAddress): seq[Collectible] =
|
||||||
result = @[]
|
result = @[]
|
||||||
try:
|
try:
|
||||||
let contract = getContract("kudos")
|
let contract = getContract("kudos")
|
||||||
|
if contract == nil: return
|
||||||
|
|
||||||
let tokens = tokensOfOwnerByIndex(contract, address)
|
let tokens = tokensOfOwnerByIndex(contract, address)
|
||||||
|
|
||||||
if (tokens.len == 0):
|
if (tokens.len == 0):
|
||||||
|
|
Loading…
Reference in New Issue