Skip to content

Commit bde594d

Browse files
committed
fix: store account address after login
1 parent 317047b commit bde594d

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

packages/hypergraph/src/connect/login.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ export async function signup(
6565
throw new Error('Error creating identity');
6666
}
6767
storeKeys(storage, accountAddress, keys);
68-
68+
storeAccountAddress(storage, accountAddress);
6969
return {
7070
accountAddress,
7171
keys,
@@ -94,6 +94,7 @@ export async function restoreKeys(
9494
const { ciphertext, nonce } = keyBox;
9595
const keys = await decryptIdentity(signer, ciphertext, nonce);
9696
storeKeys(storage, accountAddress, keys);
97+
storeAccountAddress(storage, accountAddress);
9798
return {
9899
accountAddress,
99100
keys,
@@ -157,9 +158,6 @@ export async function login({
157158
console.log('receipt', receipt);
158159
}
159160
const accountAddress = smartAccountWalletClient.account.address;
160-
if (accountAddressFromStorage === undefined) {
161-
storeAccountAddress(storage, accountAddress);
162-
}
163161
// const keys = loadKeys(storage, accountAddress);
164162
let authData: {
165163
accountAddress: Address;

0 commit comments

Comments
 (0)