quipuswap-sdk
quipuswap-sdk copied to clipboard
Inverted price results
I am using the following code inside a loop to fetch the prices of multiple tokens:
const dex = await findDex(Tezos, factories, token);
const dexStorage = await dex.contract.storage();
const tokenValue = 1 * 10 ** tokenInfo.decimals;
const inTezValue = estimateTezInToken(dexStorage, tokenValue);
const inTokenValue = estimateTokenInTez(dexStorage, 1_000_000);
This piece of code returns the right prices for the tokens except for STKR, ETHtz and hDAO where the price in inTezValue
is the expected price for inTokenValue
and vice-versa.