diff --git a/src/hooks/useAccount.tsx b/src/hooks/useAccount.tsx index 0f2e0259..7c6e940f 100644 --- a/src/hooks/useAccount.tsx +++ b/src/hooks/useAccount.tsx @@ -5,5 +5,6 @@ import getAccount from 'api/accounts/getAccount' export default function useAccounts(accountId?: string) { return useSWR(`account${accountId}`, () => getAccount(accountId || ''), { refreshInterval: 30000, + revalidateOnFocus: false, }) } diff --git a/src/hooks/useAccounts.tsx b/src/hooks/useAccounts.tsx index 9c655f9f..7cca41de 100644 --- a/src/hooks/useAccounts.tsx +++ b/src/hooks/useAccounts.tsx @@ -6,5 +6,6 @@ export default function useAccounts(address?: string) { return useSWR(`accounts${address}`, () => getAccounts(address || ''), { suspense: true, isPaused: () => !address, + revalidateOnFocus: false, }) } diff --git a/src/hooks/useAssetIncentiveApy.ts b/src/hooks/useAssetIncentiveApy.ts index 4be3e852..d2a8c057 100644 --- a/src/hooks/useAssetIncentiveApy.ts +++ b/src/hooks/useAssetIncentiveApy.ts @@ -3,5 +3,7 @@ import useSWR from 'swr' import calculateAssetIncentivesApy from 'api/incentives/calculateAssetIncentivesApy' export default function useAssetIncentivesApy(denom: string) { - return useSWR(`assetIncentiveApy-${denom}`, () => calculateAssetIncentivesApy(denom)) + return useSWR(`assetIncentiveApy-${denom}`, () => calculateAssetIncentivesApy(denom), { + revalidateOnFocus: false, + }) } diff --git a/src/hooks/useAssetParams.tsx b/src/hooks/useAssetParams.tsx index 6e991ca9..f3bfb9cd 100644 --- a/src/hooks/useAssetParams.tsx +++ b/src/hooks/useAssetParams.tsx @@ -5,5 +5,6 @@ import getAssetParams from 'api/params/getAssetParams' export default function useAssetParams() { return useSWR('assetParams', getAssetParams, { fallbackData: [], + revalidateOnFocus: false, }) } diff --git a/src/hooks/useDepositedVaults.ts b/src/hooks/useDepositedVaults.ts index 17e786b3..0d320918 100644 --- a/src/hooks/useDepositedVaults.ts +++ b/src/hooks/useDepositedVaults.ts @@ -5,5 +5,6 @@ import getDepositedVaults from 'api/vaults/getDepositedVaults' export default function useDepositedVaults(accountId: string) { return useSWR(`depositedVaultsByAccount-${accountId}`, () => getDepositedVaults(accountId), { suspense: true, + revalidateOnFocus: false, }) } diff --git a/src/hooks/useMarketAssets.ts b/src/hooks/useMarketAssets.ts index 478488ac..ebf4fea6 100644 --- a/src/hooks/useMarketAssets.ts +++ b/src/hooks/useMarketAssets.ts @@ -6,5 +6,6 @@ export default function useMarketAssets() { return useSWR(`marketAssets`, getMarkets, { suspense: true, fallbackData: [], + revalidateOnFocus: false, }) } diff --git a/src/hooks/useMarketBorrowings.tsx b/src/hooks/useMarketBorrowings.tsx index d117a589..b604c549 100644 --- a/src/hooks/useMarketBorrowings.tsx +++ b/src/hooks/useMarketBorrowings.tsx @@ -6,5 +6,6 @@ export default function useMarketBorrowings() { return useSWR(`marketBorrowings`, getMarketBorrowings, { fallbackData: [], suspense: false, + revalidateOnFocus: false, }) } diff --git a/src/hooks/useMarketDeposits.ts b/src/hooks/useMarketDeposits.ts index 1d4a021d..32d6e0bb 100644 --- a/src/hooks/useMarketDeposits.ts +++ b/src/hooks/useMarketDeposits.ts @@ -6,5 +6,6 @@ export default function useMarketDeposits() { return useSWR(`marketDeposits`, getMarketDeposits, { suspense: true, fallbackData: [], + revalidateOnFocus: false, }) } diff --git a/src/hooks/useMarketLiquidities.ts b/src/hooks/useMarketLiquidities.ts index d6d2bdca..8bcf8c4f 100644 --- a/src/hooks/useMarketLiquidities.ts +++ b/src/hooks/useMarketLiquidities.ts @@ -6,5 +6,6 @@ export default function useMarketLiquidities() { return useSWR(`marketLiquidities`, getMarketLiquidities, { suspense: true, fallbackData: [], + revalidateOnFocus: false, }) } diff --git a/src/hooks/usePrices.tsx b/src/hooks/usePrices.tsx index fd3b422c..b1298be4 100644 --- a/src/hooks/usePrices.tsx +++ b/src/hooks/usePrices.tsx @@ -6,5 +6,6 @@ export default function usePrices() { return useSWR('prices', getPrices, { fallbackData: [], refreshInterval: 30000, + revalidateOnFocus: false, }) } diff --git a/src/hooks/useSwapRoute.ts b/src/hooks/useSwapRoute.ts index 02ddf2bb..7b8ae3db 100644 --- a/src/hooks/useSwapRoute.ts +++ b/src/hooks/useSwapRoute.ts @@ -5,5 +5,6 @@ import getSwapRoute from 'api/swap/getSwapRoute' export default function useSwapRoute(denomIn: string, denomOut: string) { return useSWR(`swapRoute-${denomIn}-${denomOut}`, () => getSwapRoute(denomIn, denomOut), { fallbackData: [], + revalidateOnFocus: false, }) } diff --git a/src/hooks/useVaultConfigs.tsx b/src/hooks/useVaultConfigs.tsx index 500623c5..a3eb88b2 100644 --- a/src/hooks/useVaultConfigs.tsx +++ b/src/hooks/useVaultConfigs.tsx @@ -5,5 +5,6 @@ import { getVaultConfigs } from 'api/vaults/getVaultConfigs' export default function useVaultConfigs() { return useSWR('vaultConfigs', getVaultConfigs, { fallbackData: [], + revalidateOnFocus: false, }) } diff --git a/src/hooks/useVaults.tsx b/src/hooks/useVaults.tsx index 6a158fb9..c8b2c3a4 100644 --- a/src/hooks/useVaults.tsx +++ b/src/hooks/useVaults.tsx @@ -5,5 +5,6 @@ import getVaults from 'api/vaults/getVaults' export default function useVaults(address?: string) { return useSWR(`vaults${address}`, () => getVaults(), { suspense: true, + revalidateOnFocus: false, }) }