Skip to content

Commit

Permalink
fix: tool to clear submitted tx state
Browse files Browse the repository at this point in the history
  • Loading branch information
kyranjamie committed Aug 16, 2024
1 parent 67a29f7 commit 1e6f63d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/app/debug.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -46,6 +47,9 @@ const debug = {
resetMessages() {
store.dispatch(settingsSlice.actions.resetMessages());
},
clearSubmittedTransactions() {
store.dispatch(submittedTransactionsActions.clearSubmittedTransactions());
},
clearReactQueryCache() {
queryClient.clear();
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,8 @@ export const submittedTransactionsSlice = createSlice({
transactionReplacedByFee(state, action: PayloadAction<string>) {
submittedTransactionsAdapter.removeOne(state, action.payload);
},
clearSubmittedTransactions(state) {
submittedTransactionsAdapter.removeAll(state);
},
},
});

0 comments on commit 1e6f63d

Please sign in to comment.