From ce1390ce5d7e371bef083404066ee3822bc5f336 Mon Sep 17 00:00:00 2001
From: secondl1ght <85003930+secondl1ght@users.noreply.github.com>
Date: Sat, 26 Mar 2022 23:16:24 -0600
Subject: [PATCH] feat: add waiting for invoice message on invoice modal
---
src/pages/grants/components/ContributeButton.tsx | 1 +
src/pages/grants/components/QrInvoice.tsx | 10 ++++++++--
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/src/pages/grants/components/ContributeButton.tsx b/src/pages/grants/components/ContributeButton.tsx
index e03beadbf..c025a9e63 100644
--- a/src/pages/grants/components/ContributeButton.tsx
+++ b/src/pages/grants/components/ContributeButton.tsx
@@ -301,6 +301,7 @@ export const ContributeButton = ({ project, confettiEffects, buttonStyle, sats,
owners={project.owners.map(owner => owner.user.username)}
qrCode={fundingTx.paymentRequest}
handleCloseButton={handleCloseButton}
+ invoiceCancelled={fundingTx.canceled}
/>
diff --git a/src/pages/grants/components/QrInvoice.tsx b/src/pages/grants/components/QrInvoice.tsx
index 503938072..c6c9afd30 100644
--- a/src/pages/grants/components/QrInvoice.tsx
+++ b/src/pages/grants/components/QrInvoice.tsx
@@ -23,11 +23,13 @@ interface IQrInvoice {
amount: number;
owners: string[];
qrCode: string;
- handleCloseButton: () => void
+ invoiceCancelled: boolean;
+ handleCloseButton: () => void;
+
}
export const QrInvoice = ({
- comment, title, amount, owners, qrCode}: IQrInvoice) => {
+ comment, title, amount, owners, qrCode, invoiceCancelled}: IQrInvoice) => {
const classes = useStyles();
const [copy, setcopy] = useState(false);
@@ -63,6 +65,10 @@ export const QrInvoice = ({
+ {invoiceCancelled
+ ? You cancelled your payment. Please close window and try again.
+ : Waiting for your payment...
+ }