From 8ee3dee39b459ba2eec65152197b0c03cda19e21 Mon Sep 17 00:00:00 2001 From: Brandon Lucas <38222767+thebrandonlucas@users.noreply.github.com> Date: Mon, 22 Apr 2024 16:16:28 -0400 Subject: [PATCH] feat(mutinynet): cleanup --- src/app/utils/index.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/app/utils/index.ts b/src/app/utils/index.ts index e9d04a798c..184e056c67 100644 --- a/src/app/utils/index.ts +++ b/src/app/utils/index.ts @@ -92,16 +92,13 @@ export function decodeLightningInvoice( try { return lightningPayReq.decode(invoice); } catch (e) { - const err = e as Error; - // NOTE: is there a way to get network for the current account from here? - // This catch-and-rethrow is a workaround for us not having the network const mutinynet = { bech32: "tbs", pubKeyHash: 0x6f, scriptHash: 0xc4, validWitnessVersions: [0], }; - if (err.message === "Unknown coin bech32 prefix") { + if ((e as Error).message === "Unknown coin bech32 prefix") { return lightningPayReq.decode(invoice, customNetwork ?? mutinynet); } else { throw e;