Skip to content

Conversation

dib542
Copy link
Collaborator

@dib542 dib542 commented Jun 29, 2023

This PR adds fixes related to the changes and features from the API upgrade from v0.1.2 to v0.2.1

  • adds fake tokens in development to help visualize usage with many token pairs
  • removal of fee bucket logic: the chart now displays all fees from all tiers, all at once
  • show "behind enemy lines" liquidity better
    • resolve current price better when some liquidity is "behind enemy lines"
    • display this liquidity on chart: cumulative with other token liquidity and placed below regular liquidity
  • removal of useRpc and useLcdClient hooks that were found to be unreliable
    • they would sometimes resolve a requested hook and make requests and sometimes not
    • likely related to the hook only existing after the rpc/lcd promise has resolved
    • if the usage of these hooks can be made reliable then they could be used again
  • resolve issue of useQueries hooks recomputing referentially unstable results on every render
    • by refactoring how useQueries is used
  • resolves token and stake prices better
    • when in a list with other tokens the "price" of token and stake would always be 0, which could look weird. Now they always resolve to 1USD, which is still weird, but visually much less weirder.

dib542 added a commit that referenced this pull request Jun 29, 2023
@github-actions
Copy link

@dib542 dib542 linked an issue Jun 29, 2023 that may be closed by this pull request
@dib542 dib542 force-pushed the 363-upgrade-api-to-backend-v021-fixes branch from 59f0a45 to b5b354b Compare June 29, 2023 14:50
@github-actions
Copy link

dib542 added a commit that referenced this pull request Jun 29, 2023
@github-actions
Copy link

github-actions bot commented Jul 8, 2023

@dib542 dib542 force-pushed the 363-upgrade-api-to-backend-v021-fixes branch from d0831ad to 2978e18 Compare July 8, 2023 11:25
dib542 added 21 commits July 8, 2023 21:25
    - by allowing them to be grouped into buckets
    - and stacking bucket values on top of each other in the chart
    - calculate the midpoint in a way to minimize the amount of
      liquidity value that is "behind enemy lines" of the midpoint
this value well represents value near the pair price and at extremes
    - eg. using a pair price of 100:
        - 1 token1 placed at price 10,000,000,000 is value of 100
        - 1 token0 placed at price 0.00000000001 is value of 0.01
    - the value of the bucket height represents the relative value
      of depositing that amount of reserves at this point in time
      (at this price, assuming our price is relatively accurate)
dib542 added 23 commits July 8, 2023 21:25
    - and make the context properties more clearly differentiated
    - this should help us not have to check for the pairID property
      whenever we want to use the type
    - until the data is fixed
    - currently the endpoint only return positive index shares
    - these trigger a dev console error
    - fix by explicitly returning null
    - these methods were unreliable and would sometimes not connect
      to the endpoint as intended
    - possibly the resolving of the promise did not set the new value
@dib542 dib542 force-pushed the 363-upgrade-api-to-backend-v021-fixes branch from 2978e18 to dbd05b7 Compare July 8, 2023 11:25
@github-actions
Copy link

github-actions bot commented Jul 8, 2023

@dib542 dib542 merged commit bc02e13 into main Jul 8, 2023
@dib542 dib542 deleted the 363-upgrade-api-to-backend-v021-fixes branch July 8, 2023 11:50
dib542 pushed a commit that referenced this pull request Jul 8, 2023
## [0.2.2](v0.2.1...v0.2.2) (2023-07-08)

### Features

* upgrade API to backend v0.1.2-v0.2.1 fixes ([#382](#382)) ([bc02e13](bc02e13))
@dib542
Copy link
Collaborator Author

dib542 commented Jul 8, 2023

🎉 This PR is included in version 0.2.2 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@dib542 dib542 added the released label Jul 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upgrade API to backend v0.2.1
1 participant