Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix pending order #2333

Merged
merged 1 commit into from
Jul 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -3494,8 +3494,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
Loading