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: allow proposal creation only on premium networks #1120

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

wa0x6e
Copy link
Contributor

@wa0x6e wa0x6e commented Jan 23, 2025

Summary

Closes: https://github.com/snapshot-labs/workflow/issues/389

This PR blocks the proposal creation on offchain spaces using non-premium networks

The message error should superseed all other messages (like voting validation, etc ...)

How to test

  1. Go to the Editor for a space using non-premium network as base network
  2. It should show a warning message, and creation is disabled
  3. Go to the Editor for a space using non-premium network inside the strategies
  4. It should show a warning message, and creation is disabled
  5. Go to the Editor for a space using premium network
  6. Proposal creation is enabled

TODO

  • Waiting for an updated list of whitelisted networks
  • Have a public list, so space admins could update their space with a working network

@wa0x6e wa0x6e marked this pull request as ready for review January 23, 2025 21:07
@wa0x6e wa0x6e force-pushed the feat-allow-proposal-creation-only-on-premium-networks branch from 1bf3090 to 435f21b Compare January 23, 2025 21:08
>
<div>
You cannot create proposals.
<br />
Copy link
Member

Choose a reason for hiding this comment

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

We dont need a new line here

<br />
The space is configured with
<b>{{ unsupportedProposalNetworks[0].name }}</b>
, a non-premium network. Change to a premium network or upgrade
Copy link
Member

Choose a reason for hiding this comment

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

There shouldn't be a space between the network name and the ","

Comment on lines +163 to +167
export const PROPOSALS_NETWORK_WHITELIST: ChainId[] = [
1, //Ethereum
42161, // Arbitrum
137 // Polygon
];
Copy link
Member

Choose a reason for hiding this comment

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

maybe we should add a param premium or subscribed on networks.json instead of a separate list?

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.

3 participants