Wasmswap / wasmswap-interface

Apache License 2.0
28 stars 67 forks source link

Refactor pricing queries #250

Closed sashimi36 closed 2 years ago

sashimi36 commented 2 years ago

Improve usability of the pricing queries used in the code base. Right now we're using these 5 queries for token conversion.

  1. usePoolTokenToTokenAssetAmount is used to figure out the amount of token asset in a given pool based on liquidity pool token amount.
  2. useTokenToTokenPrice is used to get the price of token A for token B
  3. usePriceForOneToken is a helper query based on useTokenToTokenPrice to fetch one token A for token B price.
  4. usePoolTokensDollarValue is used to figure out dollar value of a given liquidity token.
  5. useTokenDollarValue is used to figure out a token asset dollar value.
netlify[bot] commented 2 years ago

Deploy Preview for laughing-agnesi-30fb23 ready!

Name Link
Latest commit 00b9ab2ff6ab2c126f9be8d9fa5ac4c4c3923ab4
Latest deploy log https://app.netlify.com/sites/laughing-agnesi-30fb23/deploys/62faca4affb17400081f4ff0
Deploy Preview https://deploy-preview-250--laughing-agnesi-30fb23.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.