diff --git a/src/app/debug.ts b/src/app/debug.ts index 9d704fd8eee..d49cc104cef 100644 --- a/src/app/debug.ts +++ b/src/app/debug.ts @@ -11,6 +11,7 @@ import { queryClient } from './common/persistence'; import { store } from './store'; import { stxChainSlice } from './store/chains/stx-chain.slice'; import { settingsSlice } from './store/settings/settings.slice'; +import { submittedTransactionsActions } from './store/submitted-transactions/submitted-transactions.actions'; declare global { interface Window { @@ -46,6 +47,9 @@ const debug = { resetMessages() { store.dispatch(settingsSlice.actions.resetMessages()); }, + clearSubmittedTransactions() { + store.dispatch(submittedTransactionsActions.clearSubmittedTransactions()); + }, clearReactQueryCache() { queryClient.clear(); }, diff --git a/src/app/store/submitted-transactions/submitted-transactions.slice.ts b/src/app/store/submitted-transactions/submitted-transactions.slice.ts index d783daacd09..eea817d9cc9 100644 --- a/src/app/store/submitted-transactions/submitted-transactions.slice.ts +++ b/src/app/store/submitted-transactions/submitted-transactions.slice.ts @@ -24,5 +24,8 @@ export const submittedTransactionsSlice = createSlice({ transactionReplacedByFee(state, action: PayloadAction) { submittedTransactionsAdapter.removeOne(state, action.payload); }, + clearSubmittedTransactions(state) { + submittedTransactionsAdapter.removeAll(state); + }, }, });