Skip to content

Commit ef8b7b7

Browse files
committed
cli: rename --amount to --amt in static
loop static in --amt loop static withdraw --amt This is done to make it consistent with other commands and products. Keep --amount flag as an alias.
1 parent ab81ceb commit ef8b7b7

File tree

3 files changed

+30
-28
lines changed

3 files changed

+30
-28
lines changed

cmd/loop/staticaddr.go

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,8 @@ var withdrawalCommand = &cli.Command{
158158
"the transaction",
159159
},
160160
&cli.Uint64Flag{
161-
Name: "amount",
161+
Name: "amt",
162+
Aliases: []string{"amount"},
162163
Usage: "the number of satoshis that should be " +
163164
"withdrawn from the selected deposits. The " +
164165
"change is sent back to the static address",
@@ -211,7 +212,7 @@ func withdraw(ctx context.Context, cmd *cli.Command) error {
211212
All: isAllSelected,
212213
DestAddr: destAddr,
213214
SatPerVbyte: int64(cmd.Uint64("sat_per_vbyte")),
214-
Amount: int64(cmd.Uint64("amount")),
215+
Amount: int64(cmd.Uint64("amt")),
215216
})
216217
if err != nil {
217218
return err
@@ -473,7 +474,8 @@ var staticAddressLoopInCommand = &cli.Command{
473474
"parameters after the payment timed out.",
474475
},
475476
&cli.Uint64Flag{
476-
Name: "amount",
477+
Name: "amt",
478+
Aliases: []string{"amount"},
477479
Usage: "the number of satoshis that should be " +
478480
"swapped from the selected deposits. If there" +
479481
"is change it is sent back to the static " +
@@ -514,7 +516,7 @@ func staticAddressLoopIn(ctx context.Context, cmd *cli.Command) error {
514516
"allowed")
515517

516518
default:
517-
selectedAmount = int64(cmd.Uint64("amount"))
519+
selectedAmount = int64(cmd.Uint64("amt"))
518520
}
519521

520522
client, cleanup, err := getClient(ctx, cmd)

docs/loop.1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -503,7 +503,7 @@ Withdraw from static address deposits.
503503
\fB--all\fP: withdraws all static address deposits.
504504

505505
.PP
506-
\fB--amount\fP="": the number of satoshis that should be withdrawn from the selected deposits. The change is sent back to the static address (default: 0)
506+
\fB--amt, --amount\fP="": the number of satoshis that should be withdrawn from the selected deposits. The change is sent back to the static address (default: 0)
507507

508508
.PP
509509
\fB--dest_addr\fP="": the optional address that the withdrawn funds should be sent to, if let blank the funds will go to lnd's wallet
@@ -532,7 +532,7 @@ Loop in funds from static address deposits.
532532
\fB--all\fP: loop in all static address deposits.
533533

534534
.PP
535-
\fB--amount\fP="": the number of satoshis that should be swapped from the selected deposits. If thereis change it is sent back to the static address. (default: 0)
535+
\fB--amt, --amount\fP="": the number of satoshis that should be swapped from the selected deposits. If thereis change it is sent back to the static address. (default: 0)
536536

537537
.PP
538538
\fB--fast\fP: Usage: complete the swap faster by paying a higher fee, so the change output is available sooner

docs/loop.md

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -585,14 +585,14 @@ $ loop [GLOBAL FLAGS] static withdraw [COMMAND FLAGS] [ARGUMENTS...]
585585

586586
The following flags are supported:
587587

588-
| Name | Description | Type | Default value |
589-
|-----------------------|---------------------------------------------------------------------------------------------------------------------------|--------|:-------------:|
590-
| `--utxo="…"` | specify utxos as outpoints(tx:idx) which willbe withdrawn | string | `[]` |
591-
| `--all` | withdraws all static address deposits | bool | `false` |
592-
| `--dest_addr="…"` | the optional address that the withdrawn funds should be sent to, if let blank the funds will go to lnd's wallet | string |
593-
| `--sat_per_vbyte="…"` | (optional) a manual fee expressed in sat/vbyte that should be used when crafting the transaction | uint | `0` |
594-
| `--amount="…"` | the number of satoshis that should be withdrawn from the selected deposits. The change is sent back to the static address | uint | `0` |
595-
| `--help` (`-h`) | show help | bool | `false` |
588+
| Name | Description | Type | Default value |
589+
|--------------------------|---------------------------------------------------------------------------------------------------------------------------|--------|:-------------:|
590+
| `--utxo="…"` | specify utxos as outpoints(tx:idx) which willbe withdrawn | string | `[]` |
591+
| `--all` | withdraws all static address deposits | bool | `false` |
592+
| `--dest_addr="…"` | the optional address that the withdrawn funds should be sent to, if let blank the funds will go to lnd's wallet | string |
593+
| `--sat_per_vbyte="…"` | (optional) a manual fee expressed in sat/vbyte that should be used when crafting the transaction | uint | `0` |
594+
| `--amt="…"` (`--amount`) | the number of satoshis that should be withdrawn from the selected deposits. The change is sent back to the static address | uint | `0` |
595+
| `--help` (`-h`) | show help | bool | `false` |
596596

597597
### `static summary` subcommand (aliases: `s`)
598598

@@ -626,18 +626,18 @@ $ loop [GLOBAL FLAGS] static in [COMMAND FLAGS] [amt] [--all | --utxo xxx:xx]
626626

627627
The following flags are supported:
628628

629-
| Name | Description | Type | Default value |
630-
|-------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------|:-------------:|
631-
| `--utxo="…"` | specify the utxos of deposits as outpoints(tx:idx) that should be looped in | string | `[]` |
632-
| `--all` | loop in all static address deposits | bool | `false` |
633-
| `--payment_timeout="…"` | the maximum time in seconds that the server is allowed to take for the swap payment. The client can retry the swap with adjusted parameters after the payment timed out | duration | `0s` |
634-
| `--amount="…"` | the number of satoshis that should be swapped from the selected deposits. If thereis change it is sent back to the static address | uint | `0` |
635-
| `--fast` | Usage: complete the swap faster by paying a higher fee, so the change output is available sooner | bool | `false` |
636-
| `--last_hop="…"` | the pubkey of the last hop to use for this swap | string |
637-
| `--label="…"` | an optional label for this swap,limited to 500 characters. The label may not start with our reserved prefix: [reserved] | string |
638-
| `--route_hints="…"` | route hints that can each be individually used to assist in reaching the invoice's destination | string | `[]` |
639-
| `--private` | generates and passes routehints. Should be used if the connected node is only reachable via private channels | bool | `false` |
640-
| `--force` | Assumes yes during confirmation. Using this option will result in an immediate swap | bool | `false` |
641-
| `--verbose` (`-v`) | show expanded details | bool | `false` |
642-
| `--help` (`-h`) | show help | bool | `false` |
629+
| Name | Description | Type | Default value |
630+
|--------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------|:-------------:|
631+
| `--utxo="…"` | specify the utxos of deposits as outpoints(tx:idx) that should be looped in | string | `[]` |
632+
| `--all` | loop in all static address deposits | bool | `false` |
633+
| `--payment_timeout="…"` | the maximum time in seconds that the server is allowed to take for the swap payment. The client can retry the swap with adjusted parameters after the payment timed out | duration | `0s` |
634+
| `--amt="…"` (`--amount`) | the number of satoshis that should be swapped from the selected deposits. If thereis change it is sent back to the static address | uint | `0` |
635+
| `--fast` | Usage: complete the swap faster by paying a higher fee, so the change output is available sooner | bool | `false` |
636+
| `--last_hop="…"` | the pubkey of the last hop to use for this swap | string |
637+
| `--label="…"` | an optional label for this swap,limited to 500 characters. The label may not start with our reserved prefix: [reserved] | string |
638+
| `--route_hints="…"` | route hints that can each be individually used to assist in reaching the invoice's destination | string | `[]` |
639+
| `--private` | generates and passes routehints. Should be used if the connected node is only reachable via private channels | bool | `false` |
640+
| `--force` | Assumes yes during confirmation. Using this option will result in an immediate swap | bool | `false` |
641+
| `--verbose` (`-v`) | show expanded details | bool | `false` |
642+
| `--help` (`-h`) | show help | bool | `false` |
643643

0 commit comments

Comments
 (0)