File tree Expand file tree Collapse file tree 1 file changed +12
-6
lines changed
Expand file tree Collapse file tree 1 file changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -57,6 +57,7 @@ import {
5757 IAddress ,
5858 TLspLogPayload ,
5959 TLspLogEvent ,
60+ TChannelMonitor ,
6061} from './utils/types' ;
6162import {
6263 appendPath ,
@@ -1988,10 +1989,6 @@ class LightningManager {
19881989 ( p ) => p . payment_hash === res . payment_hash ,
19891990 ) ;
19901991
1991- console . error (
1992- `Existing claimed payments: ${ JSON . stringify ( existingClaimedPayment ) } ` ,
1993- ) ;
1994-
19951992 if (
19961993 existingClaimedPayment &&
19971994 existingClaimedPayment . state === 'successful'
@@ -2248,14 +2245,23 @@ class LightningManager {
22482245 await this . syncLdk ( ) ;
22492246 }
22502247
2251- private async onLspLogEvent ( payload : any ) : Promise < void > {
2248+ private async onLspLogEvent ( payload : object ) : Promise < void > {
22522249 if ( ! this . lspLogEvent ) {
22532250 return ;
22542251 }
2252+ let body : { channelClose : object ; channelFiles : TChannelMonitor [ ] } = {
2253+ channelClose : payload ,
2254+ channelFiles : [ ] ,
2255+ } ;
22552256 const nodeIdRes = await ldk . nodeId ( ) ;
22562257
2258+ const channelFiles = await ldk . listChannelMonitors ( true ) ;
2259+ if ( channelFiles . isOk ( ) ) {
2260+ body . channelFiles = channelFiles . value ;
2261+ }
2262+
22572263 await this . lspLogEvent ( {
2258- body : JSON . stringify ( payload ) ,
2264+ body : JSON . stringify ( body ) ,
22592265 nodeId : nodeIdRes . isOk ( ) ? nodeIdRes . value : '' ,
22602266 } ) ;
22612267 }
You can’t perform that action at this time.
0 commit comments