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

Moves chain manager to pinia #850

Open
wants to merge 15 commits into
base: develop
Choose a base branch
from
Open

Conversation

karynemayer
Copy link
Contributor

@karynemayer karynemayer commented May 13, 2024

Description

  • Changes environment variables
  • Moving ConfigManager to NetworkStore inside of Pinia

Test scenarios

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have cleaned up the code in the areas my change touches
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules
  • I have checked my code and corrected any misspellings
  • I have removed any unnecessary console messages
  • I have included all english text to the translation file and/or created a new issue with the required translations for the currently supported languages
  • I have updated relevant documentation and/or opened a separate issue to cover the updates (Issue URL: )

Copy link

cloudflare-workers-and-pages bot commented May 13, 2024

Deploying open-block-explorer with  Cloudflare Pages  Cloudflare Pages

Latest commit: 025b26c
Status: ✅  Deploy successful!
Preview URL: https://96b60468.open-block-explorer.pages.dev
Branch Preview URL: https://chainmanager-to-pinia.open-block-explorer.pages.dev

View logs

@jaegerfe jaegerfe changed the base branch from wharfkit to develop July 11, 2024 12:51
Copy link

netlify bot commented Jul 11, 2024

Deploy Preview for obe-testnet ready!

Name Link
🔨 Latest commit 025b26c
🔍 Latest deploy log https://app.netlify.com/sites/obe-testnet/deploys/66b6261f71ea050008c60a58
😎 Deploy Preview https://deploy-preview-850--obe-testnet.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.

Copy link

netlify bot commented Jul 11, 2024

Deploy Preview for obe-staging ready!

Name Link
🔨 Latest commit 025b26c
🔍 Latest deploy log https://app.netlify.com/sites/obe-staging/deploys/66b6261f71ea050008c60a5a
😎 Deploy Preview https://deploy-preview-850--obe-staging.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.

@jaegerfe jaegerfe marked this pull request as ready for review July 11, 2024 16:17
Copy link
Collaborator

@Viterbo Viterbo left a comment

Choose a reason for hiding this comment

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

In general, it's a great work!!
I left a couple of comments (it's up to you if you want to make any changes based on them) but also left a couple of change requests that I consider necessary. I marked them as such

Comment on lines +93 to +102
try {
const data: PriceChartData = await networksStore.getCurrentNetwork.getPriceData();
tokenPrice.value = formatCurrencyValue(data.tokenPrice);
dayChange.value = formatPercentage(data.dayChange);
dayVolume.value = formatCurrencyValue(data.dayVolume);
marketCap.value = formatCurrencyValue(data.marketCap);
chartOptions.value.series[0].data = data.prices;
} catch(e) {
console.error('No price data available', e);
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think this try-catch is super correct !!!
However, instead of simply showing the empty fields in the HTML, I would recommend showing a "Price not available" text or something similar.

Copy link
Collaborator

Choose a reason for hiding this comment

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

This is a change request

Copy link
Collaborator

Choose a reason for hiding this comment

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

The 'getPriceData' is an abstract method on the BaseChain class and each chain config file will specify if should call the coingecko API or return an empty object (you can compare both config files for telos and telos-testnet to see that they calls a different function on the price.ts file). Adding this on the catch will not solve the empty charts and will not show the 'Price not available' to the users for chains that doens't implement the call to the API.

For sure I can address this comment and implement this new behavior, but I think it's something out of scope of the proposal on this PR. I would suggest to we create an issue and work on this sepparately.

What do you think?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Created this issue: #872

src/config/NetworkFactory.ts Outdated Show resolved Hide resolved
src/router/index.ts Show resolved Hide resolved
src/stores/networks.ts Outdated Show resolved Hide resolved
@jaegerfe jaegerfe requested a review from Viterbo August 9, 2024 14:25
@jaegerfe
Copy link
Collaborator

jaegerfe commented Aug 9, 2024

Hey @Viterbo, addressed your comments!

The one regarding the Price Chart, I put a comment there, I believe this should be addressed in a different PR since it requires a change of behavior on the UX perspective.

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.

3 participants