Skip to content
This repository was archived by the owner on Apr 21, 2025. It is now read-only.

Commit 5b338b4

Browse files
benallengfuturepaul
authored andcommitted
feat: eify all fieldDestination errors
1 parent 2cb9d4a commit 5b338b4

1 file changed

Lines changed: 16 additions & 6 deletions

File tree

src/routes/Send.tsx

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -364,6 +364,9 @@ export default function Send() {
364364
setLnurlp(source.lnurl);
365365
setSource("lightning");
366366
}
367+
})
368+
.catch((e) => {
369+
showToast(eify(e));
367370
});
368371
} else {
369372
setAmountSats(source.amount_sats || 0n);
@@ -691,18 +694,18 @@ export default function Send() {
691694
/>
692695
</VStack>
693696
</Card>
694-
<Show when={error()}>
695-
<InfoBox accent="red">
696-
<p>{error()}</p>
697-
</InfoBox>
698-
</Show>
699697
<AmountCard
700698
amountSats={amountSats().toString()}
701699
setAmountSats={setAmountSats}
702700
fee={feeEstimate()?.toString()}
703701
isAmountEditable={isAmtEditable()}
704702
maxAmountSats={maxAmountSats()}
705703
/>
704+
<Show when={error()}>
705+
<InfoBox accent="red">
706+
<p>{error()}</p>
707+
</InfoBox>
708+
</Show>
706709
</Match>
707710
<Match when={true}>
708711
<DestinationInput
@@ -713,7 +716,14 @@ export default function Send() {
713716
/>
714717
</Match>
715718
</Switch>
716-
<Show when={destination()}>
719+
<Show
720+
when={
721+
address() ||
722+
invoice() ||
723+
nodePubkey() ||
724+
lnurlp()
725+
}
726+
>
717727
<VStack>
718728
<Button
719729
disabled={sendButtonDisabled()}

0 commit comments

Comments
 (0)