Skip to content

Commit 7508633

Browse files
committed
add more logging
1 parent c277e3a commit 7508633

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

packages/hypergraph/src/connect/login.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ const getAndUpdateSmartAccount = async (
145145
// Create the client again to ensure we have the 7579 config now
146146
return getSmartAccountWalletClient(smartAccountParams);
147147
}
148+
console.log('leaving getAndUpdateSmartAccount');
148149
return smartAccountWalletClient;
149150
};
150151

packages/hypergraph/src/connect/smart-account.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,10 +157,10 @@ export type Action = {
157157
// We re-export these functions to allow creating sessions with policies for
158158
// additional actions without needing the Rhinestone module SDK.
159159
export {
160-
getSudoPolicy,
161-
getUniversalActionPolicy,
162160
getSpendingLimitsPolicy,
161+
getSudoPolicy,
163162
getTimeFramePolicy,
163+
getUniversalActionPolicy,
164164
getUsageLimitPolicy,
165165
getValueLimitPolicy,
166166
};
@@ -440,16 +440,20 @@ export const smartAccountNeedsUpdate = async (
440440
chain: Chain,
441441
rpcUrl: string,
442442
): Promise<boolean> => {
443+
console.log('entering smartAccountNeedsUpdate');
443444
if (chain.id === GEO_TESTNET.id) {
444445
// We don't have the smart sessions module deployed on testnet yet, so we need to use the legacy smart account wallet client
445446
// TODO: remove this once we have the smart sessions module deployed on testnet
447+
console.log('leaving smartAccountNeedsUpdate A');
446448
return false;
447449
}
448450
// If we haven't deployed the smart account, we would always deploy an updated version
449451
if (!(await isSmartAccountDeployed(smartAccountClient))) {
452+
console.log('leaving smartAccountNeedsUpdate B');
450453
return false;
451454
}
452455
const updateStatus = await legacySmartAccountUpdateStatus(smartAccountClient, chain, rpcUrl);
456+
console.log('leaving smartAccountNeedsUpdate C');
453457
return !updateStatus.has7579Module || !updateStatus.hasSmartSessionsValidator || !updateStatus.hasOwnableValidator;
454458
};
455459

0 commit comments

Comments
 (0)