Skip to content
This repository has been archived by the owner on Jul 30, 2024. It is now read-only.

Commit

Permalink
fix: wrong denom check at RegisterCoin
Browse files Browse the repository at this point in the history
Check registered denom using `coinMetadata.Base` not `.Name`
details: b-harvest@d01eab0
  • Loading branch information
jasonsong0 committed Jul 29, 2024
1 parent 8f9f0f1 commit 2fddce8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion x/erc20/keeper/proposals.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func (k Keeper) RegisterCoin(
}

// Check if denomination is already registered
if k.IsDenomRegistered(ctx, coinMetadata.Name) {
if k.IsDenomRegistered(ctx, coinMetadata.Base) {
return nil, sdkerrors.Wrapf(
types.ErrTokenPairAlreadyExists, "coin denomination already registered: %s", coinMetadata.Name,
)
Expand Down

0 comments on commit 2fddce8

Please sign in to comment.