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

loyalty card methods for shopify #291

Open
sebpalluel opened this issue Apr 4, 2024 · 0 comments
Open

loyalty card methods for shopify #291

sebpalluel opened this issue Apr 4, 2024 · 0 comments

Comments

@sebpalluel
Copy link
Contributor

  • Create GET method hasLoyaltyCard:
  1. libs/integrations/external-api-handlers/src/lib/shopify.ts
  2. apps/web/app/api/shopify/loyalty-card/[contractAddress]/route.ts
    Do Unit tests
  • Create CRON (every 5 min), processLoyaltyCardsMint on library features-loyalty-card-cron
  1. Get LoyaltyCardNft with status 'CONFIRMED' or 'ERROR' libs/nft/loyalty-card/src/lib/index.ts and order them by contractAddress
  2. Retrieve the minterTemporaryWallet for each and process with multiClaim. libs/nft/thirdweb-organizer-loyalty-card/src/lib/index.ts
  3. When done update loyaltyCardNft status & handle edge cases.
    Do Unit tests + integration tests.
  • Create Webhook handler for loyalty card activity (libs/features/back-office/loyalty-card-api/src/lib/createWebhooksForLoyaltyCard.ts) defined here libs/indexer/alchemy/webhooks. Rename nftActivity for eventPassActivity. Make sure to organise code so it can reuse commons functions.
  1. Watch for the assignation from the contract do the ownerAddress and mark the loyaltyCardNft as Completed when done.
    Do Unit test
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

No branches or pull requests

1 participant