-
Notifications
You must be signed in to change notification settings - Fork 580
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: Check if network is mainnet or testnet depending on env #936
Conversation
keyword: 'snapshotNetwork', | ||
validate: function (schema, data) { | ||
// @ts-ignore | ||
const snapshotEnv = this.snapshotEnv || 'default'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why don't we default to mainnet
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We now support all networks 🙈 so i thought it is the default case
we can change it later because,
If we make mainnet default, then we need to change the sequencer code before merging this, else demo.snapshot.org will also accept only mainnet networks
Also, UI still displays all networks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So everything works like before, without the 3rd param ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep should work
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #936 +/- ##
==========================================
+ Coverage 44.19% 44.96% +0.76%
==========================================
Files 22 22
Lines 2100 2133 +33
Branches 195 200 +5
==========================================
+ Hits 928 959 +31
- Misses 1162 1164 +2
Partials 10 10 ☔ View full report in Codecov by Sentry. |
snapshotKeyword
to check if the network exists in networks.json or notmainnet
it will check only mainnet networkstestnet
it will check only testnet networksTo Do:
validateSchema
function to pass the env in the third optional param