From 8c5a185686fd172ae46cf53b2532351f3635f178 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Aaron?= Date: Wed, 15 Nov 2023 16:17:25 +0100 Subject: [PATCH 1/3] feat: add preimage to transactions --- src/extension/background-script/connectors/alby.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/extension/background-script/connectors/alby.ts b/src/extension/background-script/connectors/alby.ts index 38af1df487..884c744141 100644 --- a/src/extension/background-script/connectors/alby.ts +++ b/src/extension/background-script/connectors/alby.ts @@ -93,12 +93,14 @@ export default class Alby implements Connector { client.invoices({}) )) as Invoice[]; + console.log(invoicesResponse); + const transactions: ConnectorTransaction[] = invoicesResponse.map( (invoice, index): ConnectorTransaction => ({ custom_records: invoice.custom_records, id: `${invoice.payment_request}-${index}`, memo: invoice.comment || invoice.memo, - preimage: "", // alby wallet api doesn't support preimage (yet) + preimage: invoice.preimage, payment_hash: invoice.payment_hash, settled: invoice.settled, settleDate: new Date(invoice.settled_at).getTime(), @@ -106,6 +108,7 @@ export default class Alby implements Connector { type: invoice.type == "incoming" ? "received" : "sent", }) ); + return { data: { transactions, From 599dd1f8293f6aa56f4de1f42026f83eb514a3a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Aaron?= Date: Thu, 16 Nov 2023 17:39:23 +0100 Subject: [PATCH 2/3] fix: upgrade to 2.6.0 --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index cd5eefe48a..815fcddc1a 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "dependencies": { "@bitcoin-design/bitcoin-icons-react": "^0.1.10", "@bitcoinerlab/secp256k1": "^1.0.5", - "@getalby/sdk": "^2.5.0", + "@getalby/sdk": "^2.6.0", "@headlessui/react": "^1.7.16", "@lightninglabs/lnc-web": "^0.2.4-alpha", "@noble/curves": "^1.1.0", diff --git a/yarn.lock b/yarn.lock index 798c2bc0f9..1d98b70f26 100644 --- a/yarn.lock +++ b/yarn.lock @@ -666,10 +666,10 @@ resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.52.0.tgz#78fe5f117840f69dc4a353adf9b9cd926353378c" integrity sha512-mjZVbpaeMZludF2fsWLD0Z9gCref1Tk4i9+wddjRvpUNqqcndPkBD09N/Mapey0b3jaXbLm2kICwFv2E64QinA== -"@getalby/sdk@^2.5.0": - version "2.5.0" - resolved "https://registry.yarnpkg.com/@getalby/sdk/-/sdk-2.5.0.tgz#d1b0a22cbcf986755c4b684096d97f52ed0b469d" - integrity sha512-MRLgI6WxCCLgrar+qDqm/UhKs+V6yXzNm4y1bJRAuN72nkKT+TjTJHCmk9GjTngR3FrOfLbeMsPwBxCmbvfrLQ== +"@getalby/sdk@^2.6.0": + version "2.6.0" + resolved "https://registry.yarnpkg.com/@getalby/sdk/-/sdk-2.6.0.tgz#51508c7833b0580575055f15b8fe21567b76288a" + integrity sha512-klD1FrpGY39QldPf00KtzIveWj0dXtgGdZH6nLWdJ0Ness7FAqy2RkgSF7JQfKJeJSFek7Ip3AL/KCT5/lZgww== dependencies: crypto-js "^4.1.1" events "^3.3.0" From 67634e119c22f44eaf1f4898c1303dcb4043388d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Aaron?= Date: Thu, 16 Nov 2023 17:43:39 +0100 Subject: [PATCH 3/3] fix: remove console log --- src/extension/background-script/connectors/alby.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/extension/background-script/connectors/alby.ts b/src/extension/background-script/connectors/alby.ts index 884c744141..941f586899 100644 --- a/src/extension/background-script/connectors/alby.ts +++ b/src/extension/background-script/connectors/alby.ts @@ -93,8 +93,6 @@ export default class Alby implements Connector { client.invoices({}) )) as Invoice[]; - console.log(invoicesResponse); - const transactions: ConnectorTransaction[] = invoicesResponse.map( (invoice, index): ConnectorTransaction => ({ custom_records: invoice.custom_records,