-
Notifications
You must be signed in to change notification settings - Fork 81
Open
Description
This is line 65 of keeper.go in the evm module of x.
func (k *Keeper) GetSeiAddressOrDefault(ctx sdk.Context, evmAddress common.Address) sdk.AccAddress {
addr, ok := k.GetSeiAddress(ctx, evmAddress)
if ok {
return addr
}
return sdk.AccAddress(evmAddress[:])
}GetSeiAddressOrDefault is a function that gets the sei address from the address of evm.
However, because it is not associated, return sdk.AccAddress(evmAddress[:]) in line 70 is activated when it is not stored in the kv store.
This puts the bytes of evmAddress into sdk.AccAddress.
Therefore, accAddress obtained based on publicKey and sdk.AccAddress made from bytes of evmAddress are different.
The sei address result of GetSeiAddressOrDefault before associate and the sei address result after associate are different.
How about returning zero address (0x000...) to indicate that it is not associate yet? Was the above situation intentional?
If it is a bug, I will upload a PR for the fix.
Metadata
Metadata
Assignees
Labels
No labels