Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
DonDuala committed Aug 28, 2024
1 parent fdb1304 commit 7d6c789
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions client/ts/src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -499,12 +499,14 @@ function toWrapperPlaceOrderParams(
const baseAtoms = 10 ** market.baseDecimals();
// Converts token price to atom price since not always equal
// Ex. BONK/USDC = 0.00001854 USDC tokens/BONK tokens -> 0.0001854 USDC Atoms/BONK Atoms
const priceQuoteAtomsPerBaseAtoms = wrapperPlaceOrderParamsExternal.price * (quoteAtoms / baseAtoms);
const priceQuoteAtomsPerBaseAtoms =
wrapperPlaceOrderParamsExternal.price * (quoteAtoms / baseAtoms);
// TODO: Make a helper and test it for this logic.
const { priceMantissa, priceExponent } = toMantissaAndExponent(
priceQuoteAtomsPerBaseAtoms
priceQuoteAtomsPerBaseAtoms,
);
const numBaseAtoms : bignum = wrapperPlaceOrderParamsExternal.numBaseTokens * baseAtoms;
const numBaseAtoms: bignum =
wrapperPlaceOrderParamsExternal.numBaseTokens * baseAtoms;

return {
...wrapperPlaceOrderParamsExternal,
Expand Down

0 comments on commit 7d6c789

Please sign in to comment.