Skip to content

Commit

Permalink
fix: Newly generated key is now persisted
Browse files Browse the repository at this point in the history
  • Loading branch information
y9san9 committed Feb 14, 2025
1 parent 72ad541 commit e350132
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/sdk-v2/seed-worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,12 @@ async function generateNewKey(
if (last) {
newKey = await deriveNextKey({ key: last.key });
newNonce = last.nonce + 1;
const key: IndexedKey = { key: newKey, nonce: newNonce };
await persistence.add({
queueId,
url,
keys: [key],
});
} else {
const { key, nonce } = await persistence.getInitialKey({ queueId, url });
newKey = key;
Expand Down

0 comments on commit e350132

Please sign in to comment.