Skip to content

Commit

Permalink
restore all keys
Browse files Browse the repository at this point in the history
  • Loading branch information
callebtc committed Aug 15, 2024
1 parent dbb46a1 commit 0bdbfcb
Showing 1 changed file with 4 additions and 20 deletions.
24 changes: 4 additions & 20 deletions src/stores/mints.ts
Original file line number Diff line number Diff line change
Expand Up @@ -390,26 +390,10 @@ export const useMintsStore = defineStore("mints", {
if (!backup || !backup["cashu.welcomeDialogSeen"]) {
notifyError("Unrecognized Backup Format!");
} else {
localStorage.setItem(
"cashu.welcomeDialogSeen",
backup["cashu.welcomeDialogSeen"]
);
localStorage.setItem("cashu.theme", backup["cashu.theme"]);
localStorage.setItem("cashu.mints", backup["cashu.mints"]);
localStorage.setItem("cashu.proofs", backup["cashu.proofs"]);
localStorage.setItem("cashu.spentProofs", backup["cashu.spentProofs"]);
localStorage.setItem(
"cashu.blindSignatures",
backup["cashu.blindSignatures"]
);
localStorage.setItem(
"cashu.historyTokens",
backup["cashu.historyTokens"]
);
localStorage.setItem(
"cashu.activeMintUrl",
backup["cashu.activeMintUrl"]
);
const keys = Object.keys(backup);
keys.forEach((key) => {
localStorage.setItem(key, backup[key]);
});
notifySuccess("Backup restored");
}
},
Expand Down

0 comments on commit 0bdbfcb

Please sign in to comment.