Skip to content

Commit

Permalink
refactor(home): lightning receive
Browse files Browse the repository at this point in the history
  • Loading branch information
escapedcat committed Sep 30, 2024
1 parent e556d6a commit e6f3b33
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 84 deletions.
12 changes: 7 additions & 5 deletions src/pages/Home/ReceiveModal/QRCode.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,13 @@ const ReceiveOnChain: FC<Props> = ({ address, onRefreshHandler }) => {
</Tooltip>
</article>

<div>
<Button variant="light" onClick={onRefreshHandler}>
{t("wallet.refresh")}
</Button>
</div>
{onRefreshHandler && (
<div>
<Button variant="light" onClick={onRefreshHandler}>
{t("wallet.refresh")}
</Button>
</div>
)}
</>
);
};
Expand Down
14 changes: 9 additions & 5 deletions src/pages/Home/ReceiveModal/ReceiveModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,15 @@ const ReceiveModal: FC<Pick<ConfirmModalProps, "disclosure">> = ({
onSelectionChange={handleTabChange}
>
<Tab key={TxType.LIGHTNING} title={t("wallet.create_invoice_ln")}>
<ReceiveLN
onSubmitHandler={generateInvoiceHandler}
isLoading={isLoading}
error={error}
/>
{invoice ? (
<QRCode address={invoice} />
) : (
<ReceiveLN
onSubmitHandler={generateInvoiceHandler}
isLoading={isLoading}
error={error}
/>
)}
</Tab>
<Tab key={TxType.ONCHAIN} title={t("wallet.fund")}>
<ConfirmModal.Body>
Expand Down
74 changes: 0 additions & 74 deletions src/pages/Home/ReceiveModal/ReceiveOnChain.tsx

This file was deleted.

0 comments on commit e6f3b33

Please sign in to comment.