Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions apps/connect/src/routes/login.lazy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ function Login() {
transport: custom(privyProvider),
});

await new Promise((resolve) => setTimeout(resolve, 500)); // trying to slow down since Privy seems to have a race condition

await hypergraphLogin(walletClient, embeddedWallet);

const redirect = localStorage.getItem('geo-connect-authenticate-redirect');
Expand Down
2 changes: 2 additions & 0 deletions packages/hypergraph/src/connect/login.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ const getAndUpdateSmartAccount = async (
console.log('smartAccountWalletClient', smartAccountWalletClient);
console.log('address', smartAccountWalletClient.account.address);
console.log('is deployed', await isSmartAccountDeployed(smartAccountWalletClient));
await new Promise((resolve) => setTimeout(resolve, 250)); // trying to slow down since Privy seems to have a race condition
// This will prompt the user to sign a user operation to update the smart account
if (await smartAccountNeedsUpdate(smartAccountWalletClient, chain, rpcUrl)) {
console.log('updating smart account');
Expand All @@ -145,6 +146,7 @@ const getAndUpdateSmartAccount = async (
// Create the client again to ensure we have the 7579 config now
return getSmartAccountWalletClient(smartAccountParams);
}
await new Promise((resolve) => setTimeout(resolve, 250)); // trying to slow down since Privy seems to have a race condition
console.log('leaving getAndUpdateSmartAccount');
return smartAccountWalletClient;
};
Expand Down
Loading