Skip to content

Commit

Permalink
fix redundant code
Browse files Browse the repository at this point in the history
  • Loading branch information
trinitys7 committed Oct 18, 2024
1 parent 5f409a9 commit 02e5c13
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions x/bridge/client/cli/tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,11 @@ func CmdBridgeIn() *cobra.Command {
return err
}

coins, err := sdk.ParseCoinsNormalized(args[0])
coin, err := sdk.ParseCoinNormalized(args[0])
if err != nil {
return err
}

if len(coins) != 1 {
return fmt.Errorf("expected 1 coin, got %d", len(coins))
}

coin := coins[0]
if err = coin.Validate(); err != nil {
return err
}
Expand Down Expand Up @@ -82,16 +77,11 @@ func CmdBridgeOut() *cobra.Command {
return err
}

coins, err := sdk.ParseCoinsNormalized(args[0])
coin, err := sdk.ParseCoinNormalized(args[0])
if err != nil {
return err
}

if len(coins) != 1 {
return fmt.Errorf("expected 1 coin, got %d", len(coins))
}

coin := coins[0]
if err = coin.Validate(); err != nil {
return err
}
Expand Down

0 comments on commit 02e5c13

Please sign in to comment.