From 2f83fb05cf6a63f8a233d3c862bec12ce07f7607 Mon Sep 17 00:00:00 2001 From: Anthony Laibe Date: Thu, 24 Nov 2022 09:49:25 +0100 Subject: [PATCH] fix: app crash when owner return err --- services/ens/api.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/services/ens/api.go b/services/ens/api.go index e46a0202b..edee5efba 100644 --- a/services/ens/api.go +++ b/services/ens/api.go @@ -121,7 +121,7 @@ func (api *API) OwnerOf(ctx context.Context, chainID uint64, username string) (* callOpts := &bind.CallOpts{Context: ctx, Pending: false} owner, err := registry.Owner(callOpts, nameHash(username)) if err != nil { - return nil, nil + return nil, err } return &owner, nil @@ -205,7 +205,6 @@ func (api *API) usernameRegistrarAddr(ctx context.Context, chainID uint64) (comm log.Info("obtaining username registrar address") api.addrPerChainMutex.Lock() defer api.addrPerChainMutex.Unlock() - addr, ok := api.addrPerChain[chainID] if ok { return addr, nil