Skip to content

Commit

Permalink
fix: lp collect fee
Browse files Browse the repository at this point in the history
  • Loading branch information
viet-nv committed Aug 1, 2023
1 parent f813d98 commit a4c6278
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ const PositionView: React.FC<CommonProps> = props => {
feeValue0={feeReward0}
feeValue1={feeReward1}
hasUserDepositedInFarm={positionEarning.owner !== positionEarning.ownerOriginal}
farmAddress={positionEarning.joinedPositions?.[0]?.farmId}
farmAddress={positionEarning.depositedPosition?.farm || positionEarning.joinedPositions?.[0]?.farmId}
poolAddress={positionEarning.pool.id}
position={position}
isLegacy={isLegacyPosition}
Expand Down
2 changes: 2 additions & 0 deletions src/services/earning/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ const earningApi = createApi({
includeMyFarmApr: true,
perPage: 1000,
page: 1,
includeHistorical: true,
}

const [positionsRes, earningRes] = await Promise.all([
Expand Down Expand Up @@ -88,6 +89,7 @@ const earningApi = createApi({
includeMyFarmApr: true,
perPage: 1000,
page: 1,
includeHistorical: true,
}

const [positionsRes, earningRes] = await Promise.all([
Expand Down
3 changes: 3 additions & 0 deletions src/services/earning/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ export type ElasticPositionEarningWithDetails = {
pendingRewardUSD: string
myPoolApr?: string
myFarmApr?: string
depositedPosition?: {
farm: string
}
joinedPositions?: {
farmId: string
farmingPool: {
Expand Down

0 comments on commit a4c6278

Please sign in to comment.