@@ -478,13 +478,6 @@ var staticAddressLoopInCommand = cli.Command{
478478 "The client can retry the swap with adjusted " +
479479 "parameters after the payment timed out." ,
480480 },
481- cli.Uint64Flag {
482- Name : "amount" ,
483- Usage : "the number of satoshis that should be " +
484- "swapped from the selected deposits. If there" +
485- "is change it is sent back to the static " +
486- "address." ,
487- },
488481 cli.BoolFlag {
489482 Name : "fast" ,
490483 Usage : "expedited publishing of the change output if " +
@@ -506,6 +499,18 @@ func staticAddressLoopIn(ctx *cli.Context) error {
506499 return cli .ShowCommandHelp (ctx , "in" )
507500 }
508501
502+ var selectedAmount int64
503+ if ctx .NArg () == 1 {
504+ amt , err := parseAmt (ctx .Args ().Get (0 ))
505+ if err != nil {
506+ return err
507+ }
508+ selectedAmount = int64 (amt )
509+ } else if ctx .NArg () > 1 {
510+ return fmt .Errorf ("only a single positional argument is " +
511+ "allowed" )
512+ }
513+
509514 client , cleanup , err := getClient (ctx )
510515 if err != nil {
511516 return err
@@ -516,7 +521,6 @@ func staticAddressLoopIn(ctx *cli.Context) error {
516521 ctxb = context .Background ()
517522 isAllSelected = ctx .IsSet ("all" )
518523 isUtxoSelected = ctx .IsSet ("utxo" )
519- selectedAmount = ctx .Int64 ("amount" )
520524 autoSelectDepositsForQuote bool
521525 label = ctx .String ("static-loop-in" )
522526 hints []* swapserverrpc.RouteHint
0 commit comments