@talismn/sapi 0.0.7 → 0.0.9
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.
|
@@ -216,7 +216,6 @@ const isApiAvailable = (chain, name, method) => {
|
|
|
216
216
|
};
|
|
217
217
|
|
|
218
218
|
const getDryRunCall = async (chain, from, decodedCall) => {
|
|
219
|
-
log.log(`[sapi] getDryRun begin: ${Date.now()}`);
|
|
220
219
|
try {
|
|
221
220
|
if (!isApiAvailable(chain, "DryRunApi", "dry_run_call")) return {
|
|
222
221
|
available: false,
|
|
@@ -258,8 +257,6 @@ const getDryRunCall = async (chain, from, decodedCall) => {
|
|
|
258
257
|
available: false,
|
|
259
258
|
data: null
|
|
260
259
|
};
|
|
261
|
-
} finally {
|
|
262
|
-
log.log(`[sapi] getDryRun end: ${Date.now()}`);
|
|
263
260
|
}
|
|
264
261
|
};
|
|
265
262
|
|
|
@@ -567,7 +564,9 @@ const fetchBestMetadata = async (rpcSend, allowLegacyFallback) => {
|
|
|
567
564
|
// ex: crust standalone
|
|
568
565
|
message?.includes("Module doesn't have export Metadata_metadata_versions") ||
|
|
569
566
|
// ex: 3DPass
|
|
570
|
-
message?.includes("Exported method Metadata_metadata_versions is not found")
|
|
567
|
+
message?.includes("Exported method Metadata_metadata_versions is not found") ||
|
|
568
|
+
// ex: sora-polkadot & sora-standalone
|
|
569
|
+
message?.includes("Execution, MethodNotFound, Metadata_metadata_versions") // ex: stafi
|
|
571
570
|
) {
|
|
572
571
|
return await rpcSend("state_getMetadata", [], true);
|
|
573
572
|
}
|
|
@@ -216,7 +216,6 @@ const isApiAvailable = (chain, name, method) => {
|
|
|
216
216
|
};
|
|
217
217
|
|
|
218
218
|
const getDryRunCall = async (chain, from, decodedCall) => {
|
|
219
|
-
log.log(`[sapi] getDryRun begin: ${Date.now()}`);
|
|
220
219
|
try {
|
|
221
220
|
if (!isApiAvailable(chain, "DryRunApi", "dry_run_call")) return {
|
|
222
221
|
available: false,
|
|
@@ -258,8 +257,6 @@ const getDryRunCall = async (chain, from, decodedCall) => {
|
|
|
258
257
|
available: false,
|
|
259
258
|
data: null
|
|
260
259
|
};
|
|
261
|
-
} finally {
|
|
262
|
-
log.log(`[sapi] getDryRun end: ${Date.now()}`);
|
|
263
260
|
}
|
|
264
261
|
};
|
|
265
262
|
|
|
@@ -567,7 +564,9 @@ const fetchBestMetadata = async (rpcSend, allowLegacyFallback) => {
|
|
|
567
564
|
// ex: crust standalone
|
|
568
565
|
message?.includes("Module doesn't have export Metadata_metadata_versions") ||
|
|
569
566
|
// ex: 3DPass
|
|
570
|
-
message?.includes("Exported method Metadata_metadata_versions is not found")
|
|
567
|
+
message?.includes("Exported method Metadata_metadata_versions is not found") ||
|
|
568
|
+
// ex: sora-polkadot & sora-standalone
|
|
569
|
+
message?.includes("Execution, MethodNotFound, Metadata_metadata_versions") // ex: stafi
|
|
571
570
|
) {
|
|
572
571
|
return await rpcSend("state_getMetadata", [], true);
|
|
573
572
|
}
|
package/dist/talismn-sapi.esm.js
CHANGED
|
@@ -210,7 +210,6 @@ const isApiAvailable = (chain, name, method) => {
|
|
|
210
210
|
};
|
|
211
211
|
|
|
212
212
|
const getDryRunCall = async (chain, from, decodedCall) => {
|
|
213
|
-
log.log(`[sapi] getDryRun begin: ${Date.now()}`);
|
|
214
213
|
try {
|
|
215
214
|
if (!isApiAvailable(chain, "DryRunApi", "dry_run_call")) return {
|
|
216
215
|
available: false,
|
|
@@ -252,8 +251,6 @@ const getDryRunCall = async (chain, from, decodedCall) => {
|
|
|
252
251
|
available: false,
|
|
253
252
|
data: null
|
|
254
253
|
};
|
|
255
|
-
} finally {
|
|
256
|
-
log.log(`[sapi] getDryRun end: ${Date.now()}`);
|
|
257
254
|
}
|
|
258
255
|
};
|
|
259
256
|
|
|
@@ -561,7 +558,9 @@ const fetchBestMetadata = async (rpcSend, allowLegacyFallback) => {
|
|
|
561
558
|
// ex: crust standalone
|
|
562
559
|
message?.includes("Module doesn't have export Metadata_metadata_versions") ||
|
|
563
560
|
// ex: 3DPass
|
|
564
|
-
message?.includes("Exported method Metadata_metadata_versions is not found")
|
|
561
|
+
message?.includes("Exported method Metadata_metadata_versions is not found") ||
|
|
562
|
+
// ex: sora-polkadot & sora-standalone
|
|
563
|
+
message?.includes("Execution, MethodNotFound, Metadata_metadata_versions") // ex: stafi
|
|
565
564
|
) {
|
|
566
565
|
return await rpcSend("state_getMetadata", [], true);
|
|
567
566
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@talismn/sapi",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.9",
|
|
4
4
|
"author": "Talisman",
|
|
5
5
|
"homepage": "https://talisman.xyz",
|
|
6
6
|
"license": "GPL-3.0-or-later",
|
|
@@ -39,8 +39,8 @@
|
|
|
39
39
|
"jest": "^29.7",
|
|
40
40
|
"ts-jest": "^29.2.5",
|
|
41
41
|
"typescript": "^5.6.3",
|
|
42
|
-
"@talismn/
|
|
43
|
-
"@talismn/
|
|
42
|
+
"@talismn/tsconfig": "0.0.2",
|
|
43
|
+
"@talismn/eslint-config": "0.0.3"
|
|
44
44
|
},
|
|
45
45
|
"eslintConfig": {
|
|
46
46
|
"root": true,
|