Skip to content

Commit d242e21

Browse files
committed
feat: Upgrade Beacon SDK to 4.7.0 for native Shadownet support
- Upgrade @airgap/beacon-sdk and @airgap/beacon-types from 4.2.2 to 4.7.0 - Use NetworkType.SHADOWNET instead of NetworkType.CUSTOM - Remove WalletConnect version pinning that conflicted with newer Beacon SDK - Simplify wallet creation since Shadownet is now a first-class network type This fixes Kukai wallet connection issues on Shadownet.
1 parent a7ce0d0 commit d242e21

3 files changed

Lines changed: 5936 additions & 5464 deletions

File tree

package.json

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
"prepare": "husky install"
2020
},
2121
"dependencies": {
22-
"@airgap/beacon-sdk": "^4.2.2",
23-
"@airgap/beacon-types": "^4.2.2",
22+
"@airgap/beacon-sdk": "4.7.0",
23+
"@airgap/beacon-types": "4.7.0",
2424
"@craco/craco": "^7.1.0",
2525
"@emotion/react": "^11.11.1",
2626
"@emotion/styled": "^11.11.0",
@@ -130,17 +130,11 @@
130130
"resolutions": {
131131
"@types/react": "~17.0.3",
132132
"react-error-overlay": "6.0.9",
133-
"@walletconnect/core": "2.14.0",
134-
"@walletconnect/types": "2.14.0",
135-
"@walletconnect/utils": "2.14.0",
136133
"viem": "2.17.4",
137134
"wagmi": "2.10.10",
138135
"mipd": "0.0.7"
139136
},
140137
"overrides": {
141-
"@walletconnect/core": "2.14.0",
142-
"@walletconnect/types": "2.14.0",
143-
"@walletconnect/utils": "2.14.0",
144138
"viem": "2.17.4",
145139
"wagmi": "2.10.10"
146140
},

src/services/beacon/utils.ts

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -59,19 +59,11 @@ export const getTezosNetwork = (): Network => {
5959

6060
export const createWallet = (network: Network) => {
6161
const networkType = getNetworkTypeByEnvNetwork(network)
62-
const networkConfig =
63-
network === "shadownet"
64-
? {
65-
type: networkType,
66-
name: "shadownet",
67-
rpcUrl: rpcNodes.shadownet
68-
}
69-
: { type: networkType }
7062

7163
return new BeaconWallet({
7264
name: "Homebase",
7365
iconUrl: "https://tezostaquito.io/img/favicon.png",
74-
network: networkConfig,
66+
network: { type: networkType },
7567
walletConnectOptions: {
7668
projectId: "1641355e825aeaa926e843dd38b04f6f", // Project ID can be customised
7769
relayUrl: "wss://relay.walletconnect.com" // WC2 relayUrl can be customised
@@ -89,7 +81,7 @@ export const createTezos = (network: Network) => {
8981
export const getNetworkTypeByEnvNetwork = (envNetwork: Network): NetworkType => {
9082
switch (envNetwork) {
9183
case "shadownet":
92-
return NetworkType.CUSTOM
84+
return NetworkType.SHADOWNET
9385

9486
case "mainnet":
9587
return NetworkType.MAINNET

0 commit comments

Comments
 (0)