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

Add initialization error events #396

Open
wants to merge 4 commits into
base: polygon-prototype-staging
Choose a base branch
from

Conversation

gianfra-t
Copy link
Contributor

@gianfra-t gianfra-t commented Jan 21, 2025

Closes #391

Changes

  • Adds a new event InitializationErrorEvent.
  • Adds new logic such that each variant is only fired once. This state is saved on the local storage because the nature of this events imply the user will potentially refresh many times the page, or come back to it many times.
  • Refactors slightly how ready and initializeFailedMessage are set on the main component.
  • Also refactors fetchSigningServiceAccountId such that it distinguishes errors.
  • The state of fired initialization errors is cleared once the app starts correctly once. After that, any new error would trigger a new event.

Additional notes

The new tag initalization_error was added to tag manager and tested on the preview.

@gianfra-t gianfra-t linked an issue Jan 21, 2025 that may be closed by this pull request
Copy link

netlify bot commented Jan 21, 2025

Deploy Preview for pendulum-pay ready!

Name Link
🔨 Latest commit 5c40814
🔍 Latest deploy log https://app.netlify.com/sites/pendulum-pay/deploys/679124101c45f50008122ee5
😎 Deploy Preview https://deploy-preview-396--pendulum-pay.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.

@gianfra-t gianfra-t marked this pull request as ready for review January 22, 2025 18:55
@gianfra-t gianfra-t requested a review from a team January 22, 2025 18:55
if (!pendulumNode.apiComponents?.api && pendulumNode?.isFetched) {
setApiInitializeFailed(true);
trackEvent({ event: 'initialization_error', error_message: 'node_connection_issue' });
}
Copy link
Contributor Author

@gianfra-t gianfra-t Jan 22, 2025

Choose a reason for hiding this comment

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

As much as I would like to add this to the useEffect below that sets the signing service error, they depend on different queries and would trigger multiple times.

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.

Add value to form_error event
1 participant