From 776985b7fd93753176bd38aaad48cb58a94ef6ed Mon Sep 17 00:00:00 2001 From: asiaznik Date: Wed, 14 Sep 2022 12:14:49 +0200 Subject: [PATCH] fixes liquidity data provider --- libs/liquidity/src/lib/liquidity-data-provider.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/liquidity/src/lib/liquidity-data-provider.ts b/libs/liquidity/src/lib/liquidity-data-provider.ts index 70e392a5b..3f55ed044 100644 --- a/libs/liquidity/src/lib/liquidity-data-provider.ts +++ b/libs/liquidity/src/lib/liquidity-data-provider.ts @@ -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))