Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #1
Background
Thus far the webhooks subscriptions were added and removed manually by the team. This interface will allow users to manage their subscriptions themselves 🎉
Repo built on the foundation of
sx-ui
, that's why it looks nice ❤️Related PRs
Assumptions
Infrastructure & Handoff (changes)
For better readability and review, I sketched the infrastructure:
And also prepared a hand off which is basically a todo list per scope, might help with review the PR 🙏
Handoff
As a user I can login and see my subscriptions
Connect button
if user is not connecteduseWeb3
to connectGET
endpoint for/subscriptions/:owner
getOwnersSubscriptions
function to fetch all subs whereowner = owner AND active = 1
As a user I can add a subscription or subscribe to all
Add a subscription
SubscriptionModal
with form:space
andurl
space
list should have an option to select all / add a checkbox to select all which will disable list of spacesAll spaces
to the spaces list - which will create sub for all spaceshandleSubmit
should trigger a signature viauseClient
composableclient.ts
andclientEIP712.ts
helpers to use*snapshot.js*
clientswebhook
in theclient
Webhook
:Webhook
send an API call to ***************snapshot-webhook
instead of hub/subscriptions
sendEventToWebhookSubscribers
space
param is a*
send events from all spacesspace
param is anid
- send events from that space onlyAs a user I can remove a subscription
RemoveSubscriptionModal
with confirmation and form incl subscription idhandleSubmit
should trigger a signature viauseClient
composableremoveWebhook
in theclient
RemoveWebhook
:RemoveWebhook
send an API call to ***************snapshot-webhook
instead of hub/subscriptions/:id
set active = 0 where id = :id
Screenshots & recordings
Welcome view
Subscriptions view
User flow
Remaining TODOS