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

Fetch token prices & history using new Explorer BE endpoints #109

Closed
wants to merge 13 commits into from

Conversation

mvaivre
Copy link
Member

@mvaivre mvaivre commented Nov 17, 2023

⚠️ Is waiting for a new web3 release. cf alephium/alephium-web3#295

Related to #88

Copy link

changeset-bot bot commented Dec 18, 2023

🦋 Changeset detected

Latest commit: 371778e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
alephium-desktop-wallet Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@mvaivre mvaivre force-pushed the fetch-token-prices branch 3 times, most recently from b8a3e55 to c17c15c Compare December 22, 2023 14:02
@mvaivre mvaivre force-pushed the fetch-token-prices branch 5 times, most recently from 47fe4c7 to 50247ca Compare January 3, 2024 08:45
@mvaivre mvaivre changed the title Port work - fetch token prices (wip) Fetch token prices & history using new Explorer BE endpoints Jan 3, 2024
@mvaivre mvaivre marked this pull request as ready for review January 3, 2024 13:01
@mvaivre mvaivre requested a review from nop33 January 3, 2024 13:08
@mvaivre mvaivre removed the 📱 MW Mobile wallet label Jan 3, 2024
Copy link
Member

@nop33 nop33 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code review done ✅

apps/desktop-wallet/src/App.tsx Show resolved Hide resolved
apps/desktop-wallet/src/storage/prices/pricesSelectors.ts Outdated Show resolved Hide resolved
apps/desktop-wallet/src/storage/prices/pricesSelectors.ts Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
@mvaivre mvaivre requested a review from nop33 January 9, 2024 04:42
Copy link
Member

@nop33 nop33 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good, shall I wait for the web3 release for the functional tests?

async ({ tokenSymbol, currency }: { tokenSymbol: string; currency: string }) => {
const rawHistory = (await client.explorer.market.getMarketPricesIdCharts(tokenSymbol, {
currency: currency.toLowerCase()
})) as unknown as [number, number][] // TODO: fix type explorer backend type...
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still pending, right?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Types must have been updated in the latest web3

@nop33
Copy link
Member

nop33 commented Jan 23, 2024

@mvaivre To speed up development, I have rebased this branch to the latest master and I have updated the web3 packages so that we get the latest explorer backend API. There are a few tweaks that still need to be made that were not very obvious to me, I think you are more familiar since you have been in contact with @tdroxler. Instead of force-pushing here, I pushed to a new branch: fetch-token-prices-rebased: https://github.com/alephium/alephium-frontend/tree/fetch-token-prices-rebased

Feel free to use it

@tdroxler
Copy link
Member

@nop33 yeah token price history is not there yet, we will need first to improve the ALPH price history amount endpoint. I discussed this with @mvaivre, but we will probably change a bit the way we do it and use deltas. I described the thing here.

@nop33
Copy link
Member

nop33 commented Jan 29, 2024

Superseded by #322

Closing.

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

Successfully merging this pull request may close these issues.

3 participants