Skip to content

Commit

Permalink
multi: add accounts u --new_balance deprecation
Browse files Browse the repository at this point in the history
This commit adds a deprecation notice regarding the
`accounts update --new_balance` flag. This flag will be removed in the
next major release of lit.
  • Loading branch information
ViktorTigerstrom committed Feb 18, 2025
1 parent 819b0a5 commit faa27f2
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 6 deletions.
4 changes: 2 additions & 2 deletions cmd/litcli/accounts.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,8 @@ var updateAccountCommand = cli.Command{
},
cli.Int64Flag{
Name: "new_balance",
Usage: "The new balance of the account; -1 means do " +
"not update the balance.",
Usage: "(deprecated) The new balance of the account; " +
"-1 means do not update the balance.",
Value: -1,
},
cli.Int64Flag{
Expand Down
8 changes: 8 additions & 0 deletions docs/release-notes/release-notes-0.14.2.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,14 @@
specified amount.

### Technical and Architectural Updates

## RPC Updates

* The [`accounts update` `--new_balance` flag has been
deprecated](https://github.com/lightninglabs/lightning-terminal/pull/974).
Use the `accounts credit` and `accounts debit` commands instead, to update
an account's balance. The flag will no longer be supported in Lightning
Terminal `v0.15.0-alpha`.

## Integrated Binary Updates

Expand Down
3 changes: 2 additions & 1 deletion litrpc/lit-accounts.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion litrpc/lit-accounts.proto
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,10 @@ message UpdateAccountRequest {
// The ID of the account to update. Either the ID or the label must be set.
string id = 1;

// The new account balance to set. Set to -1 to not update the balance.
/*
Deprecated, use credit or debit command instead. The new account balance to
set. Set to -1 to not update the balance.
*/
int64 account_balance = 2;

/*
Expand Down
2 changes: 1 addition & 1 deletion litrpc/lit-accounts.swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@
"account_balance": {
"type": "string",
"format": "int64",
"description": "The new account balance to set. Set to -1 to not update the balance."
"description": "Deprecated, use credit or debit command instead. The new account balance to\nset. Set to -1 to not update the balance."
},
"expiration_date": {
"type": "string",
Expand Down
5 changes: 4 additions & 1 deletion proto/lit-accounts.proto
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,10 @@ message UpdateAccountRequest {
// The ID of the account to update. Either the ID or the label must be set.
string id = 1;

// The new account balance to set. Set to -1 to not update the balance.
/*
Deprecated, use credit or debit command instead. The new account balance to
set. Set to -1 to not update the balance.
*/
int64 account_balance = 2 [jstype = JS_STRING];

/*
Expand Down

0 comments on commit faa27f2

Please sign in to comment.