Skip to content

Commit

Permalink
fix: add snapshot status var to client env (#1332)
Browse files Browse the repository at this point in the history
  • Loading branch information
1emu authored Oct 10, 2023
1 parent 1281d79 commit 6f25626
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/config/env/dev.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"GATSBY_SNAPSHOT_SPACE": "daotest.dcl.eth",
"GATSBY_SNAPSHOT_URL": "https://demo.snapshot.org/",
"GATSBY_SNAPSHOT_QUERY_ENDPOINT": "https://api.thegraph.com/subgraphs/name/snapshot-labs/snapshot",
"SNAPSHOT_STATUS_ENABLED": "true",
"GATSBY_SUBMISSION_THRESHOLD_DRAFT": "100",
"GATSBY_SUBMISSION_THRESHOLD_GOVERNANCE": "100",
"GATSBY_SUBMISSION_THRESHOLD_POLL": "100",
Expand Down
1 change: 1 addition & 0 deletions src/config/env/local.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"GATSBY_SNAPSHOT_DURATION": "600",
"GATSBY_SNAPSHOT_DELEGATE_CONTRACT_ADDRESS": "0x469788fE6E9E9681C6ebF3bF78e7Fd26Fc015446",
"GATSBY_SNAPSHOT_ADDRESS": "0x2Ba0352480bd1Ea073A83e6639b06362131894CE",
"SNAPSHOT_STATUS_ENABLED": "true",
"GATSBY_DISCOURSE_USER": "dao",
"GATSBY_DISCOURSE_CONNECT_THREAD": "1190",
"GATSBY_DISCOURSE_API": "https://forum.decentraland.vote/",
Expand Down
1 change: 1 addition & 0 deletions src/config/env/prd.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"GATSBY_SNAPSHOT_SPACE": "snapshot.dcl.eth",
"GATSBY_SNAPSHOT_URL": "https://snapshot.org/",
"GATSBY_SNAPSHOT_QUERY_ENDPOINT": "https://api.thegraph.com/subgraphs/name/snapshot-labs/snapshot",
"SNAPSHOT_STATUS_ENABLED": "true",
"GATSBY_SUBMISSION_THRESHOLD_DRAFT": "1000",
"GATSBY_SUBMISSION_THRESHOLD_GOVERNANCE": "2500",
"GATSBY_SUBMISSION_THRESHOLD_HIRING": "2500",
Expand Down
3 changes: 2 additions & 1 deletion src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ export const DEBUG_ADDRESSES = (process.env.DEBUG_ADDRESSES || '')
.filter(isEthereumAddress)
.map((address) => address.toLowerCase())

export const SNAPSHOT_STATUS_ENABLED = process.env.SNAPSHOT_STATUS_ENABLED === 'true'
export const SNAPSHOT_STATUS_ENABLED =
process.env.SNAPSHOT_STATUS_ENABLED === 'true' || getBooleanStringVar('SNAPSHOT_STATUS_ENABLED', true)
export const SNAPSHOT_STATUS_MAX_ERROR_BUFFER_SIZE = Number(process.env.SNAPSHOT_STATUS_MAX_ERROR_BUFFER_SIZE || 30)
export const SNAPSHOT_STATUS_ERROR_RATE_THRESHOLD = Number(process.env.SNAPSHOT_STATUS_ERROR_RATE_THRESHOLD || 0.33)

0 comments on commit 6f25626

Please sign in to comment.