Skip to content

Commit 90b8d83

Browse files
committed
feat(swaps): log when we attempt settleInvoice
1 parent 4306fba commit 90b8d83

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

Diff for: lib/connextclient/ConnextClient.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -387,9 +387,10 @@ class ConnextClient extends SwapClient {
387387
}
388388

389389
/**
390-
* Resolve a HashLock Transfer on the Connext network.
390+
* Resolves a HashLock Transfer on the Connext network.
391391
*/
392-
public settleInvoice = async (_rHash: string, rPreimage: string, currency: string) => {
392+
public settleInvoice = async (rHash: string, rPreimage: string, currency: string) => {
393+
this.logger.debug(`settling ${currency} invoice for ${rHash} with preimage ${rPreimage}`);
393394
const assetId = this.tokenAddresses.get(currency);
394395
await this.sendRequest('/hashlock-resolve', 'POST', {
395396
assetId,

Diff for: lib/lndclient/LndClient.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -905,7 +905,7 @@ class LndClient extends SwapClient {
905905
}
906906

907907
public settleInvoice = async (rHash: string, rPreimage: string) => {
908-
this.logger.debug(`settling invoice for ${rHash}`);
908+
this.logger.debug(`settling invoice for ${rHash} with preimage ${rPreimage}`);
909909
const settleInvoiceRequest = new lndinvoices.SettleInvoiceMsg();
910910
settleInvoiceRequest.setPreimage(hexToUint8Array(rPreimage));
911911
await this.settleInvoiceLnd(settleInvoiceRequest);

0 commit comments

Comments
 (0)