Skip to content

Commit

Permalink
Centrifuge App: Fix asset detail when subquery is down (#1653)
Browse files Browse the repository at this point in the history
  • Loading branch information
onnovisser authored Oct 23, 2023
1 parent 432b726 commit ad8de44
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions centrifuge-app/src/utils/usePools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,8 @@ export function useAllTransactions(address?: string) {
}

export function useInvestorTransactions(poolId: string, trancheId?: string, from?: Date, to?: Date) {
const [result] = useCentrifugeQuery(
['investorTransactions', poolId, trancheId, from, to],
(cent) => cent.pools.getInvestorTransactions([poolId, trancheId, from, to]),
{
suspense: true,
}
const [result] = useCentrifugeQuery(['investorTransactions', poolId, trancheId, from, to], (cent) =>
cent.pools.getInvestorTransactions([poolId, trancheId, from, to])
)

return result
Expand All @@ -81,7 +77,6 @@ export function useBorrowerTransactions(poolId: string, from?: Date, to?: Date)
['borrowerTransactions', poolId, from, to],
(cent) => cent.pools.getBorrowerTransactions([poolId, from, to]),
{
suspense: true,
enabled: !poolId.startsWith('0x'),
}
)
Expand Down Expand Up @@ -119,7 +114,6 @@ export function useBorrowerAssetTransactions(poolId: string, assetId: string, fr
)
},
{
suspense: true,
enabled: !!pool && !poolId.startsWith('0x') && !!loan,
}
)
Expand Down

0 comments on commit ad8de44

Please sign in to comment.