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

Commit 47227ad

Browse files
committed
Parse RFQT environment variables as CSV, not JSON
Addresses review comment #162 (comment)
1 parent bdc7bae commit 47227ad

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"clean:ts": "shx rm -rf lib",
1111
"clean:docker": "shx rm -rf 0x_mesh/db",
1212
"build": "tsc -p tsconfig.json",
13-
"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",
13+
"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",
1414
"dev": "nodemon -r dotenv/config src/index.ts | pino-pretty",
1515
"dev:service:http": "nodemon -r dotenv/config src/runners/http_service_runner.ts | pino-pretty",
1616
"dev:service:sra_http": "nodemon -r dotenv/config src/runners/http_sra_service_runner.ts | pino-pretty",

src/config.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,9 @@ export const LIQUIDITY_POOL_REGISTRY_ADDRESS: string | undefined = _.isEmpty(
100100
EnvVarType.ETHAddressHex,
101101
);
102102

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

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

107107
// Max number of entities per page
108108
export const MAX_PER_PAGE = 1000;

0 commit comments

Comments
 (0)