Skip to content
This repository has been archived by the owner on Nov 16, 2023. It is now read-only.

Commit

Permalink
Revert "update bank send cli command generator"
Browse files Browse the repository at this point in the history
This reverts commit 5df6adc.
  • Loading branch information
ValarDragon committed Jan 27, 2022
1 parent 855fcf8 commit 9d69b7b
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions x/bank/client/cli/tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,21 +38,18 @@ ignored as it is implied from [from_key_or_address].`,
if err != nil {
return err
}

coins, err := sdk.ParseCoinsNormalized(args[2])
toAddr, err := sdk.AccAddressFromBech32(args[1])
if err != nil {
return err
}

msg := &types.MsgSend{
FromAddress: clientCtx.GetFromAddress().String(),
ToAddress: args[1],
Amount: coins,
}
if err := msg.ValidateBasic(); err != nil {
coins, err := sdk.ParseCoinsNormalized(args[2])
if err != nil {
return err
}

msg := types.NewMsgSend(clientCtx.GetFromAddress(), toAddr, coins)

return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg)
},
}
Expand Down

0 comments on commit 9d69b7b

Please sign in to comment.