From 72058a0c116d803c4d7ad09fa047c96a6a28bd30 Mon Sep 17 00:00:00 2001
From: Pavan Joshi <55848322+pavanjoshi914@users.noreply.github.com>
Date: Fri, 22 Dec 2023 15:44:45 +0530
Subject: [PATCH 1/4] chore: fix tests and remove buy bitcoin icon (#2956)
---
src/app/components/TipCard/index.test.tsx | 8 +++----
src/app/icons/BuyBitcoinTipCardIcon.tsx | 27 -----------------------
2 files changed, 4 insertions(+), 31 deletions(-)
delete mode 100644 src/app/icons/BuyBitcoinTipCardIcon.tsx
diff --git a/src/app/components/TipCard/index.test.tsx b/src/app/components/TipCard/index.test.tsx
index 7c477d383d..1cdfac5aa8 100644
--- a/src/app/components/TipCard/index.test.tsx
+++ b/src/app/components/TipCard/index.test.tsx
@@ -1,7 +1,7 @@
import { render, screen } from "@testing-library/react";
import { MemoryRouter } from "react-router-dom";
-import BuyBitcoinTipCardIcon from "~/app/icons/BuyBitcoinTipCardIcon";
+import MnemonicTipCardIcon from "~/app/icons/MnemonicTipCardIcon";
import type { Props } from "./index";
import TipCard from "./index";
@@ -9,9 +9,9 @@ const props: Props = {
title: "Card Title",
description: "Card description",
handleClose: () => ({}),
- arrowClassName: "text-orange-500",
- backgroundIcon: ,
- className: "border-orange-500",
+ arrowClassName: "text-purple-500",
+ backgroundIcon: ,
+ className: "border-purple-500",
};
describe("CloseableCard", () => {
diff --git a/src/app/icons/BuyBitcoinTipCardIcon.tsx b/src/app/icons/BuyBitcoinTipCardIcon.tsx
deleted file mode 100644
index 3e483ed20d..0000000000
--- a/src/app/icons/BuyBitcoinTipCardIcon.tsx
+++ /dev/null
@@ -1,27 +0,0 @@
-export default function BuyBitcoinTipCardIcon() {
- return (
-
- );
-}
From ca8fe9bbe73ac2d5defcf47494d24f3b80818d8f Mon Sep 17 00:00:00 2001
From: Pavan Joshi <55848322+pavanjoshi914@users.noreply.github.com>
Date: Fri, 22 Dec 2023 15:47:03 +0530
Subject: [PATCH 2/4] fix: margin between heading and container (#2954)
button width on smaller screens
---
src/app/router/Welcome/Welcome.tsx | 2 +-
src/app/screens/connectors/ConnectAlby/index.tsx | 1 -
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/app/router/Welcome/Welcome.tsx b/src/app/router/Welcome/Welcome.tsx
index 9d379b9d13..7fa064fffe 100644
--- a/src/app/router/Welcome/Welcome.tsx
+++ b/src/app/router/Welcome/Welcome.tsx
@@ -64,7 +64,7 @@ function Layout() {
return (
-
+
{t("welcome.title")}
diff --git a/src/app/screens/connectors/ConnectAlby/index.tsx b/src/app/screens/connectors/ConnectAlby/index.tsx
index b0767443dd..5f6c4d29a2 100644
--- a/src/app/screens/connectors/ConnectAlby/index.tsx
+++ b/src/app/screens/connectors/ConnectAlby/index.tsx
@@ -80,7 +80,6 @@ export default function ConnectAlby() {
disabled={loading}
primary
flex
- className="w-64"
onClick={connectAlby}
/>
);
From 0fd87d8f91a4543ed4f9939eaa2b0bd3ccc463be Mon Sep 17 00:00:00 2001
From: Pavan Joshi <55848322+pavanjoshi914@users.noreply.github.com>
Date: Fri, 22 Dec 2023 16:07:40 +0530
Subject: [PATCH 3/4] feat: responsive tip cards (#2957)
---
src/app/screens/Discover/index.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/app/screens/Discover/index.tsx b/src/app/screens/Discover/index.tsx
index 825cdf628a..1619904855 100644
--- a/src/app/screens/Discover/index.tsx
+++ b/src/app/screens/Discover/index.tsx
@@ -19,7 +19,7 @@ function Discover() {
{t("discover.tips.description")}
-
+
>
From 4555ba576350fd41f3fd39806d0d71a31b2ae52e Mon Sep 17 00:00:00 2001
From: openoms <43343391+openoms@users.noreply.github.com>
Date: Fri, 22 Dec 2023 13:06:48 +0100
Subject: [PATCH 4/4] fix: return preimage for ln settlements in galoy
connector (#2953)
---
.../background-script/connectors/galoy.ts | 36 ++++++++++++++++++-
1 file changed, 35 insertions(+), 1 deletion(-)
diff --git a/src/extension/background-script/connectors/galoy.ts b/src/extension/background-script/connectors/galoy.ts
index 26014d0e59..53e4c2170a 100644
--- a/src/extension/background-script/connectors/galoy.ts
+++ b/src/extension/background-script/connectors/galoy.ts
@@ -273,6 +273,21 @@ class Galoy implements Connector {
errors {
message
}
+ transaction {
+ settlementVia {
+ ... on SettlementViaLn {
+ ${
+ this.config.apiCompatibilityMode
+ ? "paymentSecret"
+ : "preImage"
+ }
+ }
+ ... on SettlementViaIntraLedger {
+ counterPartyUsername
+ counterPartyWalletId
+ }
+ }
+ }
}
}
`,
@@ -295,6 +310,25 @@ class Galoy implements Connector {
throw new Error(errs[0].message || JSON.stringify(errs));
}
+ const transaction = data.lnInvoicePaymentSend.transaction;
+ let preimageMessage = "No preimage received";
+
+ if (transaction && transaction.settlementVia) {
+ if (
+ "preImage" in transaction.settlementVia ||
+ "paymentSecret" in transaction.settlementVia
+ ) {
+ preimageMessage =
+ transaction.settlementVia.preImage ||
+ transaction.settlementVia.paymentSecret;
+ } else if (
+ "counterPartyUsername" in transaction.settlementVia ||
+ "counterPartyWalletId" in transaction.settlementVia
+ ) {
+ preimageMessage = "No preimage, the payment was settled intraledger";
+ }
+ }
+
switch (data.lnInvoicePaymentSend.status) {
case "ALREADY_PAID":
throw new Error("Invoice was already paid.");
@@ -311,7 +345,7 @@ class Galoy implements Connector {
default:
return {
data: {
- preimage: "No preimage received",
+ preimage: preimageMessage,
paymentHash,
route: { total_amt: amountInSats, total_fees: 0 },
},