Skip to content

Commit

Permalink
Merge pull request #3218 from getAlby/fix-keysend-method
Browse files Browse the repository at this point in the history
fix: nwc keysend method and custom record conversion when custom records is not passed
  • Loading branch information
pavanjoshi914 authored Aug 2, 2024
2 parents c7bdd04 + 651aa65 commit f1a7dd8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/extension/background-script/connectors/nwc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,9 @@ class NWCConnector implements Connector {
const data = await this.nwc.payKeysend({
pubkey: args.pubkey,
amount: args.amount * 1000,
tlv_records: this.customRecordsToTlv(args.customRecords),
...(args.customRecords && {
tlv_records: this.customRecordsToTlv(args.customRecords),
}),
});

const paymentHash = SHA256(data.preimage).toString(Hex);
Expand Down

0 comments on commit f1a7dd8

Please sign in to comment.