@@ -2,10 +2,9 @@ import { FC } from 'react'
22import { useHref , useParams } from 'react-router-dom'
33import { useTranslation } from 'react-i18next'
44import Typography from '@mui/material/Typography'
5- import { Layer , RoflInstance , useGetRuntimeRoflAppsIdInstances } from '../../../oasis-nexus/api'
5+ import { Layer , RoflInstance , useGetRuntimeRoflAppsIdInstancesRak } from '../../../oasis-nexus/api'
66import { SearchScope } from '../../../types/searchScope'
77import { AppErrors } from '../../../types/errors'
8- import { API_MAX_TOTAL_COUNT } from '../../config'
98import { RoflAppInstanceDetailsContext } from './hooks'
109import { useRequiredScopeParam } from '../../hooks/useScopeParam'
1110import { useScreenSize } from '../../hooks/useScreensize'
@@ -28,12 +27,10 @@ export const RoflAppInstanceDetailsPage: FC = () => {
2827 deleteParams : [ 'page' ] ,
2928 } )
3029 const context : RoflAppInstanceDetailsContext = { scope, id, rak, method, setMethod }
31- const instancesQuery = useGetRuntimeRoflAppsIdInstances ( scope . network , Layer . sapphire , id , {
32- limit : API_MAX_TOTAL_COUNT ,
33- } )
30+ const instancesQuery = useGetRuntimeRoflAppsIdInstancesRak ( scope . network , Layer . sapphire , id , rak )
3431 const { isLoading, isFetched, data } = instancesQuery
35- const instances = data ?. data . instances
36- const instance = instances ?. find ( inst => inst . rak === rak )
32+ const instance = data ?. data
33+
3734 if ( ! instance && isFetched ) {
3835 throw AppErrors . NotFoundRoflAppInstance
3936 }
0 commit comments