From 3f6010b31262f3ea7ee5ac65c1dd7bcf6fa15635 Mon Sep 17 00:00:00 2001 From: protom Date: Sat, 22 Aug 2026 16:56:37 +0200 Subject: [PATCH] feat: restore Nostr backups through wallet lifecycle --- src/stores/nostrBackup.ts | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/stores/nostrBackup.ts b/src/stores/nostrBackup.ts index 90c175e..7f27ebd 100644 --- a/src/stores/nostrBackup.ts +++ b/src/stores/nostrBackup.ts @@ -7,7 +7,6 @@ import { createBackupPublisher, deriveBackupKey, publishBackup, - restoreFromNostr, } from '@/lnurlcash/nostrBackup'; import type { NostrRestoreResult } from '@/lnurlcash/nostrBackup'; import { loadSettings, persistSettings, readEncryptedBearers } from '@/lnurlcash/storage'; @@ -65,7 +64,7 @@ export const useNostrBackupStore = defineStore('nostrBackup', () => { const currentPayload = (): BackupPartPayload => ({ notes: readEncryptedBearers(), - mints: readTrustedMints(), + mints: readTrustedMints(wallet.pubkey ?? undefined), settings: loadSettings(), }); @@ -148,9 +147,7 @@ export const useNostrBackupStore = defineStore('nostrBackup', () => { // pulls the newest backup for THIS wallet's key and merges it through the // same applyBackup path as a file restore, then reloads the live list const restore = async (): Promise => { - const result = await restoreFromNostr(wallet.requireLinkingKey(), relays.value); - await wallet.reloadBearers(); - return result; + return wallet.restoreCurrentFromNostr(relays.value); }; return {