Skip to content

Commit 265247b

Browse files
committed
frcli: add loop custom category to audit endpoint
1 parent bb40b0f commit 265247b

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

cmd/frcli/node_audit.go

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,14 @@ var onChainReportCommand = cli.Command{
7777
Usage: "A set of custom categories to create the " +
7878
"report with, expressed as a json array.",
7979
},
80+
cli.BoolFlag{
81+
Name: "loop-category",
82+
Usage: "Add a custom category called 'loop' " +
83+
"containing all transactions associated with " +
84+
"Lightning Labs Loop swaps. Note that this " +
85+
"category currently does not include off " +
86+
"chain payments.",
87+
},
8088
},
8189
Action: queryOnChainReport,
8290
}
@@ -114,6 +122,20 @@ func queryOnChainReport(ctx *cli.Context) error {
114122
req.CustomCategories = categories
115123
}
116124

125+
if ctx.Bool("loop-category") {
126+
req.CustomCategories = append(
127+
req.CustomCategories,
128+
&frdrpc.CustomCategory{
129+
Name: "loop",
130+
OnChain: true,
131+
OffChain: true,
132+
LabelPatterns: []string{
133+
"loopd --",
134+
"swap",
135+
},
136+
})
137+
}
138+
117139
rpcCtx := context.Background()
118140
report, err := client.NodeAudit(rpcCtx, req)
119141
if err != nil {

0 commit comments

Comments
 (0)