Skip to content

Commit

Permalink
Merge branch 'main' of github.com:centrifuge/apps into asset-finance-…
Browse files Browse the repository at this point in the history
…repay-redesign
  • Loading branch information
sophialittlejohn committed Jul 31, 2024
2 parents 8fc9755 + 801d94e commit c1f3204
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 41 deletions.
77 changes: 38 additions & 39 deletions centrifuge-app/src/components/PoolOverview/KeyMetrics.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -178,55 +178,54 @@ const AvailableNetworks = ({ poolId }: { poolId: string }) => {
) : (
<Spinner size="iconSmall" />
)}
{activeDomains.data?.length &&
activeDomains.data
.filter((domain) => domain.isActive)
.map((domain) => {
const chain = (evmChains as any)[domain.chainId]
return (
<Tooltip
delay={300}
bodyWidth="maxContent"
bodyPadding={0}
body={
<Stack p={1} gap={1} backgroundColor="backgroundSecondary">
<Text variant="heading4">{chain.name}</Text>
{pool.tranches.length > 1 ? (
pool.tranches.map((tranche) => (
<a
target="_blank"
rel="noopener noreferrer"
href={`${chain.blockExplorerUrl}token/${domain.trancheTokens[tranche.id]}`}
>
<Shelf gap={1} alignItems="center">
<Text variant="body2" color="black">
View {tranche.currency.name.split(' ').at(-1)}
</Text>{' '}
<IconExternalLink color="black" size="iconSmall" />
</Shelf>
</a>
))
) : (
{activeDomains.data
?.filter((domain) => domain.isActive)
.map((domain) => {
const chain = (evmChains as any)[domain.chainId]
return (
<Tooltip
delay={300}
bodyWidth="maxContent"
bodyPadding={0}
body={
<Stack p={1} gap={1} backgroundColor="backgroundSecondary">
<Text variant="heading4">{chain.name}</Text>
{pool.tranches.length > 1 ? (
pool.tranches.map((tranche) => (
<a
target="_blank"
rel="noopener noreferrer"
href={`${chain.blockExplorerUrl}token/${domain.trancheTokens[pool.tranches[0].id]}`}
href={`${chain.blockExplorerUrl}token/${domain.trancheTokens[tranche.id]}`}
>
<Shelf gap={1} alignItems="center">
<Text variant="body2" color="black">
View transactions
View {tranche.currency.name.split(' ').at(-1)}
</Text>{' '}
<IconExternalLink color="black" size="iconSmall" />
</Shelf>
</a>
)}
</Stack>
}
>
<NetworkIcon size="iconSmall" network={domain.chainId} />
</Tooltip>
)
})}
))
) : (
<a
target="_blank"
rel="noopener noreferrer"
href={`${chain.blockExplorerUrl}token/${domain.trancheTokens[pool.tranches[0].id]}`}
>
<Shelf gap={1} alignItems="center">
<Text variant="body2" color="black">
View transactions
</Text>{' '}
<IconExternalLink color="black" size="iconSmall" />
</Shelf>
</a>
)}
</Stack>
}
>
<NetworkIcon size="iconSmall" network={domain.chainId} />
</Tooltip>
)
})}
</Shelf>
)
}
4 changes: 2 additions & 2 deletions centrifuge-js/src/modules/pools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3496,8 +3496,8 @@ export function getPoolsModule(inst: Centrifuge) {
switchMap((api) =>
combineLatest([
api.queryMulti([
[api.query.investments.investOrders, [address, { poolId, trancheId }]],
[api.query.investments.redeemOrders, [address, { poolId, trancheId }]],
[api.query.investments.investOrders, [address, [poolId, trancheId]]],
[api.query.investments.redeemOrders, [address, [poolId, trancheId]]],
]),
getPoolCurrency([poolId]),
])
Expand Down

0 comments on commit c1f3204

Please sign in to comment.