@clonegod/ttd-bsc-common 3.1.30 → 3.1.31
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.
|
@@ -28,7 +28,7 @@ class BscQuoteAppConfig extends ttd_core_1.AppConfig {
|
|
|
28
28
|
(0, ttd_core_1.log_info)('BscQuoteAppConfig initialized', {
|
|
29
29
|
chain_id: this.env_args.chain_id,
|
|
30
30
|
dex_id: this.env_args.dex_id,
|
|
31
|
-
|
|
31
|
+
pair: this.env_args.pair,
|
|
32
32
|
rpc_endpoint: this.env_args.rpc_endpoint,
|
|
33
33
|
ws_endpoint: this.env_args.ws_endpoint,
|
|
34
34
|
});
|
|
@@ -15,9 +15,8 @@ class BscDexEnvArgs extends bsc_env_args_1.BscEnvArgs {
|
|
|
15
15
|
this.redis_port = String(cfg.redis_port);
|
|
16
16
|
this.rpc_endpoint = cfg.rpc_endpoint;
|
|
17
17
|
this.ws_endpoint = cfg.ws_endpoint;
|
|
18
|
+
this.pair = cfg.pair ?? '';
|
|
18
19
|
this.group_id = cfg.group_id ?? '';
|
|
19
|
-
this.trade_group_id = cfg.trade_group_id;
|
|
20
|
-
this.quote_pair = cfg.quote_pair;
|
|
21
20
|
this.quote_pool_address = cfg.quote_pool_address;
|
|
22
21
|
this.quote_pool_name = cfg.quote_pool_name;
|
|
23
22
|
this.quote_pool_fee_rate = cfg.quote_pool_fee_rate;
|
|
@@ -53,9 +53,9 @@ const fast_signer_1 = require("../utils/fast_signer");
|
|
|
53
53
|
const trade_trace_1 = require("./trade_trace");
|
|
54
54
|
const decimal_js_1 = __importDefault(require("decimal.js"));
|
|
55
55
|
function buildTradeConfig(envArgs) {
|
|
56
|
-
const vaultGroupId = envArgs.
|
|
56
|
+
const vaultGroupId = envArgs.group_id;
|
|
57
57
|
if (!vaultGroupId) {
|
|
58
|
-
throw new Error('
|
|
58
|
+
throw new Error('GROUP_ID 未配置(envArgs.group_id 为空)');
|
|
59
59
|
}
|
|
60
60
|
const vaultWallet = (0, ttd_core_1.load_wallet)(vaultGroupId, true);
|
|
61
61
|
if (!vaultWallet.public_key) {
|
|
@@ -39,7 +39,7 @@ class TradeResultSubscriber {
|
|
|
39
39
|
getSubscriptions() {
|
|
40
40
|
if (this.cachedSubscriptions)
|
|
41
41
|
return this.cachedSubscriptions;
|
|
42
|
-
const groupIds = ((0, ttd_core_1.getCoreEnv)()?.
|
|
42
|
+
const groupIds = ((0, ttd_core_1.getCoreEnv)()?.group_id || '').split(',').map(s => s.trim()).filter(Boolean);
|
|
43
43
|
const subs = [];
|
|
44
44
|
for (const gid of groupIds) {
|
|
45
45
|
const w = (0, ttd_core_1.load_wallet)(gid, true);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@clonegod/ttd-bsc-common",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.31",
|
|
4
4
|
"description": "BSC common library",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"push": "npm run build && npm publish"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@clonegod/ttd-core": "3.1.
|
|
17
|
+
"@clonegod/ttd-core": "3.1.32",
|
|
18
18
|
"axios": "1.15.0",
|
|
19
19
|
"dotenv": "^16.4.7",
|
|
20
20
|
"ethers": "^5.8.0",
|