@atomiqlabs/lp-lib 14.0.0-dev.20 → 14.0.0-dev.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -233,7 +233,8 @@ class FromBtcLnAuto extends FromBtcBaseSwapHandler_1.FromBtcBaseSwapHandler {
233
233
  return false;
234
234
  this.lightning.waitForInvoice(paymentHash).then(result => {
235
235
  this.swapLogger.info(swap, "subscribeToInvoice(): result callback, outcome: " + result.status + " invoice: " + swap.pr);
236
- this.htlcReceived(swap, result).catch(e => this.swapLogger.error(swap, "subscribeToInvoice(): HTLC received result", e));
236
+ if (result.status === "held")
237
+ this.htlcReceived(swap, result).catch(e => this.swapLogger.error(swap, "subscribeToInvoice(): HTLC received result", e));
237
238
  this.activeSubscriptions.delete(paymentHash);
238
239
  });
239
240
  this.swapLogger.info(swap, "subscribeToInvoice(): subscribe to invoice: " + swap.pr);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atomiqlabs/lp-lib",
3
- "version": "14.0.0-dev.20",
3
+ "version": "14.0.0-dev.21",
4
4
  "description": "Main functionality implementation for atomiq LP node",
5
5
  "main": "./dist/index.js",
6
6
  "types:": "./dist/index.d.ts",
@@ -298,7 +298,8 @@ export class FromBtcLnAuto extends FromBtcBaseSwapHandler<FromBtcLnAutoSwap, Fro
298
298
 
299
299
  this.lightning.waitForInvoice(paymentHash).then(result => {
300
300
  this.swapLogger.info(swap, "subscribeToInvoice(): result callback, outcome: "+result.status+" invoice: "+swap.pr);
301
- this.htlcReceived(swap, result).catch(e => this.swapLogger.error(swap, "subscribeToInvoice(): HTLC received result", e));
301
+ if(result.status==="held")
302
+ this.htlcReceived(swap, result).catch(e => this.swapLogger.error(swap, "subscribeToInvoice(): HTLC received result", e));
302
303
  this.activeSubscriptions.delete(paymentHash);
303
304
  });
304
305
  this.swapLogger.info(swap, "subscribeToInvoice(): subscribe to invoice: "+swap.pr);