Skip to content
This repository has been archived by the owner on Oct 15, 2024. It is now read-only.

Commit

Permalink
Parse RFQT environment variables as CSV, not JSON
Browse files Browse the repository at this point in the history
Addresses review comment #162 (comment)
  • Loading branch information
feuGeneA committed Apr 10, 2020
1 parent e7a2a3b commit 4134b1f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"clean:ts": "shx rm -rf lib",
"clean:docker": "shx rm -rf 0x_mesh/db",
"build": "tsc -p tsconfig.json",
"test": "ETHEREUM_RPC_URL=http://localhost:8545 CHAIN_ID=1337 RFQT_API_KEY_WHITELIST='[\"koolApiKey1\"]' RFQT_MAKER_ENDPOINTS='[\"http://localhost:4000\"]' mocha --require source-map-support/register --require make-promises-safe lib/test/**/*_test.js --timeout 100000 --exit",
"test": "ETHEREUM_RPC_URL=http://localhost:8545 CHAIN_ID=1337 RFQT_API_KEY_WHITELIST='koolApiKey1,koolApikey2' RFQT_MAKER_ENDPOINTS='http://localhost:4000,http://localhost:4000' mocha --require source-map-support/register --require make-promises-safe lib/test/**/*_test.js --timeout 100000 --exit",
"dev": "nodemon -r dotenv/config src/index.ts | pino-pretty",
"dev:service:http": "nodemon -r dotenv/config src/runners/http_service_runner.ts | pino-pretty",
"dev:service:sra_http": "nodemon -r dotenv/config src/runners/http_sra_service_runner.ts | pino-pretty",
Expand Down
4 changes: 2 additions & 2 deletions src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,9 @@ export const LIQUIDITY_POOL_REGISTRY_ADDRESS: string | undefined = _.isEmpty(
EnvVarType.ETHAddressHex,
);

export const RFQT_API_KEY_WHITELIST: string[] = JSON.parse(process.env.RFQT_API_KEY_WHITELIST || '[]');
export const RFQT_API_KEY_WHITELIST: string[] = (process.env.RFQT_API_KEY_WHITELIST || '[]').split(',');

export const RFQT_MAKER_ENDPOINTS: string[] = JSON.parse(process.env.RFQT_MAKER_ENDPOINTS || '[]');
export const RFQT_MAKER_ENDPOINTS: string[] = (process.env.RFQT_MAKER_ENDPOINTS || '[]').split(',');

// Max number of entities per page
export const MAX_PER_PAGE = 1000;
Expand Down

0 comments on commit 4134b1f

Please sign in to comment.