Skip to content

Commit

Permalink
feat: eify all fieldDestination errors
Browse files Browse the repository at this point in the history
  • Loading branch information
benalleng authored and futurepaul committed Oct 24, 2023
1 parent 2cb9d4a commit 5b338b4
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions src/routes/Send.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,9 @@ export default function Send() {
setLnurlp(source.lnurl);
setSource("lightning");
}
})
.catch((e) => {
showToast(eify(e));
});
} else {
setAmountSats(source.amount_sats || 0n);
Expand Down Expand Up @@ -691,18 +694,18 @@ export default function Send() {
/>
</VStack>
</Card>
<Show when={error()}>
<InfoBox accent="red">
<p>{error()}</p>
</InfoBox>
</Show>
<AmountCard
amountSats={amountSats().toString()}
setAmountSats={setAmountSats}
fee={feeEstimate()?.toString()}
isAmountEditable={isAmtEditable()}
maxAmountSats={maxAmountSats()}
/>
<Show when={error()}>
<InfoBox accent="red">
<p>{error()}</p>
</InfoBox>
</Show>
</Match>
<Match when={true}>
<DestinationInput
Expand All @@ -713,7 +716,14 @@ export default function Send() {
/>
</Match>
</Switch>
<Show when={destination()}>
<Show
when={
address() ||
invoice() ||
nodePubkey() ||
lnurlp()
}
>
<VStack>
<Button
disabled={sendButtonDisabled()}
Expand Down

0 comments on commit 5b338b4

Please sign in to comment.