You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm looking at the evmos code. I think that func (k Keeper) DeleteTokenPair(ctx sdk.Context, tokenPair types.TokenPair), a function that deletes TokenPair, should delete not only id but also erc20Map and denomMap.
There is no problem with the current code progress, but if DeleteTokenPair is used elsewhere, there is a possibility that a bug may occur due to misunderstanding.(To be precise, only the id may be deleted and the mapping may remain)
So I suggest to delete all related mappings in the DeleteTokenPair function.
If this proposal is accepted, I will submit the modified code PR.
Version
all
Steps to Reproduce
Screenshots
Additional context
For Admin Use
Not duplicate issue
Appropriate labels applied
Appropriate contributors tagged
Contributor assigned/self-assigned
The text was updated successfully, but these errors were encountered:
@hea9549 Thanks for reporting this, this is great. We have no objections to this improvement. Please feel free to open a PR with the suggested changes and we'll review it.
Summary of Bug
I'm looking at the evmos code. I think that
func (k Keeper) DeleteTokenPair(ctx sdk.Context, tokenPair types.TokenPair)
, a function that deletes TokenPair, should delete not only id but also erc20Map and denomMap.func (k Keeper) UpdateTokenPairERC20(ctx sdk.Context, erc20Addr, newERC20Addr common.Address)
proceeds as follows:DeleteTokenPair
function,There is no problem with the current code progress, but if
DeleteTokenPair
is used elsewhere, there is a possibility that a bug may occur due to misunderstanding.(To be precise, only the id may be deleted and the mapping may remain)So I suggest to delete all related mappings in the
DeleteTokenPair
function.If this proposal is accepted, I will submit the modified code PR.
Version
all
Steps to Reproduce
Screenshots
Additional context
For Admin Use
The text was updated successfully, but these errors were encountered: