diff --git a/centrifuge-app/src/pages/NavManagement/NavManagementAssetTable.tsx b/centrifuge-app/src/pages/NavManagement/NavManagementAssetTable.tsx index dc15c94997..792f501e4a 100644 --- a/centrifuge-app/src/pages/NavManagement/NavManagementAssetTable.tsx +++ b/centrifuge-app/src/pages/NavManagement/NavManagementAssetTable.tsx @@ -102,16 +102,18 @@ export function NavManagementAssetTable({ poolId }: { poolId: string }) { const { execute, isLoading } = useCentrifugeTransaction( 'Update NAV', (cent) => (args: [values: FormValues], options) => { - const domain = domains?.find((domain) => domain.isActive && domain.hasDeployedLp) - const updateTokenPrices = domain - ? Object.entries(domain.liquidityPools).flatMap(([tid, poolsByCurrency]) => { - return domain.currencies - .filter((cur) => !!poolsByCurrency[cur.address]) - .map((cur) => [tid, cur.key] satisfies [string, CurrencyKey]) - .map(([tid, curKey]) => - cent.liquidityPools.updateTokenPrice([poolId, tid, curKey, domain.chainId], { batch: true }) - ) - }) + const deployedDomains = domains?.filter((domain) => domain.hasDeployedLp) + const updateTokenPrices = deployedDomains + ? deployedDomains.flatMap((domain) => + Object.entries(domain.liquidityPools).flatMap(([tid, poolsByCurrency]) => { + return domain.currencies + .filter((cur) => !!poolsByCurrency[cur.address]) + .map((cur) => [tid, cur.key] satisfies [string, CurrencyKey]) + .map(([tid, curKey]) => + cent.liquidityPools.updateTokenPrice([poolId, tid, curKey, domain.chainId], { batch: true }) + ) + }) + ) : [] return combineLatest([cent.pools.closeEpoch([poolId, false], { batch: true }), ...updateTokenPrices]).pipe(