fixing signer bug
This commit is contained in:
parent
7c9e1129c7
commit
95566d6f36
@ -35,6 +35,9 @@
|
||||
});
|
||||
|
||||
$: if (sessionSigs) {
|
||||
// Store sessionSigs in local storage in its original format
|
||||
localStorage.setItem("google-session", JSON.stringify(sessionSigs));
|
||||
|
||||
// Update sessionStatuses
|
||||
sessionStatuses = Object.entries(sessionSigs).map(([node, data]) => {
|
||||
const sessionKey = JSON.parse(data.signedMessage).sessionKey;
|
||||
@ -48,11 +51,8 @@
|
||||
};
|
||||
});
|
||||
|
||||
// Find an active session and store it in local storage
|
||||
// Find an active session
|
||||
activeSession = sessionStatuses.find(({ isExpired }) => !isExpired);
|
||||
if (activeSession) {
|
||||
localStorage.setItem("google-session", JSON.stringify(activeSession));
|
||||
}
|
||||
|
||||
view = "READY";
|
||||
}
|
||||
|
@ -15,7 +15,7 @@
|
||||
litNodeClient = new LitNodeClient({ litNetwork: "serrano" });
|
||||
await litNodeClient.connect();
|
||||
|
||||
const sessionSigsLocalStorage = localStorage.getItem("google-signature");
|
||||
const sessionSigsLocalStorage = localStorage.getItem("google-session");
|
||||
const currentPKPLocalStorage = localStorage.getItem("current-pkp");
|
||||
if (sessionSigsLocalStorage && currentPKPLocalStorage) {
|
||||
sessionSigs = JSON.parse(sessionSigsLocalStorage);
|
||||
|
Loading…
Reference in New Issue
Block a user