Skip to content

Commit

Permalink
feat: bypass inscription checks entirely
Browse files Browse the repository at this point in the history
  • Loading branch information
kyranjamie committed Dec 23, 2024
1 parent 0ddf20e commit bf225fc
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/app/debug.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ const debug = {
chrome.storage.local.clear();
chrome.storage.session.clear();
},
bypassInscriptionChecks() {
store.dispatch(settingsSlice.actions.dangerouslyChosenToBypassAllInscriptionChecks());
},
};

export function setDebugOnGlobal() {
Expand Down
4 changes: 4 additions & 0 deletions src/app/store/settings/settings.selectors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,7 @@ const selectIsPrivateMode = createSelector(selectSettings, state => state.isPriv
export function useIsPrivateMode() {
return useSelector(selectIsPrivateMode);
}

export function useHasUserBypassedInscriptionChecks() {
return useSelector(selectSettings, state => state.bypassInscriptionChecks ?? false);
}
4 changes: 4 additions & 0 deletions src/app/store/settings/settings.slice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ interface InitialState {
userSelectedTheme: UserSelectedTheme;
dismissedMessages: string[];
isPrivateMode?: boolean;
bypassInscriptionChecks?: boolean;
}

const initialState: InitialState = {
Expand All @@ -30,5 +31,8 @@ export const settingsSlice = createSlice({
togglePrivateMode(state) {
state.isPrivateMode = !state.isPrivateMode;
},
dangerouslyChosenToBypassAllInscriptionChecks(state) {
state.bypassInscriptionChecks = true;
},
},
});

0 comments on commit bf225fc

Please sign in to comment.