*Properly pass both query and options

This commit is contained in:
Derrick Hammer 2022-08-30 21:49:40 -04:00
parent 1847eaaeac
commit 7efa878f15
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 17 additions and 13 deletions

View File

@ -159,9 +159,12 @@ export abstract class RpcQueryBase {
} }
public run(): this { public run(): this {
this._promise = this._network this._promise = this._network.processQueue().then(() =>
.processQueue() callModule(RPC_MODULE, this._queryType, {
.then(() => callModule(RPC_MODULE, this._queryType, this._query)); query: this._query,
options: this._options,
})
);
return this; return this;
} }
@ -201,13 +204,14 @@ export class StreamingRpcQuery extends RpcQueryBase {
} }
public run(): this { public run(): this {
this._promise = this._network this._promise = this._network.processQueue().then(() =>
.processQueue()
.then(() =>
connectModule( connectModule(
RPC_MODULE, RPC_MODULE,
this._queryType, this._queryType,
this._query, {
query: this._query,
options: this._options,
},
this._options.streamHandler this._options.streamHandler
) )
); );