Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inverted price results #11

Open
claudebarde opened this issue Jun 8, 2021 · 0 comments
Open

Inverted price results #11

claudebarde opened this issue Jun 8, 2021 · 0 comments

Comments

@claudebarde
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant