diff --git a/apps/trading/components/fees-container/fees-container.tsx b/apps/trading/components/fees-container/fees-container.tsx index 72186f6cd..11c7f13a3 100644 --- a/apps/trading/components/fees-container/fees-container.tsx +++ b/apps/trading/components/fees-container/fees-container.tsx @@ -310,16 +310,25 @@ export const CurrentVolume = ({ const t = useT(); const nextTier = tiers[tierIndex + 1]; const requiredForNextTier = nextTier - ? Number(nextTier.minimumRunningNotionalTakerVolume) - windowLengthVolume - : 0; + ? new BigNumber(nextTier.minimumRunningNotionalTakerVolume).minus( + windowLengthVolume + ) + : new BigNumber(0); + const currentVolume = new BigNumber(windowLengthVolume); return (
- {requiredForNextTier > 0 && ( + {requiredForNextTier.isGreaterThan(0) && ( { createdAt: '2022-12-16T09:28:29.071781Z', id: 'dde288688af2aeb5feb349dd72d3679a7a9be34c7375f6a4a48ef2f6140e7e59', fee: '0.001', + partyId: + 'dde288688af2aeb5feb349dd72d3679a7a9be34c7375f6a4a48ef2f6140e7e59', party: { __typename: 'Party', accountsConnection: { diff --git a/libs/liquidity/src/lib/liquidity-data-provider.ts b/libs/liquidity/src/lib/liquidity-data-provider.ts index a2ed95820..8c88e7601 100644 --- a/libs/liquidity/src/lib/liquidity-data-provider.ts +++ b/libs/liquidity/src/lib/liquidity-data-provider.ts @@ -159,7 +159,14 @@ export const getLiquidityProvision = ( const liquidityProvider = liquidityProviders.find( (f) => liquidityProvision.party.id === f.partyId ); - if (!liquidityProvider) return liquidityProvision; + + if (!liquidityProvider) { + return { + ...liquidityProvision, + partyId: liquidityProvision.party.id, + }; + } + const accounts = compact( liquidityProvision.party.accountsConnection?.edges ).map((e) => e.node);