fix: check if contract exists before getting address (#105)
Closes: #3963
This commit is contained in:
parent
3f242713e9
commit
b7872bc9cf
|
@ -320,7 +320,10 @@ proc setPubKey*(username, pubKey, address, gas, gasPrice: string, isEIP1559Enabl
|
||||||
|
|
||||||
proc statusRegistrarAddress*():string =
|
proc statusRegistrarAddress*():string =
|
||||||
let network = status_settings.getCurrentNetwork().toNetwork()
|
let network = status_settings.getCurrentNetwork().toNetwork()
|
||||||
result = $contracts.findContract(network.chainId, "ens-usernames").address
|
let contract = contracts.findContract(network.chainId, "ens-usernames")
|
||||||
|
if contract != nil:
|
||||||
|
return $contract.address
|
||||||
|
result = ""
|
||||||
|
|
||||||
type
|
type
|
||||||
ENSType* {.pure.} = enum
|
ENSType* {.pure.} = enum
|
||||||
|
|
Loading…
Reference in New Issue