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{
3030 newStaticAddressCommand ,
3131 listUnspentCommand ,
3232 listDepositsCommand ,
33+ listWithdrawalsCommand ,
3334 listStaticAddressSwapsCommand ,
3435 withdrawalCommand ,
3536 summaryCommand ,
@@ -312,6 +313,38 @@ func listDeposits(ctx *cli.Context) error {
312313 return nil
313314}
314315
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+
315348var listStaticAddressSwapsCommand = cli.Command {
316349 Name : "listswaps" ,
317350 Usage : "Shows a list of finalized static address swaps." ,
You can’t perform that action at this time.
0 commit comments