File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed
Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -289,11 +289,6 @@ function main() {
289289 const open = spawn ( async ( ) => {
290290 webSocket ?. removeEventListener ( "open" , open ) ;
291291
292- await glue . activateChain ( {
293- chainId : "0x" + chainId . toString ( 16 ) ,
294- rpcUrl : rpcUrl . href ,
295- } ) ;
296-
297292 let requestAccountsPromise : unknown = null ;
298293 const unsubscribe = glue . on ( "requestaccounts" , ( event ) => {
299294 unsubscribe ( ) ;
@@ -304,6 +299,15 @@ function main() {
304299 } ) ;
305300 } ) ;
306301
302+ if ( baseProvider instanceof EthereumProvider ) {
303+ await baseProvider . connect ( ) ;
304+ }
305+
306+ await glue . activateChain ( {
307+ chainId : "0x" + chainId . toString ( 16 ) ,
308+ rpcUrl : rpcUrl . href ,
309+ } ) ;
310+
307311 await unboundWallet . wallet . requestAddresses ( ) ;
308312 unsubscribe ( ) ;
309313 if ( requestAccountsPromise instanceof Promise ) {
@@ -385,7 +389,6 @@ function main() {
385389
386390 rpcMap : rpcMap ,
387391 } ) ;
388- await provider . connect ( ) ;
389392
390393 await run ( provider ) ;
391394 } ) ,
You can’t perform that action at this time.
0 commit comments