mirror of
https://github.com/lightninglabs/lightning-terminal.git
synced 2026-08-13 12:33:36 +02:00
accounts+cmd/litcli: fix formatting
This commit is contained in:
parent
b6618759fb
commit
d3413ae637
7 changed files with 32 additions and 45 deletions
|
|
@ -65,16 +65,6 @@ func (m *mockLnd) assertNoMainErr(t *testing.T) {
|
|||
}
|
||||
}
|
||||
|
||||
func (m *mockLnd) assertMainErr(t *testing.T, expectedErr error) {
|
||||
select {
|
||||
case err := <-m.mainErrChan:
|
||||
require.Equal(t, expectedErr, err)
|
||||
|
||||
case <-time.After(testTimeout):
|
||||
t.Fatalf("Did not get expected main err before timeout")
|
||||
}
|
||||
}
|
||||
|
||||
// assertMainErrContains asserts that the main error contains the expected error
|
||||
// string.
|
||||
func (m *mockLnd) assertMainErrContains(t *testing.T, expectedStr string) {
|
||||
|
|
@ -408,7 +398,6 @@ func TestAccountService(t *testing.T) {
|
|||
lnd.assertMainErrContains(
|
||||
t, "not mapped to any account",
|
||||
)
|
||||
|
||||
},
|
||||
}, {
|
||||
name: "err in payment update chan",
|
||||
|
|
|
|||
|
|
@ -40,19 +40,17 @@ var createAccountCommand = cli.Command{
|
|||
ShortName: "c",
|
||||
Usage: "Create a new off-chain account with a balance.",
|
||||
ArgsUsage: "balance [expiration_date] [--label=LABEL] [--save_to=FILE]",
|
||||
Description: "Adds an entry to the account database. " +
|
||||
"This entry represents an amount of satoshis (account " +
|
||||
"balance) that can be spent using off-chain transactions " +
|
||||
"(e.g. paying invoices).\n\n" +
|
||||
Description: `Adds an entry to the account database.
|
||||
This entry represents an amount of satoshis (account balance) that can be spent
|
||||
using off-chain transactions (e.g. paying invoices).
|
||||
|
||||
" Macaroons can be created to be locked to an account. " +
|
||||
"This makes sure that the bearer of the macaroon can only " +
|
||||
"spend at most that amount of satoshis through the daemon " +
|
||||
"that has issued the macaroon.\n\n" +
|
||||
Macaroons can be created to be locked to an account. This makes sure that the
|
||||
bearer of the macaroon can only spend at most that amount of satoshis through
|
||||
the daemon that has issued the macaroon.
|
||||
|
||||
" Accounts only assert a maximum amount spendable. Having " +
|
||||
"a certain account balance does not guarantee that the node " +
|
||||
"has the channel liquidity to actually spend that amount.",
|
||||
Accounts only assert a maximum amount spendable. Having a certain account
|
||||
balance does not guarantee that the node has the channel liquidity to actually
|
||||
spend that amount.`,
|
||||
Flags: []cli.Flag{
|
||||
cli.Uint64Flag{
|
||||
Name: "balance",
|
||||
|
|
@ -315,10 +313,10 @@ func accountInfo(ctx *cli.Context) error {
|
|||
}
|
||||
|
||||
var removeAccountCommand = cli.Command{
|
||||
Name: "remove",
|
||||
ShortName: "r",
|
||||
Usage: "Remove an off-chain account from the database.",
|
||||
ArgsUsage: "[id | label]",
|
||||
Name: "remove",
|
||||
ShortName: "r",
|
||||
Usage: "Remove an off-chain account from the database.",
|
||||
ArgsUsage: "[id | label]",
|
||||
Description: "Removes an account entry from the account database.",
|
||||
Flags: []cli.Flag{
|
||||
cli.StringFlag{
|
||||
|
|
|
|||
|
|
@ -10,10 +10,10 @@ import (
|
|||
)
|
||||
|
||||
var listActionsCommand = cli.Command{
|
||||
Name: "actions",
|
||||
Usage: "List actions performed on the Litd server",
|
||||
Name: "actions",
|
||||
Usage: "List actions performed on the Litd server",
|
||||
Category: "Firewall",
|
||||
Action: listActions,
|
||||
Action: listActions,
|
||||
Flags: []cli.Flag{
|
||||
cli.StringFlag{
|
||||
Name: "feature",
|
||||
|
|
|
|||
|
|
@ -28,11 +28,11 @@ var autopilotCommands = cli.Command{
|
|||
}
|
||||
|
||||
var listAutopilotFeaturesCmd = cli.Command{
|
||||
Name: "features",
|
||||
ShortName: "f",
|
||||
Usage: "List available Autopilot features.",
|
||||
Name: "features",
|
||||
ShortName: "f",
|
||||
Usage: "List available Autopilot features.",
|
||||
Description: "List available Autopilot features.",
|
||||
Action: listFeatures,
|
||||
Action: listFeatures,
|
||||
}
|
||||
|
||||
var addAutopilotSessionCmd = cli.Command{
|
||||
|
|
@ -85,11 +85,11 @@ var addAutopilotSessionCmd = cli.Command{
|
|||
}
|
||||
|
||||
var revokeAutopilotSessionCmd = cli.Command{
|
||||
Name: "revoke",
|
||||
ShortName: "r",
|
||||
Usage: "Revoke an Autopilot session.",
|
||||
Name: "revoke",
|
||||
ShortName: "r",
|
||||
Usage: "Revoke an Autopilot session.",
|
||||
Description: "Revoke an active Autopilot session.",
|
||||
Action: revokeAutopilotSession,
|
||||
Action: revokeAutopilotSession,
|
||||
Flags: []cli.Flag{
|
||||
cli.StringFlag{
|
||||
Name: "localpubkey",
|
||||
|
|
@ -101,11 +101,11 @@ var revokeAutopilotSessionCmd = cli.Command{
|
|||
}
|
||||
|
||||
var listAutopilotSessionsCmd = cli.Command{
|
||||
Name: "list",
|
||||
ShortName: "l",
|
||||
Usage: "List all Autopilot sessions.",
|
||||
Name: "list",
|
||||
ShortName: "l",
|
||||
Usage: "List all Autopilot sessions.",
|
||||
Description: "List all Autopilot sessions.\n",
|
||||
Action: listAutopilotSessions,
|
||||
Action: listAutopilotSessions,
|
||||
}
|
||||
|
||||
func revokeAutopilotSession(ctx *cli.Context) error {
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ var helperCommands = cli.Command{
|
|||
Name: "helper",
|
||||
Usage: "Helper commands",
|
||||
Description: "Helper commands.",
|
||||
Category: "LiT",
|
||||
Category: "LiT",
|
||||
Subcommands: []cli.Command{
|
||||
generateSuperMacRootIDCmd,
|
||||
isSuperMacaroonCmd,
|
||||
|
|
|
|||
|
|
@ -17,8 +17,8 @@ var (
|
|||
defaultSessionExpiry = time.Hour * 24 * 90
|
||||
|
||||
labelFlag = cli.StringFlag{
|
||||
Name: "label",
|
||||
Usage: "The session label.",
|
||||
Name: "label",
|
||||
Usage: "The session label.",
|
||||
Required: true,
|
||||
}
|
||||
expiryFlag = cli.Uint64Flag{
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ var statusCommands = []cli.Command{
|
|||
Usage: "View info about litd status",
|
||||
Description: "View info about litd status.\n",
|
||||
Category: "LiT",
|
||||
Action: getStatus,
|
||||
Action: getStatus,
|
||||
},
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue