From ae3c1fc3b86b4f0b4c3de1ef9f3d9950b907b501 Mon Sep 17 00:00:00 2001 From: "Jason M. Hasperhoven" Date: Tue, 10 Dec 2024 22:25:47 +0400 Subject: [PATCH] Undo reserves --- src/shared/math/position.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/shared/math/position.ts b/src/shared/math/position.ts index b9d83212..dad24fa8 100644 --- a/src/shared/math/position.ts +++ b/src/shared/math/position.ts @@ -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