diff --git a/src/app/debug.ts b/src/app/debug.ts index d49cc104cef..8bde5a14dba 100644 --- a/src/app/debug.ts +++ b/src/app/debug.ts @@ -57,6 +57,9 @@ const debug = { chrome.storage.local.clear(); chrome.storage.session.clear(); }, + bypassInscriptionChecks() { + store.dispatch(settingsSlice.actions.dangerouslyChosenToBypassAllInscriptionChecks()); + }, }; export function setDebugOnGlobal() { diff --git a/src/app/query/bitcoin/address/utxos-by-address.hooks.ts b/src/app/query/bitcoin/address/utxos-by-address.hooks.ts index 7aaf3a6fd0f..6b0d6e87033 100644 --- a/src/app/query/bitcoin/address/utxos-by-address.hooks.ts +++ b/src/app/query/bitcoin/address/utxos-by-address.hooks.ts @@ -1,6 +1,7 @@ import { useNativeSegwitUtxosByAddress } from '@leather.io/query'; import { useCurrentAccountNativeSegwitIndexZeroSigner } from '@app/store/accounts/blockchain/bitcoin/native-segwit-account.hooks'; +import { useHasUserBypassedInscriptionChecks } from '@app/store/settings/settings.selectors'; const defaultArgs = { filterInscriptionUtxos: true, @@ -15,12 +16,14 @@ const defaultArgs = { export function useCurrentNativeSegwitUtxos(args = defaultArgs) { const { filterInscriptionUtxos, filterPendingTxsUtxos, filterRunesUtxos } = args; + const hasUserByPassedInscriptionChecks = useHasUserBypassedInscriptionChecks(); + const nativeSegwitSigner = useCurrentAccountNativeSegwitIndexZeroSigner(); const address = nativeSegwitSigner.address; return useNativeSegwitUtxosByAddress({ address, - filterInscriptionUtxos, + filterInscriptionUtxos: hasUserByPassedInscriptionChecks ? false : filterInscriptionUtxos, filterPendingTxsUtxos, filterRunesUtxos, }); diff --git a/src/app/store/settings/settings.selectors.ts b/src/app/store/settings/settings.selectors.ts index cde2ec58676..91f8d301074 100644 --- a/src/app/store/settings/settings.selectors.ts +++ b/src/app/store/settings/settings.selectors.ts @@ -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); +} diff --git a/src/app/store/settings/settings.slice.ts b/src/app/store/settings/settings.slice.ts index e50bb1e44f6..831bee507ae 100644 --- a/src/app/store/settings/settings.slice.ts +++ b/src/app/store/settings/settings.slice.ts @@ -6,6 +6,7 @@ interface InitialState { userSelectedTheme: UserSelectedTheme; dismissedMessages: string[]; isPrivateMode?: boolean; + bypassInscriptionChecks?: boolean; } const initialState: InitialState = { @@ -30,5 +31,8 @@ export const settingsSlice = createSlice({ togglePrivateMode(state) { state.isPrivateMode = !state.isPrivateMode; }, + dangerouslyChosenToBypassAllInscriptionChecks(state) { + state.bypassInscriptionChecks = true; + }, }, });