From 8684fcde3c2bea91d741b906c6f15103e2bf8897 Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Fri, 24 Mar 2023 15:58:32 -0400 Subject: [PATCH] *SimpleRpcQuery needs to be wrapped in a factory --- src/index.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 64205cf..658b90f 100644 --- a/src/index.ts +++ b/src/index.ts @@ -46,7 +46,7 @@ export class RpcNetwork extends Client { query: ClientRPCRequest; options?: RpcQueryOptions; }): SimpleRpcQuery { - return new SimpleRpcQuery({ + return createSimpleRpcQuery({ network: this, relay, query, @@ -125,3 +125,7 @@ export class SimpleRpcQuery extends RpcQueryBase { } export const createClient = factory(RpcNetwork, RPC_MODULE); +const createSimpleRpcQuery = factory( + SimpleRpcQuery, + RPC_MODULE +);