Skip to content

Commit

Permalink
Don't show error when decoding lnurl
Browse files Browse the repository at this point in the history
  • Loading branch information
benthecarman authored and futurepaul committed Feb 26, 2024
1 parent c486fcd commit 737033b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/routes/Send.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,8 @@ export function Send() {

const [parsingDestination, setParsingDestination] = createSignal(false);

const [decodingLnUrl, setDecodingLnUrl] = createSignal(false);

function handleDestination(source: ParsedParams | undefined) {
if (!source) return;
setParsingDestination(true);
Expand Down Expand Up @@ -425,9 +427,11 @@ export function Send() {

// A ParsedParams with an lnurl in it
function processLnurl(source: ParsedParams & { lnurl: string }) {
setDecodingLnUrl(true);
state.mutiny_wallet
?.decode_lnurl(source.lnurl)
.then((lnurlParams) => {
setDecodingLnUrl(false);
if (lnurlParams.tag === "payRequest") {
if (lnurlParams.min == lnurlParams.max) {
setAmountSats(lnurlParams.min / 1000n);
Expand Down Expand Up @@ -830,7 +834,7 @@ export function Send() {
<p>{i18n.t("send.hodl_invoice_warning")}</p>
</InfoBox>
</Show>
<Show when={error()}>
<Show when={error() && !decodingLnUrl()}>
<InfoBox accent="red">
<p>{error()}</p>
</InfoBox>
Expand Down

0 comments on commit 737033b

Please sign in to comment.