File tree Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ var staticAddressCommands = cli.Command{
30
30
newStaticAddressCommand ,
31
31
listUnspentCommand ,
32
32
listDepositsCommand ,
33
+ listWithdrawalsCommand ,
33
34
listStaticAddressSwapsCommand ,
34
35
withdrawalCommand ,
35
36
summaryCommand ,
@@ -312,6 +313,38 @@ func listDeposits(ctx *cli.Context) error {
312
313
return nil
313
314
}
314
315
316
+ var listWithdrawalsCommand = cli.Command {
317
+ Name : "listwithdrawals" ,
318
+ Usage : "Display a summary of past withdrawals." ,
319
+ Description : `
320
+ ` ,
321
+ Action : listWithdrawals ,
322
+ }
323
+
324
+ func listWithdrawals (ctx * cli.Context ) error {
325
+ ctxb := context .Background ()
326
+ if ctx .NArg () > 0 {
327
+ return cli .ShowCommandHelp (ctx , "withdrawals" )
328
+ }
329
+
330
+ client , cleanup , err := getClient (ctx )
331
+ if err != nil {
332
+ return err
333
+ }
334
+ defer cleanup ()
335
+
336
+ resp , err := client .ListStaticAddressWithdrawals (
337
+ ctxb , & looprpc.ListStaticAddressWithdrawalRequest {},
338
+ )
339
+ if err != nil {
340
+ return err
341
+ }
342
+
343
+ printRespJSON (resp )
344
+
345
+ return nil
346
+ }
347
+
315
348
var listStaticAddressSwapsCommand = cli.Command {
316
349
Name : "listswaps" ,
317
350
Usage : "Shows a list of finalized static address swaps." ,
You can’t perform that action at this time.
0 commit comments