Skip to content

Commit

Permalink
fix: gmp relay cli (#324)
Browse files Browse the repository at this point in the history
  • Loading branch information
adamewozniak authored Nov 20, 2023
1 parent 9f60fe5 commit 24e7196
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions x/gmp/client/cli/tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,9 @@ func GetCmdRelay() *cobra.Command {
return fmt.Errorf("denoms cannot be empty")
}

coin := sdk.Coin{}
tokens := sdk.Coin{}
// normalize the coin denom
fmt.Println(args[7])
if args[7] != "" {
coin, err := sdk.ParseCoinNormalized(args[7])
if err != nil {
Expand All @@ -76,6 +77,7 @@ func GetCmdRelay() *cobra.Command {
denomTrace := ibctransfertypes.ParseDenomTrace(coin.Denom)
coin.Denom = denomTrace.IBCDenom()
}
tokens = coin
}

// convert denoms to string array
Expand All @@ -101,7 +103,7 @@ func GetCmdRelay() *cobra.Command {
args[0], // destination-chain e.g. "Ethereum"
args[1], // ojo-contract-address e.g. "0x001"
args[2], // customer-contract-address e.g. "0x002"
coin, // amount
tokens, // amount
denoms, // denoms
commandSelector, // command-selector
commandParams, // command-params
Expand Down

0 comments on commit 24e7196

Please sign in to comment.