chore: refactor client sdk tests

This commit is contained in:
2023-03-03 11:42:20 +01:00
parent b61bf52df9
commit 0bb7f2cd85
8 changed files with 160 additions and 128 deletions

View File

@ -93,6 +93,7 @@ export class Client extends EventTarget {
const { jsonrpc, id, error, result } = evt.detail;
if (jsonrpc !== '2.0' || id === undefined) return;
if (!evt.detail.hasOwnProperty("error") && !evt.detail.hasOwnProperty("result")) return;
// Prevent additional handlers to catch this event
evt.stopImmediatePropagation();