*SimpleRpcQuery needs to be wrapped in a factory

This commit is contained in:
Derrick Hammer 2023-03-24 15:58:32 -04:00
parent e80654de35
commit 8684fcde3c
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 5 additions and 1 deletions

View File

@ -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>(RpcNetwork, RPC_MODULE);
const createSimpleRpcQuery = factory<SimpleRpcQuery>(
SimpleRpcQuery,
RPC_MODULE
);