Skip to content

Commit

Permalink
feat(env): add environment variables for configuring score api and si…
Browse files Browse the repository at this point in the history
…dekick (#635)

* feat(env): add environment variables for configuring score api and sidekick

* fix(name): change name of var
  • Loading branch information
Todmy authored Aug 8, 2023
1 parent 617c795 commit 7b32c35
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,7 @@ DATABASE_URL=mysql://...
SEQUENCER_URL=https://testnet.seq.snapshot.org
KEYCARD_URL=https://keycard.snapshot.org
KEYCARD_SECRET=
SCORE_API_URL=https://score.snapshot.org
SIDEKICK_URL=https://sh5.co
SENTRY_DSN=
SENTRY_TRACE_SAMPLE_RATE=
3 changes: 2 additions & 1 deletion src/helpers/moderation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ import snapshot from '@snapshot-labs/snapshot.js';
import log from './log';
import { capture } from '@snapshot-labs/snapshot-sentry';

const moderationURL = 'https://sh5.co/api/moderation';
const sidekickURL = process.env.SIDEKICK_URL || 'https://sh5.co';
const moderationURL = `${sidekickURL}/api/moderation`;
let consecutiveFailsCount = 0;

export let flaggedLinks: Array<string> = [];
Expand Down
3 changes: 2 additions & 1 deletion src/helpers/strategies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import { capture } from '@snapshot-labs/snapshot-sentry';
export let strategies: any[] = [];
export let strategiesObj: any = {};

const uri = 'https://score.snapshot.org/api/strategies';
const scoreApiURL = process.env.SCORE_API_URL || 'https://score.snapshot.org';
const uri = `${scoreApiURL}/api/strategies`;
let consecutiveFailsCount = 0;

async function loadStrategies() {
Expand Down

0 comments on commit 7b32c35

Please sign in to comment.