Skip to content

Commit

Permalink
add check for cointype
Browse files Browse the repository at this point in the history
  • Loading branch information
kingpinXD committed Oct 9, 2023
1 parent fc4198e commit 509b655
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions x/crosschain/types/message_add_to_in_tx_tracker.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,9 @@ func (msg *MsgAddToInTxTracker) ValidateBasic() error {
if msg.Proof != nil && !chain.IsProvable() {
return errorsmod.Wrapf(ErrCannotVerifyProof, "chain id %d does not support proof-based trackers", msg.ChainId)
}
_, err = common.GetCoinType(msg.CoinType.String())
if err != nil {
return err
_, ok := common.CoinType_value[msg.CoinType.String()]
if !ok {
return errorsmod.Wrapf(ErrCannotVerifyProof, "coin-type not supported")
}

return nil
}

0 comments on commit 509b655

Please sign in to comment.