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

feat: add email subscription #1081

Open
wants to merge 14 commits into
base: master
Choose a base branch
from

Conversation

wa0x6e
Copy link
Contributor

@wa0x6e wa0x6e commented Oct 27, 2024

Toward https://github.com/snapshot-labs/workflow/issues/226
Following snapshot-labs/snapshot-hub#951

This PR will add a new subscription/unsubscription features

  • subscription will allow adding a new subscription when passing an email, and updating an existing subscription when just passing a metadata
  • delete-subscription will allow deleting an existing subscription

By merging the write function from envelop (https://github.com/snapshot-labs/envelop/?tab=readme-ov-file#subscribe-to-the-mailing-list) into snapshot.js, then sequencer, we can leverage the signature and alias feature of sequencer, and will not require an extra handling of transaction signature.

How to tests

See snapshot-labs/snapshot-sequencer#470

@wa0x6e wa0x6e changed the title feat: add-email-subscription-to-profile feat: add email subscription to profile Oct 27, 2024
@wa0x6e wa0x6e marked this pull request as ready for review October 27, 2024 21:46
@wa0x6e wa0x6e requested a review from ChaituVR October 27, 2024 21:47
src/schemas/profile.json Outdated Show resolved Hide resolved
src/schemas/profile.json Outdated Show resolved Hide resolved
test/examples/profile-addEmailSubscription.json Outdated Show resolved Hide resolved
@wa0x6e wa0x6e changed the title feat: add email subscription to profile feat: add email subscription Nov 4, 2024
src/schemas/profile.json Outdated Show resolved Hide resolved
@wa0x6e wa0x6e force-pushed the feat-ad-email-subscriptions-to-user branch from 37c15f3 to 071172e Compare November 12, 2024 11:27
@wa0x6e wa0x6e changed the title feat: add email subscription feat: add email subscription/unsubscription Nov 12, 2024
scripts/generateHashWithTypes.ts Outdated Show resolved Hide resolved
@wa0x6e wa0x6e marked this pull request as draft November 15, 2024 00:17
@wa0x6e wa0x6e marked this pull request as ready for review November 16, 2024 08:16
@wa0x6e wa0x6e requested a review from ChaituVR November 18, 2024 04:09
@wa0x6e
Copy link
Contributor Author

wa0x6e commented Nov 21, 2024

I am thinking that maybe, we should not use a generic subscription name, and directly use email-subscription, to avoid confusion with the existing subscription type returned by the hub.

@ChaituVR
Copy link
Member

I am thinking that maybe, we should not use a generic subscription name, and directly use email-subscription, to avoid confusion with the existing subscription type returned by the hub.

agree

@wa0x6e wa0x6e changed the title feat: add email subscription/unsubscription feat: add email subscription Nov 23, 2024
@@ -7,6 +7,7 @@ import spaceStarknetDelegation from './examples/space-starknet-delegation.json';
import proposalTurbo from './examples/proposal-turbo.json';
import vote from './examples/vote.json';
import profile from './examples/profile.json';
import subscription from './examples/subscription.json';
Copy link
Member

Choose a reason for hiding this comment

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

i think we should rename this file also to avoid confusions

Comment on lines +2 to +4
"type": "email",
"value": "[email protected]",
"metadata": "['summary', 'newProposal']"
Copy link
Member

Choose a reason for hiding this comment

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

not sure what this file is for 🤔

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