Skip to content

Commit

Permalink
Fix display amounts for range liquidity form
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonMHasperhoven authored and cronokirby committed Dec 10, 2024
1 parent d31cbe5 commit 651ce9f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/pages/trade/ui/order-form/order-form-range-liquidity.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -160,12 +160,12 @@ export const RangeLiquidityOrderForm = observer(() => {
<ConnectButton actionType='default' />
)}
</div>
{exchangeRate !== null && (
{price !== undefined && (
<div className='flex justify-center p-1'>
<Text small color='text.secondary'>
1 {baseAsset.symbol} ={' '}
<Text small color='text.primary'>
{exchangeRate} {quoteAsset.symbol}
{price} {quoteAsset.symbol}
</Text>
</Text>
</div>
Expand Down
4 changes: 2 additions & 2 deletions src/pages/trade/ui/order-form/store/range-liquidity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,8 @@ export class RangeLiquidity {
{ baseAmount: 0n, quoteAmount: 0n },
);

this.baseAsset?.setAmount(pnum(baseAmount, this.baseAsset.exponent).toRoundedNumber());
this.quoteAsset?.setAmount(pnum(quoteAmount, this.quoteAsset.exponent).toRoundedNumber());
this.baseAsset?.setAmount(Number(baseAmount));
this.quoteAsset?.setAmount(Number(quoteAmount));

const positionsReq = new TransactionPlannerRequest({
positionOpens: positions.map(position => ({ position })),
Expand Down

0 comments on commit 651ce9f

Please sign in to comment.