diff --git a/types/utils_test.go b/types/utils_test.go index 111545c631..aa9268b711 100644 --- a/types/utils_test.go +++ b/types/utils_test.go @@ -25,6 +25,11 @@ func TestIsSupportedKeys(t *testing.T) { pk cryptotypes.PubKey isSupported bool }{ + { + "nil key", + nil, + false, + }, { "ethsecp256k1 key", ðsecp256k1.PubKey{}, diff --git a/x/recovery/keeper/ibc_callbacks.go b/x/recovery/keeper/ibc_callbacks.go index e40ec4fd3a..b2c04073a6 100644 --- a/x/recovery/keeper/ibc_callbacks.go +++ b/x/recovery/keeper/ibc_callbacks.go @@ -88,9 +88,7 @@ func (k Keeper) OnRecvPacket( // Case 2. sender pubkey is a supported key (eth_secp256k1, amino multisig, ed25519) // ==> Continue and return success ACK as the funds are not stuck on chain - if account != nil && - account.GetPubKey() != nil && - evmos.IsSupportedKey(account.GetPubKey()) { + if account != nil && evmos.IsSupportedKey(account.GetPubKey()) { return ack }