{"version":3,"file":"static/js/99499.59325c77.chunk.js","mappings":"gLAMO,MAAMA,EAAwBA,KACnC,MAAMC,EAAmBC,EAAAA,IACnB,KAAEC,EAAI,MAAEC,EAAK,UAAEC,IAAcC,EAAAA,EAAAA,GAAS,CAC1CC,SAAU,CAACC,EAAAA,GAAwB,eACnCC,QAASA,IAAMR,EAAiBS,EAAAA,GAAcC,gBAC9CC,OAAO,IAuBT,MAAO,CACLC,eArBoBC,EAAAA,EAAAA,UAAQ,IACxBV,IAAUD,EACL,KAGLO,EAAAA,GAAcK,oBACT,IACFZ,EACH,WAAY,IACZ,WAAY,IACZ,WAAY,IACZ,YAAa,IACb,YAAa,IACb,0BAA2B,KAIxBA,GACN,CAACA,EAAMC,IAIRA,QACAC,YACD,C","sources":["newhooks/account/useFetchAccountParams.ts"],"sourcesContent":["import { useMemo } from 'react';\nimport { useQuery } from '@tanstack/react-query';\nimport { EAccount } from 'utils/constants/store/query-keys';\nimport SpringConfigs from 'utils/constants/swarm/spring-configs';\nimport { getAccountJsonQuery } from 'services/account-settings';\n\nexport const useFetchAccountParams = () => {\n const accountJsonQuery = getAccountJsonQuery;\n const { data, error, isLoading } = useQuery({\n queryKey: [EAccount['AccountParams']],\n queryFn: () => accountJsonQuery(SpringConfigs.ACCOUNT_PARAMS),\n retry: false\n });\n\n const accountParams = useMemo(() => {\n if (error || !data) {\n return null;\n }\n\n if (SpringConfigs.CYPRUS_ACCOUNT_TYPE) {\n return {\n ...data,\n 'months-7': '1',\n 'months-8': '1',\n 'months-9': '1',\n 'months-10': '1',\n 'months-11': '1',\n 'months-timeout-hours-72': '1'\n };\n }\n\n return data;\n }, [data, error]);\n\n return {\n accountParams,\n error,\n isLoading\n };\n};\n"],"names":["useFetchAccountParams","accountJsonQuery","getAccountJsonQuery","data","error","isLoading","useQuery","queryKey","EAccount","queryFn","SpringConfigs","ACCOUNT_PARAMS","retry","accountParams","useMemo","CYPRUS_ACCOUNT_TYPE"],"sourceRoot":""}