@polkadot/rpc-provider
Advanced tools
Comparing version 10.12.1 to 10.12.2
@@ -110,4 +110,5 @@ "use strict"; | ||
const [, body] = this.__internal__coder.encodeJson(method, params); | ||
const cacheKey = isCacheable ? `${method}::${(0, util_1.stringify)(params)}` : ''; | ||
let resultPromise = isCacheable | ||
? this.__internal__callCache.get(body) | ||
? this.__internal__callCache.get(cacheKey) | ||
: null; | ||
@@ -117,3 +118,3 @@ if (!resultPromise) { | ||
if (isCacheable) { | ||
this.__internal__callCache.set(body, resultPromise); | ||
this.__internal__callCache.set(cacheKey, resultPromise); | ||
} | ||
@@ -120,0 +121,0 @@ } |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.packageInfo = void 0; | ||
exports.packageInfo = { name: '@polkadot/rpc-provider', path: typeof __dirname === 'string' ? __dirname : 'auto', type: 'cjs', version: '10.12.1' }; | ||
exports.packageInfo = { name: '@polkadot/rpc-provider', path: typeof __dirname === 'string' ? __dirname : 'auto', type: 'cjs', version: '10.12.2' }; |
@@ -257,4 +257,5 @@ "use strict"; | ||
const [id, body] = this.__internal__coder.encodeJson(method, params); | ||
const cacheKey = isCacheable ? `${method}::${(0, util_1.stringify)(params)}` : ''; | ||
let resultPromise = isCacheable | ||
? this.__internal__callCache.get(body) | ||
? this.__internal__callCache.get(cacheKey) | ||
: null; | ||
@@ -264,3 +265,3 @@ if (!resultPromise) { | ||
if (isCacheable) { | ||
this.__internal__callCache.set(body, resultPromise); | ||
this.__internal__callCache.set(cacheKey, resultPromise); | ||
} | ||
@@ -267,0 +268,0 @@ } |
@@ -1,2 +0,2 @@ | ||
import { logger, noop } from '@polkadot/util'; | ||
import { logger, noop, stringify } from '@polkadot/util'; | ||
import { fetch } from '@polkadot/x-fetch'; | ||
@@ -106,4 +106,5 @@ import { RpcCoder } from '../coder/index.js'; | ||
const [, body] = this.__internal__coder.encodeJson(method, params); | ||
const cacheKey = isCacheable ? `${method}::${stringify(params)}` : ''; | ||
let resultPromise = isCacheable | ||
? this.__internal__callCache.get(body) | ||
? this.__internal__callCache.get(cacheKey) | ||
: null; | ||
@@ -113,3 +114,3 @@ if (!resultPromise) { | ||
if (isCacheable) { | ||
this.__internal__callCache.set(body, resultPromise); | ||
this.__internal__callCache.set(cacheKey, resultPromise); | ||
} | ||
@@ -116,0 +117,0 @@ } |
@@ -21,3 +21,3 @@ { | ||
"type": "module", | ||
"version": "10.12.1", | ||
"version": "10.12.2", | ||
"main": "./cjs/index.js", | ||
@@ -162,4 +162,4 @@ "module": "./index.js", | ||
"@polkadot/keyring": "^12.6.2", | ||
"@polkadot/types": "10.12.1", | ||
"@polkadot/types-support": "10.12.1", | ||
"@polkadot/types": "10.12.2", | ||
"@polkadot/types-support": "10.12.2", | ||
"@polkadot/util": "^12.6.2", | ||
@@ -166,0 +166,0 @@ "@polkadot/util-crypto": "^12.6.2", |
@@ -1,1 +0,1 @@ | ||
export const packageInfo = { name: '@polkadot/rpc-provider', path: (import.meta && import.meta.url) ? new URL(import.meta.url).pathname.substring(0, new URL(import.meta.url).pathname.lastIndexOf('/') + 1) : 'auto', type: 'esm', version: '10.12.1' }; | ||
export const packageInfo = { name: '@polkadot/rpc-provider', path: (import.meta && import.meta.url) ? new URL(import.meta.url).pathname.substring(0, new URL(import.meta.url).pathname.lastIndexOf('/') + 1) : 'auto', type: 'esm', version: '10.12.2' }; |
import { EventEmitter } from 'eventemitter3'; | ||
import { isChildClass, isNull, isUndefined, logger, noop, objectSpread } from '@polkadot/util'; | ||
import { isChildClass, isNull, isUndefined, logger, noop, objectSpread, stringify } from '@polkadot/util'; | ||
import { xglobal } from '@polkadot/x-global'; | ||
@@ -253,4 +253,5 @@ import { WebSocket } from '@polkadot/x-ws'; | ||
const [id, body] = this.__internal__coder.encodeJson(method, params); | ||
const cacheKey = isCacheable ? `${method}::${stringify(params)}` : ''; | ||
let resultPromise = isCacheable | ||
? this.__internal__callCache.get(body) | ||
? this.__internal__callCache.get(cacheKey) | ||
: null; | ||
@@ -260,3 +261,3 @@ if (!resultPromise) { | ||
if (isCacheable) { | ||
this.__internal__callCache.set(body, resultPromise); | ||
this.__internal__callCache.set(cacheKey, resultPromise); | ||
} | ||
@@ -263,0 +264,0 @@ } |
175550
4048
+ Added@polkadot/types@10.12.2(transitive)
+ Added@polkadot/types-augment@10.12.2(transitive)
+ Added@polkadot/types-codec@10.12.2(transitive)
+ Added@polkadot/types-create@10.12.2(transitive)
+ Added@polkadot/types-support@10.12.2(transitive)
- Removed@polkadot/types@10.12.1(transitive)
- Removed@polkadot/types-augment@10.12.1(transitive)
- Removed@polkadot/types-codec@10.12.1(transitive)
- Removed@polkadot/types-create@10.12.1(transitive)
- Removed@polkadot/types-support@10.12.1(transitive)
Updated@polkadot/types@10.12.2