File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments