Skip to content

Commit

Permalink
Merge pull request #128 from secretkeylabs/vic/signet
Browse files Browse the repository at this point in the history
Add signet support
  • Loading branch information
m-aboelenein authored Jun 12, 2024
2 parents 57be8fe + 409df61 commit f3b81cf
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 18 deletions.
3 changes: 1 addition & 2 deletions example/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions example/src/App.tsx
Original file line number Diff line number Diff line change
@@ -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';

Expand Down
10 changes: 6 additions & 4 deletions example/src/components/EtchRunes/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
<>
Expand Down
10 changes: 6 additions & 4 deletions example/src/components/MintRunes/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
<>
Expand Down
2 changes: 2 additions & 0 deletions example/src/components/NetworkSelector/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
};
Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down

0 comments on commit f3b81cf

Please sign in to comment.