diff --git a/src/app/query/bitcoin/runes/runes-outputs-by-address.query.ts b/src/app/query/bitcoin/runes/runes-outputs-by-address.query.ts index 9d7fe7928d4..cdfd3323544 100644 --- a/src/app/query/bitcoin/runes/runes-outputs-by-address.query.ts +++ b/src/app/query/bitcoin/runes/runes-outputs-by-address.query.ts @@ -7,6 +7,8 @@ import { useCurrentNetwork } from '@app/store/networks/networks.selectors'; import type { RunesOutputsByAddress } from '../bitcoin-client'; import { useRunesEnabled } from './runes.hooks'; +const queryOptions = { staleTime: 1 * 60 * 1000 }; + export function useGetRunesOutputsByAddressQuery( address: string, options?: AppUseQueryConfig @@ -16,14 +18,14 @@ export function useGetRunesOutputsByAddressQuery client.BestinslotApi.getRunesOutputsByAddress({ address, network: network.chain.bitcoin.bitcoinNetwork, }), - staleTime: 1000 * 60, - enabled: !!address && runesEnabled, + ...queryOptions, ...options, }); } diff --git a/src/app/query/bitcoin/runes/runes-ticker-info.query.ts b/src/app/query/bitcoin/runes/runes-ticker-info.query.ts index 9f5a3b2ebc0..1f8a314ed34 100644 --- a/src/app/query/bitcoin/runes/runes-ticker-info.query.ts +++ b/src/app/query/bitcoin/runes/runes-ticker-info.query.ts @@ -6,6 +6,8 @@ import { useCurrentNetwork } from '@app/store/networks/networks.selectors'; import type { RuneTickerInfo } from '../bitcoin-client'; +const queryOptions = { staleTime: 1 * 60 * 1000 }; + export function useGetRunesTickerInfoQuery(runeNames: string[]): UseQueryResult[] { const client = useBitcoinClient(); const network = useCurrentNetwork(); @@ -18,6 +20,7 @@ export function useGetRunesTickerInfoQuery(runeNames: string[]): UseQueryResult< queryKey: ['runes-ticker-info', runeName], queryFn: () => client.BestinslotApi.getRunesTickerInfo(runeName, network.chain.bitcoin.bitcoinNetwork), + ...queryOptions, }; }), }); diff --git a/src/app/query/bitcoin/runes/runes-wallet-balances.query.ts b/src/app/query/bitcoin/runes/runes-wallet-balances.query.ts index c501100df88..dd8ce8525bb 100644 --- a/src/app/query/bitcoin/runes/runes-wallet-balances.query.ts +++ b/src/app/query/bitcoin/runes/runes-wallet-balances.query.ts @@ -7,6 +7,8 @@ import { useCurrentNetwork } from '@app/store/networks/networks.selectors'; import type { RuneBalance } from '../bitcoin-client'; +const queryOptions = { staleTime: 1 * 60 * 1000 }; + export function useGetRunesWalletBalancesByAddressesQuery( addresses: string[], options?: AppUseQueryConfig @@ -25,6 +27,7 @@ export function useGetRunesWalletBalancesByAddressesQuery