Skip to content

Commit

Permalink
feat: add waiting for invoice message on invoice modal
Browse files Browse the repository at this point in the history
  • Loading branch information
secondl1ght committed Mar 27, 2022
1 parent 95df816 commit ce1390c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/pages/grants/components/ContributeButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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}
/>
</ModalContent>
</Modal>
Expand Down
10 changes: 8 additions & 2 deletions src/pages/grants/components/QrInvoice.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -63,6 +65,10 @@ export const QrInvoice = ({
</Box>
</Box>
<QRCode value={qrCode} onClick={handleCopy} />
{invoiceCancelled
? <Text color="#EA453B">You cancelled your payment. Please close window and try again.</Text>
: <Text color="#EAA13B">Waiting for your payment...</Text>
}
<Box className={classes.copyText}>
<ButtonComponent
isFullWidth
Expand Down

0 comments on commit ce1390c

Please sign in to comment.