forked from Canto-Network/Canto
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: wrong denom check at RegisterCoin
problem: - `coinMetadata.Base` is used as the denom for the token pair - However, the check is incorrectly performed using `coinMetadata.Name`, so it fails to detect if the denom is already registered solution: check using `coinMetadata.Base`, not `.Name` more context: Unfortunately, there is already one case on the mainnet where multiple token pairs exist for the same denom(= ibc/13B6057538B93225F6EBACCB64574C49B2C1568C5AE6CCFE0A039D7DAC02BF29). However, this is not a major issue because only the latest token pair registered in the denom index is actually used. With this patch, such cases will no longer occur.
- Loading branch information
Showing
3 changed files
with
66 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters