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: follow a space #282

Closed
5 tasks done
bonustrack opened this issue Apr 16, 2024 · 6 comments · Fixed by #294
Closed
5 tasks done

feat: follow a space #282

bonustrack opened this issue Apr 16, 2024 · 6 comments · Fixed by #294
Assignees
Labels

Comments

@bonustrack
Copy link
Member

bonustrack commented Apr 16, 2024

For Snapshot spaces only, we should replace favorite icon on space overview with a button "Follow" like this:
image
When followed, the label should be "Following" like this:
image
On mouse over if already followed, it should show "Unfollow" in red like this:
image

Instead of adding the space in the localStorage like favorite, it should send an action to Snapshot sequencer to do a follow. This require session key, or "alias". This is something we do on Snapshot, when someone try to follow a space for the first time, we generate an Ethereum private key and store it in local storage with a corresponding logged user address, then we sign a message from the logged wallet to give authority to the session key to be used to do action like follow. Then we can do a follow action with the session key (signing in the browser without going through the wallet). The session key should only be created when needed (on first follow), we don't want to have signing wall on user arrival.

We should also display the followed spaces on the very left sidebar, (along with favorites)
image
This can be done in a separated PR.

Tasks

@wa0x6e wa0x6e self-assigned this Apr 17, 2024
@wa0x6e
Copy link
Contributor

wa0x6e commented Apr 17, 2024

Should we extract the session key in another PR, or keep in this one ?

And do starknet address can also follow snapshot space, or do we restrict it to only EVM address ?

@bonustrack
Copy link
Member Author

The more we separate the better is it IMO. And we should not support SX spaces or Starknet wallet.

@wa0x6e
Copy link
Contributor

wa0x6e commented Apr 17, 2024

So we should disable following for users logged in with starknet wallet ? Just disable or fallback to favorite like now ?

@bonustrack
Copy link
Member Author

We can remove the button for Starknet user on Snapshot space

@wa0x6e
Copy link
Contributor

wa0x6e commented Apr 18, 2024

Do we also add followed spaces in the sidebar ?

@bonustrack
Copy link
Member Author

Yes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants