Comparing version 1.0.15 to 1.0.16
@@ -325,7 +325,7 @@ "use strict"; | ||
nextJsonRpcResponse: () => __awaiter(this, void 0, void 0, function* () { | ||
if (!state.chains.has(chainId)) | ||
throw new public_types_js_1.AlreadyDestroyedError(); | ||
if (options.disableJsonRpc) | ||
return Promise.reject(new public_types_js_1.JsonRpcDisabledError()); | ||
while (true) { | ||
if (!state.chains.has(chainId)) | ||
throw new public_types_js_1.AlreadyDestroyedError(); | ||
if (options.disableJsonRpc) | ||
return Promise.reject(new public_types_js_1.JsonRpcDisabledError()); | ||
if (state.instance.status === "destroyed") | ||
@@ -332,0 +332,0 @@ throw state.instance.error; |
@@ -248,3 +248,3 @@ "use strict"; | ||
const numAccepted = state.acceptedJsonRpcResponses.get(event.chainId); | ||
if (numAccepted == 0) | ||
if (numAccepted === undefined || numAccepted === 0) | ||
return; | ||
@@ -294,2 +294,3 @@ const response = state.instance.peekJsonRpcResponse(event.chainId); | ||
case "remove-chain": { | ||
state.acceptedJsonRpcResponses.delete(message.chainId); | ||
state.instance.removeChain(message.chainId); | ||
@@ -296,0 +297,0 @@ break; |
@@ -322,7 +322,7 @@ // Smoldot | ||
nextJsonRpcResponse: () => __awaiter(this, void 0, void 0, function* () { | ||
if (!state.chains.has(chainId)) | ||
throw new AlreadyDestroyedError(); | ||
if (options.disableJsonRpc) | ||
return Promise.reject(new JsonRpcDisabledError()); | ||
while (true) { | ||
if (!state.chains.has(chainId)) | ||
throw new AlreadyDestroyedError(); | ||
if (options.disableJsonRpc) | ||
return Promise.reject(new JsonRpcDisabledError()); | ||
if (state.instance.status === "destroyed") | ||
@@ -329,0 +329,0 @@ throw state.instance.error; |
@@ -244,3 +244,3 @@ // Smoldot | ||
const numAccepted = state.acceptedJsonRpcResponses.get(event.chainId); | ||
if (numAccepted == 0) | ||
if (numAccepted === undefined || numAccepted === 0) | ||
return; | ||
@@ -290,2 +290,3 @@ const response = state.instance.peekJsonRpcResponse(event.chainId); | ||
case "remove-chain": { | ||
state.acceptedJsonRpcResponses.delete(message.chainId); | ||
state.instance.removeChain(message.chainId); | ||
@@ -292,0 +293,0 @@ break; |
{ | ||
"name": "smoldot", | ||
"version": "1.0.15", | ||
"version": "1.0.16", | ||
"description": "Light client that connects to Polkadot and Substrate-based blockchains", | ||
@@ -5,0 +5,0 @@ "contributors": [ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6295579
30517