Skip to content

Commit

Permalink
Undo reserves
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonMHasperhoven authored and cronokirby committed Dec 10, 2024
1 parent 651ce9f commit ae3c1fc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/shared/math/position.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,9 @@ export const planToPosition = (plan: PositionPlan): Position => {
plan.baseAsset.exponent,
plan.quoteAsset.exponent,
);
const raw_r1 = pnum(plan.baseReserves, plan.baseAsset.exponent).toAmount();
const raw_r2 = pnum(plan.quoteReserves, plan.quoteAsset.exponent).toAmount();

const raw_r1 = pnum(plan.baseReserves).toAmount();
const raw_r2 = pnum(plan.quoteReserves).toAmount();

const correctOrder = compareAssetId(plan.baseAsset.id, plan.quoteAsset.id) <= 0;
const [[p, q], [r1, r2]] = correctOrder
Expand Down

0 comments on commit ae3c1fc

Please sign in to comment.