@socket.tech/dl-common 1.0.3-test.15 → 1.0.3-test.17

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.
@@ -37,6 +37,7 @@ export type SealParams = {
37
37
  srcChainSlug: number;
38
38
  dstChainSlug: number;
39
39
  dstSwitchboard: string;
40
+ srcSwitchboard: string;
40
41
  integrationType: IntegrationTypes;
41
42
  message: {
42
43
  messageId: string;
@@ -19,7 +19,13 @@ const getWaitTime = (integrationType, srcChainSlug, dstChainSlug) => {
19
19
  exports.getWaitTime = getWaitTime;
20
20
  const getNativeWaitTime = (srcChainSlug, dstChainSlug) => {
21
21
  var _a, _b;
22
- let defaultWaitTime = dl_core_1.TestnetIds.includes(srcChainSlug) ? 5 * 60 : 2 * 3600;
22
+ let defaultWaitTime;
23
+ if (dl_core_1.TestnetIds.includes(srcChainSlug))
24
+ defaultWaitTime = 5 * 60;
25
+ else if (srcChainSlug === dl_core_1.ChainSlug.MAINNET)
26
+ defaultWaitTime = 10 * 60;
27
+ else
28
+ defaultWaitTime = 2 * 3600;
23
29
  return (_b = (_a = exports.NativeWaitTime[srcChainSlug]) === null || _a === void 0 ? void 0 : _a[dstChainSlug]) !== null && _b !== void 0 ? _b : defaultWaitTime;
24
30
  };
25
31
  exports.getNativeWaitTime = getNativeWaitTime;
@@ -51,5 +57,6 @@ exports.NativeWaitTime = {
51
57
  [dl_core_1.ChainSlug.ARBITRUM]: 10 * 60,
52
58
  [dl_core_1.ChainSlug.OPTIMISM]: 10 * 60,
53
59
  [dl_core_1.ChainSlug.POLYGON_MAINNET]: 10 * 60,
60
+ [dl_core_1.ChainSlug.LYRA]: 10 * 60,
54
61
  },
55
62
  };
@@ -87,6 +87,6 @@ function createSwitchboardId(switchboard) {
87
87
  if (switchboard.srcSwitchboard &&
88
88
  switchboard.srcChainSlug &&
89
89
  switchboard.dstChainSlug)
90
- switchboard.switchboardId = `${switchboard.srcChainSlug}-${switchboard.dstChainSlug}-${switchboard.dstSwitchboard.toLowerCase()}`;
90
+ switchboard.switchboardId = `${switchboard.srcChainSlug}-${switchboard.dstChainSlug}-${switchboard.srcSwitchboard.toLowerCase()}`;
91
91
  return switchboard;
92
92
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@socket.tech/dl-common",
3
- "version": "1.0.3-test.15",
3
+ "version": "1.0.3-test.17",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "description": "common utilities for socket data layer.",
@@ -27,11 +27,13 @@
27
27
  "eslint:check": "npx eslint src --ext ts,js",
28
28
  "eslint:fix": "npx eslint src --ext ts,js --fix",
29
29
  "lint": "tsc && npm run prettier:fix",
30
- "prettier:fix": "npx prettier src dl-common --write ./**/*.{ts,js,json,yml,md}",
30
+ "prettier:fix": "npx prettier src dl-common __tests__ --write ./**/*.{ts,js,json,yml,md}",
31
31
  "format": "prettier \"./**\" --write --ignore-unknown",
32
32
  "format:check": "prettier \"./**\" --ignore-unknown --check",
33
33
  "prepare": "husky install",
34
- "publishp": "yarn lint && yarn build"
34
+ "publishp": "yarn lint && yarn build",
35
+ "testc": "jest --coverage",
36
+ "test": "jest"
35
37
  },
36
38
  "dependencies": {
37
39
  "@aws-sdk/client-eventbridge": "^3.449.0",
@@ -39,7 +41,7 @@
39
41
  "@aws-sdk/client-sqs": "^3.421.0",
40
42
  "@aws-sdk/smithy-client": "^3.329.0",
41
43
  "@ethersproject/providers": "^5.7.2",
42
- "@socket.tech/dl-core": "2.4.11-test.2",
44
+ "@socket.tech/dl-core": "2.4.13",
43
45
  "@socket.tech/ll-common": "^0.0.19",
44
46
  "async-redis": "^2.0.0",
45
47
  "ethers": "^5.7.1",
@@ -50,14 +52,20 @@
50
52
  "sequelize": "^6.21.6"
51
53
  },
52
54
  "devDependencies": {
55
+ "@babel/core": "^7.23.3",
56
+ "@babel/preset-env": "^7.23.3",
57
+ "@babel/preset-typescript": "^7.23.3",
53
58
  "@commitlint/cli": "^16.2.3",
54
59
  "@commitlint/config-conventional": "^16.2.1",
60
+ "@jest/globals": "^29.7.0",
55
61
  "@types/aws-lambda": "^8.10.108",
56
62
  "@types/express": "^4.17.14",
63
+ "@types/jest": "^29.5.8",
57
64
  "@types/node": "^17.0.23",
58
65
  "@typescript-eslint/eslint-plugin": "^6.4.0",
59
66
  "@typescript-eslint/parser": "^5.17.0",
60
67
  "aws-lambda": "^1.0.7",
68
+ "babel-jest": "^29.7.0",
61
69
  "esbuild": "^0.19.3",
62
70
  "eslint": "^8.0.1",
63
71
  "eslint-config-prettier": "8.3.0",
@@ -69,6 +77,7 @@
69
77
  "eslint-plugin-promise": "^6.0.0",
70
78
  "eslint-plugin-tsdoc": "^0.2.14",
71
79
  "husky": "^7.0.4",
80
+ "jest": "^29.7.0",
72
81
  "lint-staged": "^12.3.7",
73
82
  "nodemon": "^2.0.15",
74
83
  "prettier": "2.7.1",
@@ -76,9 +85,11 @@
76
85
  "serverless-domain-manager": "^7.1.2",
77
86
  "serverless-dotenv-plugin": "4.0.0",
78
87
  "serverless-esbuild": "^1.48.0",
88
+ "serverless-export-env": "arabold/serverless-export-env",
79
89
  "serverless-lumigo": "1.14.1",
80
90
  "serverless-offline": "12.0.4",
81
91
  "serverless-plugin-aws-alerts": "^1.7.5",
92
+ "ts-jest": "^29.1.1",
82
93
  "ts-node": "^10.7.0",
83
94
  "typescript": "*"
84
95
  }