Skip to content

Commit

Permalink
fix: remove use of quote asset when usnig rest
Browse files Browse the repository at this point in the history
  • Loading branch information
mattrussell36 committed Oct 15, 2024
1 parent 1360ddd commit 42621f9
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
12 changes: 6 additions & 6 deletions apps/trading/components/amm/liquidity-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ export const LiquidityForm = ({
value={field.value || ''}
/>
<AssetPill
asset={market.quoteAsset}
asset={market.settlementAsset}
className="-translate-y-1/2 absolute top-1/2 right-2 transform"
/>
</div>
Expand Down Expand Up @@ -196,7 +196,7 @@ export const LiquidityForm = ({
value={field.value || ''}
/>
<AssetPill
asset={market.quoteAsset}
asset={market.settlementAsset}
className="-translate-y-1/2 absolute top-1/2 right-2 transform"
/>
</div>
Expand Down Expand Up @@ -227,7 +227,7 @@ export const LiquidityForm = ({
value={field.value || ''}
/>
<AssetPill
asset={market.quoteAsset}
asset={market.settlementAsset}
className="-translate-y-1/2 absolute top-1/2 right-2 transform"
/>
</div>
Expand Down Expand Up @@ -257,7 +257,7 @@ export const LiquidityForm = ({
value={field.value || ''}
/>
<AssetPill
asset={market.quoteAsset}
asset={market.settlementAsset}
className="-translate-y-1/2 absolute top-1/2 right-2 transform"
/>
</div>
Expand Down Expand Up @@ -289,7 +289,7 @@ export const LiquidityForm = ({
value={field.value || ''}
/>
<AssetPill
asset={market.quoteAsset}
asset={market.settlementAsset}
className="-translate-y-1/2 absolute top-1/2 right-2 transform"
/>
</div>
Expand Down Expand Up @@ -319,7 +319,7 @@ export const LiquidityForm = ({
value={field.value || ''}
/>
<AssetPill
asset={market.quoteAsset}
asset={market.settlementAsset}
className="-translate-y-1/2 absolute top-1/2 right-2 transform"
/>
</div>
Expand Down
2 changes: 1 addition & 1 deletion apps/trading/components/market-card/market-card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export const MarketCard = ({ marketId }: { marketId: string }) => {
<div className="flex gap-2 items-start min-w-0">
<EmblemByAsset
vegaChain={chainId}
asset={market.quoteAsset.id}
asset={market.settlementAsset.id}
size={34}
/>
<div className="min-w-0">
Expand Down
4 changes: 2 additions & 2 deletions apps/trading/lib/utils/amm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export const createSubmitAmmTransaction = (
market: Market
) => {
// required fields
const _amount = Decimal.toString(amount, market.quoteAsset.decimals);
const _amount = Decimal.toString(amount, market.settlementAsset.decimals);
const _fee = String(fee);
const _slippageTolerance = String(slippageTolerance);
const _base = Decimal.toString(base, market.decimalPlaces);
Expand Down Expand Up @@ -81,7 +81,7 @@ export const createAmendAmmTransaction = (
const _slippageTolerance = String(slippageTolerance);

// optional fields
const _amount = Decimal.toString(amount, market.quoteAsset.decimals);
const _amount = Decimal.toString(amount, market.settlementAsset.decimals);
const _fee = fee ? String(fee) : undefined;
const _base = Decimal.toString(base, market.decimalPlaces);
const _upperBound = Decimal.toString(upperBound, market.decimalPlaces);
Expand Down

0 comments on commit 42621f9

Please sign in to comment.