File tree Expand file tree Collapse file tree 2 files changed +4
-0
lines changed
packages/hypergraph/src/connect Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -88,6 +88,8 @@ function Login() {
8888 transport : custom ( privyProvider ) ,
8989 } ) ;
9090
91+ await new Promise ( ( resolve ) => setTimeout ( resolve , 500 ) ) ; // trying to slow down since Privy seems to have a race condition
92+
9193 await hypergraphLogin ( walletClient , embeddedWallet ) ;
9294
9395 const redirect = localStorage . getItem ( 'geo-connect-authenticate-redirect' ) ;
Original file line number Diff line number Diff line change @@ -137,6 +137,7 @@ const getAndUpdateSmartAccount = async (
137137 console . log ( 'smartAccountWalletClient' , smartAccountWalletClient ) ;
138138 console . log ( 'address' , smartAccountWalletClient . account . address ) ;
139139 console . log ( 'is deployed' , await isSmartAccountDeployed ( smartAccountWalletClient ) ) ;
140+ await new Promise ( ( resolve ) => setTimeout ( resolve , 250 ) ) ; // trying to slow down since Privy seems to have a race condition
140141 // This will prompt the user to sign a user operation to update the smart account
141142 if ( await smartAccountNeedsUpdate ( smartAccountWalletClient , chain , rpcUrl ) ) {
142143 console . log ( 'updating smart account' ) ;
@@ -145,6 +146,7 @@ const getAndUpdateSmartAccount = async (
145146 // Create the client again to ensure we have the 7579 config now
146147 return getSmartAccountWalletClient ( smartAccountParams ) ;
147148 }
149+ await new Promise ( ( resolve ) => setTimeout ( resolve , 250 ) ) ; // trying to slow down since Privy seems to have a race condition
148150 console . log ( 'leaving getAndUpdateSmartAccount' ) ;
149151 return smartAccountWalletClient ;
150152} ;
You can’t perform that action at this time.
0 commit comments