@argent/x-shared 1.78.8 → 1.78.11
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.
- package/dist/.ts-temp/tsconfig.tsbuildinfo +1 -1
- package/dist/node_modules/.pnpm/bignumber.js@9.1.2/node_modules/bignumber.js/bignumber.js +1 -1
- package/dist/src/features/simulation/transactionReview/getErrorMessageAndLabelFromSimulation.cjs +1 -1
- package/dist/src/features/simulation/transactionReview/getErrorMessageAndLabelFromSimulation.d.ts +1 -1
- package/dist/src/features/simulation/transactionReview/getErrorMessageAndLabelFromSimulation.js +3 -3
- package/dist/src/features/simulation/transactionReview/getMessageFromSimulationError.cjs +1 -1
- package/dist/src/features/simulation/transactionReview/getMessageFromSimulationError.js +3 -3
- package/dist/src/http/DateService.cjs +1 -1
- package/dist/src/http/DateService.js +3 -1
- package/package.json +15 -15
|
@@ -569,7 +569,7 @@ function we(O) {
|
|
|
569
569
|
return t === null ? s ? (r = "Infinity", s < 0 && (r = "-" + r)) : r = "NaN" : (e == null ? r = t <= C || t >= k ? ne(q(i.c), t) : W(q(i.c), t, "0") : e === 10 && fe ? (i = G(new h(i), x + t + 1, S), r = W(q(i.c), i.e, "0")) : (v(e, 2, K.length, "Base"), r = _(W(q(i.c), t, "0"), 10, e, s, !0)), s < 0 && i.c[0] && (r = "-" + r)), r;
|
|
570
570
|
}, g.valueOf = g.toJSON = function() {
|
|
571
571
|
return V(this);
|
|
572
|
-
}, g._isBigNumber = !0, g[Symbol.toStringTag] = "BigNumber", g[Symbol.for("nodejs.util.inspect.custom")] = g.valueOf, O != null && h.set(O), h;
|
|
572
|
+
}, g._isBigNumber = !0, g[Symbol.toStringTag] = "BigNumber", g[/* @__PURE__ */ Symbol.for("nodejs.util.inspect.custom")] = g.valueOf, O != null && h.set(O), h;
|
|
573
573
|
}
|
|
574
574
|
function $(O) {
|
|
575
575
|
var E = O | 0;
|
package/dist/src/features/simulation/transactionReview/getErrorMessageAndLabelFromSimulation.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./getMessageFromSimulationError.cjs"),c=require("./schema.cjs"),g=require("../../../transactions/getPrettyRcpError.cjs");function u(
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./getMessageFromSimulationError.cjs"),c=require("./schema.cjs"),g=require("../../../transactions/getPrettyRcpError.cjs");function u(o){if(!o)return;const t=o.transactions?.flatMap(n=>c.isTransactionSimulationError(n)?n.simulationError:!1),r=t?.[t.length-1];if(!r)return;const a=l.getMessageFromSimulationError(r),s=r.message||r.error,e=g.getPrettyRpcError(s),i=e||r.label;return{message:e?s||"Unknown RPC error":a,label:i}}exports.getErrorMessageAndLabelFromSimulation=u;
|
package/dist/src/features/simulation/transactionReview/getErrorMessageAndLabelFromSimulation.js
CHANGED
|
@@ -4,12 +4,12 @@ import { getPrettyRpcError as c } from "../../../transactions/getPrettyRcpError.
|
|
|
4
4
|
function p(t) {
|
|
5
5
|
if (!t)
|
|
6
6
|
return;
|
|
7
|
-
const s = t.transactions?.flatMap((
|
|
7
|
+
const s = t.transactions?.flatMap((n) => l(n) ? n.simulationError : !1), r = s?.[s.length - 1];
|
|
8
8
|
if (!r)
|
|
9
9
|
return;
|
|
10
|
-
const
|
|
10
|
+
const a = m(r), e = r.message || r.error, o = c(e), i = o || r.label;
|
|
11
11
|
return {
|
|
12
|
-
message: o ? e :
|
|
12
|
+
message: o ? e || "Unknown RPC error" : a,
|
|
13
13
|
label: i
|
|
14
14
|
};
|
|
15
15
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function r(e){return e.error?e.error:e.message&&e.code?`${e.code}: ${e.message}`:"Unknown error"}exports.getMessageFromSimulationError=r;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function r(e){return e.error?e.error:e.message&&e.code?`${e.code}: ${e.message}`:"Unknown transaction simulation error"}exports.getMessageFromSimulationError=r;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
function
|
|
2
|
-
return e.error ? e.error : e.message && e.code ? `${e.code}: ${e.message}` : "Unknown error";
|
|
1
|
+
function n(e) {
|
|
2
|
+
return e.error ? e.error : e.message && e.code ? `${e.code}: ${e.message}` : "Unknown transaction simulation error";
|
|
3
3
|
}
|
|
4
4
|
export {
|
|
5
|
-
|
|
5
|
+
n as getMessageFromSimulationError
|
|
6
6
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});class s{constructor(t,e){this.httpService=t,this.baseUrl=e,this.offsetInS=0,this.syncIntervalInMs=60*1e3,this.initialSync=this.syncWithServer(),setInterval(()=>
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});class s{constructor(t,e){this.httpService=t,this.baseUrl=e,this.offsetInS=0,this.syncIntervalInMs=60*1e3,this.initialSync=this.syncWithServer(),setInterval(()=>{this.syncWithServer()},this.syncIntervalInMs)}async now(){return await this.initialSync,new Date(Date.now()+this.offsetInS*1e3)}async syncWithServer(){if(typeof window>"u")return;const{time:t}=await this.httpService.get(`${this.baseUrl}/time`),e=Math.floor(Date.now()/1e3),i=t-e;this.offsetInS=i}}exports.DateService=s;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
class n {
|
|
2
2
|
constructor(t, e) {
|
|
3
|
-
this.httpService = t, this.baseUrl = e, this.offsetInS = 0, this.syncIntervalInMs = 60 * 1e3, this.initialSync = this.syncWithServer(), setInterval(() =>
|
|
3
|
+
this.httpService = t, this.baseUrl = e, this.offsetInS = 0, this.syncIntervalInMs = 60 * 1e3, this.initialSync = this.syncWithServer(), setInterval(() => {
|
|
4
|
+
this.syncWithServer();
|
|
5
|
+
}, this.syncIntervalInMs);
|
|
4
6
|
}
|
|
5
7
|
async now() {
|
|
6
8
|
return await this.initialSync, new Date(Date.now() + this.offsetInS * 1e3);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@argent/x-shared",
|
|
3
|
-
"version": "1.78.
|
|
3
|
+
"version": "1.78.11",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/argentlabs/x-shared.git"
|
|
@@ -56,33 +56,33 @@
|
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
58
|
"@amplitude/analytics-types": "2.11.0",
|
|
59
|
-
"@commitlint/cli": "20.
|
|
60
|
-
"@commitlint/config-conventional": "20.
|
|
59
|
+
"@commitlint/cli": "20.2.0",
|
|
60
|
+
"@commitlint/config-conventional": "20.2.0",
|
|
61
61
|
"@rollup/plugin-typescript": "12.3.0",
|
|
62
62
|
"@semantic-release/git": "10.0.1",
|
|
63
63
|
"@types/async-retry": "1.4.9",
|
|
64
64
|
"@types/lodash-es": "4.17.12",
|
|
65
65
|
"@types/numeral": "2.0.5",
|
|
66
66
|
"@types/ua-parser-js": "0.7.39",
|
|
67
|
-
"@typescript-eslint/eslint-plugin": "8.
|
|
68
|
-
"@typescript-eslint/parser": "8.
|
|
69
|
-
"esbuild": "0.27.
|
|
67
|
+
"@typescript-eslint/eslint-plugin": "8.49.0",
|
|
68
|
+
"@typescript-eslint/parser": "8.49.0",
|
|
69
|
+
"esbuild": "0.27.1",
|
|
70
70
|
"esbuild-register": "3.6.0",
|
|
71
71
|
"eslint": "8.57.1",
|
|
72
72
|
"eslint-config-prettier": "10.1.8",
|
|
73
73
|
"eslint-plugin-import": "2.32.0",
|
|
74
74
|
"husky": "9.1.7",
|
|
75
|
-
"lint-staged": "16.2.
|
|
76
|
-
"msw": "2.12.
|
|
77
|
-
"prettier": "3.
|
|
75
|
+
"lint-staged": "16.2.7",
|
|
76
|
+
"msw": "2.12.4",
|
|
77
|
+
"prettier": "3.7.4",
|
|
78
78
|
"semantic-release": "25.0.2",
|
|
79
79
|
"ts-node": "10.9.2",
|
|
80
|
-
"ts-to-zod": "5.0
|
|
81
|
-
"tsx": "4.
|
|
80
|
+
"ts-to-zod": "5.1.0",
|
|
81
|
+
"tsx": "4.21.0",
|
|
82
82
|
"typescript": "5.9.3",
|
|
83
|
-
"vite": "7.
|
|
83
|
+
"vite": "7.3.0",
|
|
84
84
|
"vite-plugin-dts": "4.5.4",
|
|
85
|
-
"vitest": "4.0.
|
|
85
|
+
"vitest": "4.0.15"
|
|
86
86
|
},
|
|
87
87
|
"dependencies": {
|
|
88
88
|
"@argent/x-multicall": "^7.1.0",
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
"@langchain/google-genai": "^2.0.0",
|
|
91
91
|
"@lokalise/node-api": "^15.0.0",
|
|
92
92
|
"@noble/hashes": "^2.0.0",
|
|
93
|
-
"@starknet-io/types-js": "0.
|
|
93
|
+
"@starknet-io/types-js": "0.10.0",
|
|
94
94
|
"@types/fs-extra": "^11.0.4",
|
|
95
95
|
"big-decimal-number": "npm:bignumber.js@^9.1.2",
|
|
96
96
|
"dotenv": "^17.0.0",
|
|
@@ -111,7 +111,7 @@
|
|
|
111
111
|
"lodash-es": "^4.17.21",
|
|
112
112
|
"ua-parser-js": "^1.0.38 || ^2.0.0",
|
|
113
113
|
"url-join": "^5.0.0",
|
|
114
|
-
"zod": "4.
|
|
114
|
+
"zod": "4.2.0"
|
|
115
115
|
},
|
|
116
116
|
"lint-staged": {
|
|
117
117
|
"*": "prettier --ignore-unknown --write",
|