@clonegod/ttd-core 2.0.4 → 2.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -3,14 +3,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.EnvArgs = void 0;
|
|
4
4
|
const __1 = require("..");
|
|
5
5
|
class EnvArgs {
|
|
6
|
-
constructor() {
|
|
6
|
+
constructor(chain_id, dex_id) {
|
|
7
7
|
var _a, _b, _c;
|
|
8
8
|
this.app_name = process.env.APP_NAME || '';
|
|
9
|
-
this.chain_id = (_a = process.env.CHAIN_ID) === null || _a === void 0 ? void 0 : _a.toUpperCase();
|
|
9
|
+
this.chain_id = chain_id || ((_a = process.env.CHAIN_ID) === null || _a === void 0 ? void 0 : _a.toUpperCase());
|
|
10
10
|
if ((0, __1.isEmpty)(this.chain_id)) {
|
|
11
11
|
throw new Error(`environment: CHAIN_ID is empty!!!`);
|
|
12
12
|
}
|
|
13
|
-
this.dex_id = (_b = process.env.DEX_ID) === null || _b === void 0 ? void 0 : _b.toUpperCase();
|
|
13
|
+
this.dex_id = dex_id || ((_b = process.env.DEX_ID) === null || _b === void 0 ? void 0 : _b.toUpperCase());
|
|
14
14
|
if ((0, __1.isEmpty)(this.dex_id)) {
|
|
15
15
|
throw new Error(`Invalid config: DEX_ID=${process.env.DEX_ID}!!!`);
|
|
16
16
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@clonegod/ttd-core",
|
|
3
|
-
"version": "2.0.
|
|
4
|
-
"description": "Common types and utilities for trading systems",
|
|
3
|
+
"version": "2.0.6",
|
|
4
|
+
"description": "Common types and utilities for trading systems - use `npm run push` to publish",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "types/index.d.ts",
|
|
7
7
|
"keywords": [],
|