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

Feature/claim poaps inside kiosk #138

Merged
merged 27 commits into from
Oct 23, 2023

Conversation

actuallymentor
Copy link
Contributor

@actuallymentor actuallymentor commented Sep 27, 2023

This introduces a number of visible and invisible upgrades:

  • Admin button for "recalculate available codes"
  • The above required a refactoring of the underlying code, which we optimised
  • Minting POAPs within Kiosk, which integrates with the app, and also stores the last claimed-to address
  • Adds a scalability improvement where if someone scanned and they try to claim, but at that moment someone else already claimed the code (super edge case, but when 100s of people scan at the same time it could happen) there is now a farmer-proof way for us to issue a new code to the user. This in entirely invisible to the user but means anyone who scans and is not a bot will claim a code even in very very very high throughput situations. Note that this is NOT compatible with naive mode or custom claim base urls. Those still work but do not have the same retryability.

@github-actions
Copy link

github-actions bot commented Sep 27, 2023

Visit the preview URL for this PR (updated for commit f06169e):

https://qr-kiosk-dev--pr138-feature-claim-poaps-vhkwwmfw.web.app

(expires Wed, 22 Nov 2023 17:39:31 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 2f5ca7ecd33508df1c3847295db053bb3195c8bc

@actuallymentor
Copy link
Contributor Author

@arvee-init posting gameplan here for merging to dev and then testing:

Todo to deploy in-kiosk minting to DEVELOPMENT

After deployment, test the following manually

  1. Make a testing event
  2. Claim a live code
  3. Scan a live code without claiming
  4. Does the counter show that 2 codes are unavailable?
  5. Click refresh counter button int he admin panel
  6. Does the counter show that only 1 code is unavailable? (Because the scanned but unclaimed code was released due to the button press)
  7. Scan a claim, but do not click the mint button yet. Ninja-claim the POAP manually in a different tab, and see if it still succeeds (it should)

@arvee-init
Copy link
Contributor

  • Make a testing event ✅
  • Claim a live code ✅
  • Scan a live code without claiming ✅
  • Does the counter show that 2 codes are unavailable? ✅
  • Click refresh counter button int he admin panel ✅
  • Does the counter show that only 1 code is unavailable? (Because the scanned but unclaimed code was released due to the button press) ✅
  • Scan a claim, but do not click the mint button yet. Ninja-claim the POAP manually in a different tab, and see if it still succeeds (it should) ✅

@arvee-init
Copy link
Contributor

FYI @actuallymentor all requested checks have passed:

  • Admin button for "recalculate available codes" is renamed to "Refresh counter"
  • Admin panel refactored
  • Hot toast added
  • Testing reconfigure for minting flow and Admin panel

@arvee-init arvee-init merged commit 6282fa6 into development Oct 23, 2023
6 checks passed
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