diff --git a/frontend/src/lib/derived/debug.derived.ts b/frontend/src/lib/derived/debug.derived.ts index 1c8f94eda7d..c27a27e4a50 100644 --- a/frontend/src/lib/derived/debug.derived.ts +++ b/frontend/src/lib/derived/debug.derived.ts @@ -31,13 +31,13 @@ import { type Writable, } from "svelte/store"; -// TODO(dskloetd): Rename to createReadableStore. -const createDerivedStore = (store: Writable): Readable => - { subscribe: store.subscribe }; +const createReadableStore = (store: Writable): Readable => ({ + subscribe: store.subscribe, +}); let addAccountStore: Readable; export const debugAddAccountStore = (store: Writable) => - (addAccountStore = createDerivedStore(store)); + (addAccountStore = createReadableStore(store)); // Context stores might not be initialized when debugger is called. // Therefore, we need to initialize them here. @@ -46,14 +46,14 @@ let walletStore: Readable = readable({ neurons: [], }); export const debugSelectedAccountStore = (store: Writable) => - (walletStore = createDerivedStore(store)); + (walletStore = createReadableStore(store)); let selectedProposalStore: Readable = readable({ proposalId: undefined, proposal: undefined, }); export const debugSelectedProposalStore = ( store: Writable -) => (selectedProposalStore = createDerivedStore(store)); +) => (selectedProposalStore = createReadableStore(store)); let selectedCanisterStore: Readable = readable({ info: undefined, details: undefined, @@ -63,21 +63,21 @@ let selectedCanisterStore: Readable = readable({ }); export const debugSelectedCanisterStore = ( store: Writable -) => (selectedCanisterStore = createDerivedStore(store)); +) => (selectedCanisterStore = createReadableStore(store)); let selectedProjectStore: Readable = readable({ summary: null, swapCommitment: null, }); export const debugSelectedProjectStore = ( store: Writable -) => (selectedProjectStore = createDerivedStore(store)); +) => (selectedProjectStore = createReadableStore(store)); let selectedSnsNeuronStore: Readable = readable({ selected: undefined, neuron: undefined, }); export const debugSelectedSnsNeuronStore = ( store: Writable -) => (selectedSnsNeuronStore = createDerivedStore(store)); +) => (selectedSnsNeuronStore = createReadableStore(store)); const transactionsStore = writable(undefined); export const debugTransactions = (transactions: Transaction[] | undefined) => { transactionsStore.set(transactions);