Skip to content

Commit

Permalink
fix tradeshield execute-order cli (#1013)
Browse files Browse the repository at this point in the history
Co-authored-by: Amit Yadav <amy29981@gmail.com>
  • Loading branch information
99adarsh and amityadav0 authored Dec 3, 2024
1 parent 6df9463 commit f8a8f7f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions x/tradeshield/client/cli/tx_execute_orders.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ func CmdExecuteOrders() *cobra.Command {
Args: cobra.ExactArgs(2),
RunE: func(cmd *cobra.Command, args []string) (err error) {
argCastSpotOrderIds := strings.Split(args[0], listSeparator)
if len(argCastSpotOrderIds) == 1 && argCastSpotOrderIds[0] == "" {
argCastSpotOrderIds = []string{}
}
argSpotOrderIds := make([]uint64, len(argCastSpotOrderIds))
for i, arg := range argCastSpotOrderIds {
value, err := cast.ToUint64E(arg)
Expand All @@ -31,6 +34,9 @@ func CmdExecuteOrders() *cobra.Command {
argSpotOrderIds[i] = value
}
argCastPerpetualOrderIds := strings.Split(args[1], listSeparator)
if len(argCastPerpetualOrderIds) == 1 && argCastPerpetualOrderIds[0] == "" {
argCastPerpetualOrderIds = []string{}
}
argPerpetualOrderIds := make([]uint64, len(argCastPerpetualOrderIds))
for i, arg := range argCastPerpetualOrderIds {
value, err := cast.ToUint64E(arg)
Expand Down

0 comments on commit f8a8f7f

Please sign in to comment.