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 assets from batching server #542

Merged

Conversation

Sharqiewicz
Copy link
Collaborator

@Sharqiewicz Sharqiewicz commented Aug 28, 2024

🦈

  • The filters for the column should work for only two combinations i.e descending to ascending and vice versa and not other combination, currently it works for three combination where the third combination is unclear
  • Add a default filter to the portal dashboard based on the USD value of the tokens, from descending to ascending
  • Add prices for all the portal assets (Implemented fetching prices from the batching server)
  • Fix styles of the tables

Local Development

The proxy server is implemented to bypass CORS-related issues when running the portal locally.

Unlike the browser, the proxy server does not trigger a preflight request, which is initiated by the browser to check permissions for cross-origin resource sharing (CORS). The preflight request can block communication between the portal and the batching server, causing interruptions in the connection.

Copy link

netlify bot commented Aug 28, 2024

Deploy Preview for rococo-souffle-a625f5 ready!

Name Link
🔨 Latest commit 8e779dd
🔍 Latest deploy log https://app.netlify.com/sites/rococo-souffle-a625f5/deploys/66e302ab8192a60008a93703
😎 Deploy Preview https://deploy-preview-542--rococo-souffle-a625f5.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 configuration.

@Sharqiewicz Sharqiewicz marked this pull request as draft September 3, 2024 10:55
@Sharqiewicz Sharqiewicz marked this pull request as ready for review September 5, 2024 09:27
@Sharqiewicz
Copy link
Collaborator Author

@pendulum-chain/devs Ready for review. The prices won't work on deploy preview - CORS policy of the browser is going to block communication between the batching server and the portal.

In order to test it you have to run it locally, with local proxy server setup.
If you want to fetch prices locally, you can use the proxy server available at pendulum-tools (Currently PR in review). Change url in
src/hooks/usePriceFetcher.ts file to http://localhost:3000

CORS policy of the batching-server is set to portal.pendulumchain.org so the production price fetching is going to work.

Copy link
Member

@ebma ebma left a comment

Choose a reason for hiding this comment

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

I tested this locally with a local batching server (with CORS enabled) and the proxy server and I can confirm the changes work. Great job @Sharqiewicz 👍 Let's wait with merging until the new batching server is redeployed.

src/hooks/usePriceFetcher.ts Outdated Show resolved Hide resolved
@Sharqiewicz
Copy link
Collaborator Author

@ebma Please merge when the batching server is redeployed

@ebma
Copy link
Member

ebma commented Sep 6, 2024

Will do. This will probably happen on Monday, see the related change request here.

@ebma ebma merged commit eb11d06 into main Sep 12, 2024
1 check passed
@ebma ebma deleted the 439-portal-dashboard-add-prices-for-assets-update-filter-to-dashboard branch September 12, 2024 15:03
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

Successfully merging this pull request may close these issues.

Portal dashboard - Add prices for assets, update filter to dashboard
2 participants