Skip to content

Commit f14d194

Browse files
committed
fix: Update requestPermissions call for Beacon SDK 4.7.0 API
1 parent 93267b5 commit f14d194

1 file changed

Lines changed: 3 additions & 13 deletions

File tree

src/services/beacon/utils.ts

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -107,20 +107,10 @@ export const connectWithBeacon = async (
107107
wallet: BeaconWallet
108108
}> => {
109109
const wallet = createWallet(envNetwork)
110-
const networkType = getNetworkTypeByEnvNetwork(envNetwork)
111110

112-
// Explicitly pass network to requestPermissions to ensure wallet connects to correct network
113-
const permissionRequest =
114-
envNetwork === "shadownet"
115-
? {
116-
network: {
117-
type: networkType,
118-
rpcUrl: rpcNodes.shadownet
119-
}
120-
}
121-
: { network: { type: networkType } }
122-
123-
await wallet.requestPermissions(permissionRequest)
111+
// Network is already configured in createWallet via DAppClientOptions.network
112+
// In Beacon SDK 4.7.0+, requestPermissions only accepts scopes, not network
113+
await wallet.requestPermissions()
124114

125115
const accounts: any[] = JSON.parse(localStorage.getItem("beacon:accounts") as string)
126116

0 commit comments

Comments
 (0)