udxcms 1.0.46 → 1.0.49

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.
@@ -4,9 +4,9 @@
4
4
  * @Author:
5
5
  * @Date: 2021-08-02 11:52:46
6
6
  * @LastEditors: lewis lewis@everylink.ai
7
- * @LastEditTime: 2025-11-14 17:40:45
7
+ * @LastEditTime: 2025-12-15 19:25:23
8
8
  */
9
- // const CDNURL = 'https://devnet-cms.parascan.org'
9
+ // const CDNURL = 'https://devnet-cms.parascan.org' https://chainhub-devnet-0.parascan.org/
10
10
  const CDNURL = 'https://topnerds.org';
11
11
  export default {
12
12
  sitePath: process.env.VUE_APP_MODE == 'production' ? 'https://djgs8mufg9606.cloudfront.net/' : `${CDNURL}/`, // site path
@@ -22,5 +22,5 @@ export default {
22
22
  baseLanguage: 'en_US',
23
23
  mainNetWorkArr: [1, 3, 4, 5, 42],
24
24
  cmsAcademyMediaShow: true,
25
- notNeedLoginRoute: ['home', 'trade', 'market-home']
25
+ notNeedLoginRoute: ['home', 'trade', 'market-home', 'trade-home']
26
26
  };
@@ -1,6 +1,7 @@
1
1
  export const connectCloseReason: string[];
2
2
  export class ConnectSocketTool {
3
3
  constructor(chainId: any, type: any);
4
+ connectWsType: any;
4
5
  chainId: any;
5
6
  connect(errorCallBack: any): Promise<any>;
6
7
  subscribe(path: any, callback: any): void;
@@ -4,7 +4,7 @@
4
4
  * @Author:
5
5
  * @Date: 2021-04-07 14:59:35
6
6
  * @LastEditors: lewis lewis@everylink.ai
7
- * @LastEditTime: 2025-10-24 11:48:06
7
+ * @LastEditTime: 2025-12-20 10:44:11
8
8
  */
9
9
  import SockJs from 'sockjs-client';
10
10
  import Stomp from 'webstomp-client';
@@ -49,6 +49,7 @@ export class ConnectSocketTool {
49
49
  const socket = new SockJs(webSocketUrl);
50
50
  return Stomp.over(socket, options);
51
51
  };
52
+ this.connectWsType = type;
52
53
  if (connectTemp.chainId && connectTemp.chainId != chainId || type) {
53
54
  this.chainId = chainId || getTradeDefaultChainId();
54
55
  this.close();
@@ -80,8 +81,9 @@ export class ConnectSocketTool {
80
81
  connectTemp.conncetedStr = 'connecting';
81
82
  let apiType = connectType === "market_ws" ? "ws" : "api";
82
83
  let base_url = site_config && getMarketApi(this.chainId, connectType, apiType) || '';
83
- if (((_b = (_a = store === null || store === void 0 ? void 0 : store.state) === null || _a === void 0 ? void 0 : _a.trade) === null || _b === void 0 ? void 0 : _b.tradeMode) == 'perpetual') {
84
+ if (((_b = (_a = store === null || store === void 0 ? void 0 : store.state) === null || _a === void 0 ? void 0 : _a.trade) === null || _b === void 0 ? void 0 : _b.tradeMode) == 'perpetual' || this.connectWsType == 'perpetual') {
84
85
  base_url = getMarketApi(this.chainId, 'perpetual', apiType);
86
+ console.log('perpetual base_url:', base_url);
85
87
  // 永续暂时不支持聚合
86
88
  if (!base_url) {
87
89
  base_url = getMarketApi((_c = store === null || store === void 0 ? void 0 : store.state) === null || _c === void 0 ? void 0 : _c.chainId, 'perpetual', apiType);
@@ -106,7 +108,7 @@ export class ConnectSocketTool {
106
108
  // }
107
109
  // }
108
110
  // ws_url = "https://ws.powx.io/market-ws/";
109
- console.log("ws_url:", ws_url);
111
+ console.log("cms_ws_url:", ws_url);
110
112
  var options = { debug: false, protocols: Stomp.VERSIONS.supportedProtocols(), heartbeat: { outgoing: 20000, incoming: 10000 } };
111
113
  let stompClient = this.getStompClient(ws_url, options);
112
114
  console.log("stompClient:", stompClient);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "udxcms",
3
- "version": "1.0.46",
3
+ "version": "1.0.49",
4
4
  "description": "cms submodule",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",