File tree Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -506,6 +506,23 @@ func staticAddressLoopIn(ctx *cli.Context) error {
506506 return cli .ShowCommandHelp (ctx , "in" )
507507 }
508508
509+ var selectedAmount int64
510+ switch {
511+ case ctx .NArg () == 1 :
512+ amt , err := parseAmt (ctx .Args ().Get (0 ))
513+ if err != nil {
514+ return err
515+ }
516+ selectedAmount = int64 (amt )
517+
518+ case ctx .NArg () > 1 :
519+ return fmt .Errorf ("only a single positional argument is " +
520+ "allowed" )
521+
522+ default :
523+ selectedAmount = ctx .Int64 ("amount" )
524+ }
525+
509526 client , cleanup , err := getClient (ctx )
510527 if err != nil {
511528 return err
@@ -516,7 +533,6 @@ func staticAddressLoopIn(ctx *cli.Context) error {
516533 ctxb = context .Background ()
517534 isAllSelected = ctx .IsSet ("all" )
518535 isUtxoSelected = ctx .IsSet ("utxo" )
519- selectedAmount = ctx .Int64 ("amount" )
520536 autoSelectDepositsForQuote bool
521537 label = ctx .String ("static-loop-in" )
522538 hints []* swapserverrpc.RouteHint
You can’t perform that action at this time.
0 commit comments