Skip to content

Commit

Permalink
catch nwa error throw
Browse files Browse the repository at this point in the history
  • Loading branch information
futurepaul committed Dec 21, 2023
1 parent 64b7e5e commit a823015
Showing 1 changed file with 19 additions and 6 deletions.
25 changes: 19 additions & 6 deletions src/routes/settings/Connections.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
import { NwcProfile } from "@mutinywallet/mutiny-wasm";
import { A, useSearchParams } from "@solidjs/router";
import { createResource, createSignal, For, Show } from "solid-js";
import {
createResource,
createSignal,
ErrorBoundary,
For,
Show
} from "solid-js";
import { QRCodeSVG } from "solid-qr-code";

import scan from "~/assets/icons/scan.svg";
Expand All @@ -12,6 +18,7 @@ import {
Collapser,
ConfirmDialog,
DefaultMain,
InfoBox,
KeyValue,
LargeHeader,
MutinyWalletGuard,
Expand Down Expand Up @@ -292,11 +299,17 @@ function Nwc() {
: i18n.t("settings.connections.add_connection")
}
>
<NWCEditor
initialNWA={searchParams.nwa}
initialProfileIndex={profileToOpen()}
onSave={handleSave}
/>
<ErrorBoundary
fallback={(e) => (
<InfoBox accent="red">{e.message}</InfoBox>
)}
>
<NWCEditor
initialNWA={searchParams.nwa}
initialProfileIndex={profileToOpen()}
onSave={handleSave}
/>
</ErrorBoundary>
</SimpleDialog>
<SimpleDialog
open={callbackDialogOpen()}
Expand Down

0 comments on commit a823015

Please sign in to comment.