diff --git a/example/package-lock.json b/example/package-lock.json index b11adc9..bdf1f37 100644 --- a/example/package-lock.json +++ b/example/package-lock.json @@ -20,11 +20,10 @@ } }, "..": { - "name": "sats-connect", "version": "2.4.0", "license": "ISC", "dependencies": { - "@sats-connect/core": "0.0.9", + "@sats-connect/core": "0.0.11", "@sats-connect/make-default-provider-config": "0.0.5", "@sats-connect/ui": "0.0.6" }, diff --git a/example/src/App.tsx b/example/src/App.tsx index 0daa8b5..e156d65 100644 --- a/example/src/App.tsx +++ b/example/src/App.tsx @@ -1,12 +1,12 @@ -import Wallet, { Address, BitcoinNetworkType, AddressPurpose } from 'sats-connect'; +import Wallet, { Address, AddressPurpose, BitcoinNetworkType } from 'sats-connect'; import './App.css'; import { AddressDisplay, + EtchRunes, + MintRunes, NetworkSelector, SendBtc, SendStx, - MintRunes, - EtchRunes, } from './components'; import { useLocalStorage } from './hooks'; diff --git a/example/src/components/EtchRunes/index.tsx b/example/src/components/EtchRunes/index.tsx index cd25d18..221af7b 100644 --- a/example/src/components/EtchRunes/index.tsx +++ b/example/src/components/EtchRunes/index.tsx @@ -83,10 +83,12 @@ const EtchRunes = ({ addresses, network }: Props) => { } }; - const fundTxLink = - network === BitcoinNetworkType.Mainnet - ? `https://mempool.space/tx/${fundTxId}` - : `https://mempool.space/testnet/tx/${fundTxId}`; + const networkPath = { + [BitcoinNetworkType.Mainnet]: '', + [BitcoinNetworkType.Testnet]: '/testnet', + [BitcoinNetworkType.Signet]: '/signet', + }; + const fundTxLink = `https://mempool.space${networkPath[network]}/tx/${fundTxId}`; return ( <> diff --git a/example/src/components/MintRunes/index.tsx b/example/src/components/MintRunes/index.tsx index d64d5f4..2adada7 100644 --- a/example/src/components/MintRunes/index.tsx +++ b/example/src/components/MintRunes/index.tsx @@ -60,10 +60,12 @@ const MintRunes = ({ addresses, network }: Props) => { } }; - const fundTxLink = - network === BitcoinNetworkType.Mainnet - ? `https://mempool.space/tx/${fundTxId}` - : `https://mempool.space/testnet/tx/${fundTxId}`; + const networkPath = { + [BitcoinNetworkType.Mainnet]: '', + [BitcoinNetworkType.Testnet]: '/testnet', + [BitcoinNetworkType.Signet]: '/signet', + }; + const fundTxLink = `https://mempool.space${networkPath[network]}/tx/${fundTxId}`; return ( <> diff --git a/example/src/components/NetworkSelector/index.tsx b/example/src/components/NetworkSelector/index.tsx index 7e04bc5..91596e7 100644 --- a/example/src/components/NetworkSelector/index.tsx +++ b/example/src/components/NetworkSelector/index.tsx @@ -10,6 +10,8 @@ const NetworkSelector = ({ network, setNetwork }: Props) => { const newNetwork = network === BitcoinNetworkType.Mainnet ? BitcoinNetworkType.Testnet + : network === BitcoinNetworkType.Testnet + ? BitcoinNetworkType.Signet : BitcoinNetworkType.Mainnet; setNetwork(newNetwork); }; diff --git a/package-lock.json b/package-lock.json index f7ed085..1db827e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "2.4.0", "license": "ISC", "dependencies": { - "@sats-connect/core": "0.0.9", + "@sats-connect/core": "^0.0.11", "@sats-connect/make-default-provider-config": "0.0.5", "@sats-connect/ui": "0.0.6" }, @@ -1715,9 +1715,9 @@ ] }, "node_modules/@sats-connect/core": { - "version": "0.0.9", - "resolved": "https://registry.npmjs.org/@sats-connect/core/-/core-0.0.9.tgz", - "integrity": "sha512-7/hY7VF9OqNDYcXlADluMKCTDu9f4OENWkWWO8K1LqanuyZhepu3fBRQKSCT6Xr/3KorvSH/e8sSTcJCzuVOAA==", + "version": "0.0.11", + "resolved": "https://registry.npmjs.org/@sats-connect/core/-/core-0.0.11.tgz", + "integrity": "sha512-KeX0vdJ0aIpavpt/X8ZTlcoGzF/5vcuIoaeN/CV8KyjFuok/nFG6FY874uknI+p2SBQUv2okd0dqBj1YcQIfGQ==", "dependencies": { "axios": "1.6.8", "bitcoin-address-validation": "2.2.3", diff --git a/package.json b/package.json index 5762143..dc009f8 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ ] }, "dependencies": { - "@sats-connect/core": "0.0.9", + "@sats-connect/core": "0.0.11", "@sats-connect/make-default-provider-config": "0.0.5", "@sats-connect/ui": "0.0.6" },