feat(wallet): allocate operation secrets from the cash root

This commit is contained in:
2026-09-05 11:33:42 +02:00
parent 3876791a0b
commit e6d0712258
4 changed files with 172 additions and 4 deletions
+3
View File
@@ -1,6 +1,7 @@
// allow: SIZE_OK — indivisible wallet lifecycle state machine and its public Pinia surface.
import { computed, onScopeDispose, ref } from 'vue';
import { defineStore } from 'pinia';
import { cashNodeFromHex } from 'lnurlcash-kit';
import {
clearSavedLinkingKey,
@@ -176,6 +177,7 @@ export const useWalletStore = defineStore('wallet', () => {
funds.replace(loaded);
acceptingOwnerWork = true;
state.value = 'unlocked';
await funds.public.recoverPendingMints(ownerFence.capture());
idleWatch.start();
} catch (error) {
stopOwnerChanges();
@@ -323,6 +325,7 @@ export const useWalletStore = defineStore('wallet', () => {
const funds = createWalletFunds({
requireKey,
requireCashRoot: () => cashNodeFromHex(requireWalletMaterial().cashRootHex),
ownerId: () => pubkey.value ?? undefined,
setAuxiliaryError: (message) => {
auxiliaryError.value = message;