Skip to content

Commit 9c61b70

Browse files
committed
move getAddress call closer to usage of returned value
1 parent 04de212 commit 9c61b70

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/connector/src/provider.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,6 @@ export const createGianoProvider = (options: CreateGianoProviderParams) => {
293293
owners: [toWebAuthnAccount({ credential })],
294294
factoryAddress: gianoSmartWalletFactoryAddress,
295295
});
296-
const smartAccountAddress = await smartAccount.getAddress();
297296

298297
const xyVector = extractXYCoords(credential.publicKey);
299298

@@ -311,6 +310,8 @@ export const createGianoProvider = (options: CreateGianoProviderParams) => {
311310
// Always call the injection callback regardless of deployment status
312311
await injection.onCredentialKey(credential.raw.rawId, xyVector);
313312

313+
const smartAccountAddress = await smartAccount.getAddress();
314+
314315
emit('connect', { chainId: `0x${chain!.id.toString(16)}` });
315316
emit('accountsChanged', [smartAccountAddress]);
316317
return [smartAccountAddress];

0 commit comments

Comments
 (0)