Skip to content

Commit

Permalink
Earn position: fix deposit & coll reward values (dashboard) (#815)
Browse files Browse the repository at this point in the history
  • Loading branch information
bpierre authored Feb 3, 2025
1 parent 892fad7 commit 4478b89
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions frontend/app/src/comps/Positions/PositionCardEarn.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,10 @@ import { CardRow, CardRows } from "./shared";
export function PositionCardEarn({
owner,
collIndex,
deposit,
}: Pick<
PositionEarn,
| "owner"
| "collIndex"
| "deposit"
>) {
const token = getCollToken(collIndex);
const earnPool = useEarnPool(collIndex);
Expand Down Expand Up @@ -54,7 +52,11 @@ export function PositionCardEarn({
main={{
value: (
<HFlex gap={8} alignItems="center" justifyContent="flex-start">
<Amount value={deposit} format={2} />
<Amount
value={earnPosition.data?.deposit}
fallback="−"
format={2}
/>
<TokenIcon size="medium" symbol="BOLD" />
</HFlex>
),
Expand Down
2 changes: 1 addition & 1 deletion frontend/app/src/subgraph-hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,7 @@ function subgraphStabilityPoolDepositToEarnPosition(
type: "earn",
owner: spDeposit.depositor,
collIndex,
deposit: dnum18(spDeposit.deposit),
deposit: dnum18(0),
rewards: {
bold: dnum18(0),
coll: dnum18(0),
Expand Down

0 comments on commit 4478b89

Please sign in to comment.