mirror of
https://github.com/lightninglabs/loop.git
synced 2026-08-13 12:33:03 +02:00
cmd: add listinstantouts cmd
This commit is contained in:
parent
1f211e5647
commit
034bc246ca
2 changed files with 29 additions and 1 deletions
|
|
@ -202,3 +202,31 @@ func instantOut(ctx *cli.Context) error {
|
|||
|
||||
return nil
|
||||
}
|
||||
|
||||
var listInstantOutsCommand = cli.Command{
|
||||
Name: "listinstantouts",
|
||||
Usage: "list all instant out swaps",
|
||||
Description: `
|
||||
List all instant out swaps.
|
||||
`,
|
||||
Action: listInstantOuts,
|
||||
}
|
||||
|
||||
func listInstantOuts(ctx *cli.Context) error {
|
||||
// First set up the swap client itself.
|
||||
client, cleanup, err := getClient(ctx)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer cleanup()
|
||||
|
||||
resp, err := client.ListInstantOuts(
|
||||
context.Background(), &looprpc.ListInstantOutsRequest{},
|
||||
)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
printRespJSON(resp)
|
||||
return nil
|
||||
}
|
||||
|
|
|
|||
|
|
@ -148,7 +148,7 @@ func main() {
|
|||
listSwapsCommand, swapInfoCommand, getLiquidityParamsCommand,
|
||||
setLiquidityRuleCommand, suggestSwapCommand, setParamsCommand,
|
||||
getInfoCommand, abandonSwapCommand, reservationsCommands,
|
||||
instantOutCommand,
|
||||
instantOutCommand, listInstantOutsCommand,
|
||||
}
|
||||
|
||||
err := app.Run(os.Args)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue