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

Save email into GoogleSpreadsheet #125

Conversation

Sharqiewicz
Copy link
Contributor

@Sharqiewicz Sharqiewicz commented Aug 28, 2024

🦄 Description

On both successful and unsuccessful screen show the Submit button next to the input field
On clicking the "Submit" button the email address should be captured in a google sheet
Use the server side dumping sheet to store this information

Backend

  • unify googleSpreadsheet controllers
  • implement googleSpreadsheet email controller
  • update googleSpreadsheet storage controller
  • unify validateInputHeaderValues for storage and email routes
  • add email routes
  • connect email router

Frontend

  • implement getPattern for TextInput
  • implement saveUserEmail for EmailForm component

🦄 How to test?

  1. Go through the Vortex Offramp process to see the Success/Error pages
    (Or you can mock the router in the swap/index.tsx)

  2. Input your email address and submit the form

  3. Check if your email is listed in the Google Spreadsheet (if you cannot find the url - ask me about the url)

Copy link

netlify bot commented Aug 28, 2024

Deploy Preview for pendulum-pay ready!

Name Link
🔨 Latest commit 6c61324
🔍 Latest deploy log https://app.netlify.com/sites/pendulum-pay/deploys/66d1efb2df3b890007b7eccb
😎 Deploy Preview https://deploy-preview-125--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.

@Sharqiewicz Sharqiewicz changed the title Submit Email Submit Email into GoogleSpreadsheet Aug 28, 2024
@Sharqiewicz Sharqiewicz changed the title Submit Email into GoogleSpreadsheet Save email into GoogleSpreadsheet Aug 28, 2024
…r-email-field-on-successful-and-unsuccessful-screen
@Sharqiewicz
Copy link
Contributor Author

@pendulum-chain/devs Ready for review

Copy link
Contributor

@gianfra-t gianfra-t 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 to me! If you tested it, then I think is ready.

General question @prayagd , would it also make sense to save the transactionId along with the timestamp? I know it is not in the issue, but perhaps it may make easier tracking the error.

src/components/EmailForm/index.tsx Outdated Show resolved Hide resolved
Copy link
Member

@ebma ebma left a comment

Choose a reason for hiding this comment

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

I only checked the code but didn't test the flow yet.

signer-service/src/api/controllers/storage.controller.js Outdated Show resolved Hide resolved
signer-service/src/api/routes/v1/index.js Show resolved Hide resolved
src/components/EmailForm/index.tsx Outdated Show resolved Hide resolved
src/services/storage/storeUserEmailInBackend.ts Outdated Show resolved Hide resolved
Copy link
Collaborator

@TorstenStueber TorstenStueber left a comment

Choose a reason for hiding this comment

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

I agree with the minor comments by @ebma. However, the PR looks good overall. I'll already approve.

@Sharqiewicz
Copy link
Contributor Author

Sharqiewicz commented Aug 30, 2024

Looks good to me! If you tested it, then I think is ready.

General question @prayagd , would it also make sense to save the transactionId along with the timestamp? I know it is not in the issue, but perhaps it may make easier tracking the error.

I've added transactionId ✅

Copy link
Member

@ebma ebma left a comment

Choose a reason for hiding this comment

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

Thanks for addressing my comments 👍 looks good to me

@Sharqiewicz Sharqiewicz merged commit 04940b3 into polygon-prototype-staging Aug 30, 2024
5 checks passed
@ebma ebma deleted the 91-add-submit-button-for-email-field-on-successful-and-unsuccessful-screen branch August 30, 2024 16:55
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 submit button for email field on successful and unsuccessful screen
4 participants