diff --git a/src/components/Activity.tsx b/src/components/Activity.tsx index 0ba7dd1..9234832 100644 --- a/src/components/Activity.tsx +++ b/src/components/Activity.tsx @@ -1,5 +1,5 @@ import { LoadingSpinner, NiceP, SmallAmount, SmallHeader } from './layout'; -import { For, Match, ParentComponent, Show, Switch, createEffect, createMemo, createResource, createSignal } from 'solid-js'; +import { For, Match, Show, Switch, createEffect, createMemo, createResource, createSignal } from 'solid-js'; import { useMegaStore } from '~/state/megaStore'; import { MutinyInvoice } from '@mutinywallet/mutiny-wasm'; import { JsonModal } from '~/components/JsonModal'; @@ -8,6 +8,7 @@ import utxoIcon from '~/assets/icons/coin.svg'; import { getRedshifted } from '~/utils/fakeLabels'; import { ActivityItem } from './ActivityItem'; import { MutinyTagItem } from '~/utils/tags'; +import { Network } from '~/logic/mutinyWalletSetup'; export const THREE_COLUMNS = 'grid grid-cols-[auto,1fr,auto] gap-4 py-2 px-2 border-b border-neutral-800 last:border-b-0' export const CENTER_COLUMN = 'min-w-0 overflow-hidden max-w-full' @@ -40,11 +41,7 @@ export type UtxoItem = { redshifted?: boolean, } -const SubtleText: ParentComponent = (props) => { - return
{newChannel()?.outpoint}
-
+
Mempool Link
diff --git a/src/logic/mutinyWalletSetup.ts b/src/logic/mutinyWalletSetup.ts
index 5dd44a6..11ac0e5 100644
--- a/src/logic/mutinyWalletSetup.ts
+++ b/src/logic/mutinyWalletSetup.ts
@@ -6,7 +6,7 @@ import initWaila from '@mutinywallet/waila-wasm'
// network?: string, proxy?: string, esplora?: string, rgs?: string, lsp?: string,
// }
-type Network = "bitcoin" | "testnet" | "regtest" | "signet";
+export type Network = "bitcoin" | "testnet" | "regtest" | "signet";
export type MutinyWalletSettingStrings = {
network?: Network, proxy?: string, esplora?: string, rgs?: string, lsp?: string,
}
diff --git a/src/routes/Receive.tsx b/src/routes/Receive.tsx
index a8dc128..110c062 100644
--- a/src/routes/Receive.tsx
+++ b/src/routes/Receive.tsx
@@ -18,6 +18,7 @@ import { AmountCard } from "~/components/AmountCard";
import { ShareCard } from "~/components/ShareCard";
import { BackButton } from "~/components/layout/BackButton";
import { MutinyTagItem } from "~/utils/tags";
+import { Network } from "~/logic/mutinyWalletSetup";
type OnChainTx = {
transaction: {
@@ -181,6 +182,8 @@ export default function Receive() {
const [paidState, { refetch }] = createResource(bip21Raw, checkIfPaid);
+ const network = state.mutiny_wallet?.get_network() as Network;
+
createEffect(() => {
const interval = setInterval(() => {
if (receiveState() === "show") refetch();
@@ -242,7 +245,7 @@ export default function Receive() {
diff --git a/src/routes/Redshift.tsx b/src/routes/Redshift.tsx
index 6b74e03..8568d57 100644
--- a/src/routes/Redshift.tsx
+++ b/src/routes/Redshift.tsx
@@ -13,6 +13,7 @@ import { MutinyChannel } from "@mutinywallet/mutiny-wasm";
import mempoolTxUrl from "~/utils/mempoolTxUrl";
import { Amount } from "~/components/Amount";
import { getRedshifted, setRedshifted } from "~/utils/fakeLabels";
+import { Network } from "~/logic/mutinyWalletSetup";
type ShiftOption = "utxo" | "lightning"
@@ -106,6 +107,8 @@ function RedshiftReport(props: { redshift: RedshiftResult, utxo: UtxoItem }) {
setRedshifted(true, redshiftResource()?.output_utxo)
})
+ const network = state.mutiny_wallet?.get_network() as Network;
+
return (
{redshiftResource().introduction_channel}
-
+
View on mempool
{redshiftResource().output_channel}
-
+
View on mempool
diff --git a/src/utils/mempoolTxUrl.ts b/src/utils/mempoolTxUrl.ts
index def9adf..9bf62fb 100644
--- a/src/utils/mempoolTxUrl.ts
+++ b/src/utils/mempoolTxUrl.ts
@@ -1,4 +1,6 @@
-export default function mempoolTxUrl(txid?: string, network?: string) {
+import { Network } from "~/logic/mutinyWalletSetup"
+
+export default function mempoolTxUrl(txid?: string, network?: Network) {
if (!txid || !network) {
console.error("Problem creating the mempool url")
return "#"