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

Update CMS Instantly on Contribution and Add Validation Delay #78

Merged
merged 1 commit into from
Mar 28, 2024

Conversation

baumstern
Copy link
Contributor

@baumstern baumstern commented Mar 28, 2024

This PR introduces two major changes to improve how contributions are reflected in the CMS:

  • Instant CMS Update: Upon a contribution event, the CMS is now immediately updated to reflect the new contribution.
  • Delayed Validation: After updating the CMS, the CMS now waits for 30 seconds before calling the api/contributions/validate route. This validation step checks if the contribution tx has been successfully processed and included in a block. If the tx is reverted for any reason, the corresponding contribution entry is removed from the CMS.

Background Issue: Previously, the CMS entry for a contribution was created only after the backend confirmed that the transaction was successfully included in a block. However, this process faced a critical issue with Netlify's 10-second execution limit. If the transaction receipt could not be obtained within 10 seconds, the CMS failed to update with the new contribution data, leading to missing entries

Copy link

netlify bot commented Mar 28, 2024

Deploy Preview for voicedeck ready!

Name Link
🔨 Latest commit 32bad39
🔍 Latest deploy log https://app.netlify.com/sites/voicedeck/deploys/6605dd36a10d2000080dd96b
😎 Deploy Preview https://deploy-preview-78--voicedeck.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.

@baumstern baumstern changed the base branch from main to dev March 28, 2024 21:19
@baumstern baumstern changed the title wip fix: add a route for validating contribution tx Mar 28, 2024
Copy link

netlify bot commented Mar 28, 2024

Deploy Preview for vd-dev ready!

Name Link
🔨 Latest commit e1396ef
🔍 Latest deploy log https://app.netlify.com/sites/vd-dev/deploys/6605def1a674f80007b4f14c
😎 Deploy Preview https://deploy-preview-78--vd-dev.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.

@baumstern baumstern changed the title fix: add a route for validating contribution tx Update CMS Instantly on Contribution and Add Validation Delay Mar 28, 2024
@baumstern baumstern marked this pull request as ready for review March 28, 2024 21:25
Copy link
Member

@thebeyondr thebeyondr left a comment

Choose a reason for hiding this comment

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

looks good

@thebeyondr thebeyondr merged commit e74ae42 into dev Mar 28, 2024
7 checks passed
@thebeyondr thebeyondr deleted the hotfix/cms branch March 28, 2024 22:53
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.

2 participants