cmd: add listinstantouts cmd

pull/708/head
sputn1ck 2 months ago
parent 1f211e5647
commit 034bc246ca
No known key found for this signature in database
GPG Key ID: 671103D881A5F0E4

@ -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…
Cancel
Save