fixes liquidity data provider
This commit is contained in:
parent
eba2a8ac70
commit
776985b7fd
@ -123,11 +123,11 @@ export const useLiquidityProvision = ({
|
||||
) // if partyId is provided, filter out other parties
|
||||
.map((provider: MarketLiquidity_market_data_liquidityProviderFeeShare) => {
|
||||
const liquidityProvisionConnection =
|
||||
data?.market?.liquidityProvisionsConnection.edges?.find(
|
||||
data?.market?.liquidityProvisionsConnection?.edges?.find(
|
||||
(e) => e?.node.party.id === provider.party.id
|
||||
);
|
||||
const balance =
|
||||
liquidityProvisionConnection?.node?.party.accountsConnection.edges?.reduce(
|
||||
liquidityProvisionConnection?.node?.party.accountsConnection?.edges?.reduce(
|
||||
(acc, e) => {
|
||||
return e?.node.type === AccountType.ACCOUNT_TYPE_BOND // just an extra check to make sure we only use bond accounts
|
||||
? acc.plus(new BigNumber(e?.node.balance ?? 0))
|
||||
|
Loading…
Reference in New Issue
Block a user