Skip to content

Commit

Permalink
fix code peculiarities
Browse files Browse the repository at this point in the history
  • Loading branch information
clangenb committed Oct 25, 2024
1 parent d2acd0e commit 7b09016
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/worker-api/src/worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ export class Worker implements IWorkerBase {
'Request', { shard, cyphertext: cyphertext }
);

const returnValue = await this.subscribe('author_submitAndWatchExtrinsic', [r.toHex()])
const returnValue = await this.submitAndWatch([r.toHex()])

console.debug(`[sendTrustedCall] result: ${JSON.stringify(returnValue)}`);

Expand All @@ -176,7 +176,7 @@ export class Worker implements IWorkerBase {
return this.resultToRpcReturnValue(result);
}

public async subscribe(method: string, params: unknown[]): Promise<TrustedCallResult> {
public async submitAndWatch(params: unknown[]): Promise<TrustedCallResult> {
await this.isReady();

let topHash: Hash;
Expand Down Expand Up @@ -207,8 +207,8 @@ export class Worker implements IWorkerBase {
}

try {
const res = await this.#ws.subscribe(method,
method, params, onStatusChange
const res = await this.#ws.subscribe('author_submitAndWatchExtrinsic',
'author_submitAndWatchExtrinsic', params, onStatusChange
);
topHash = this.createType('Hash', res);
console.debug(`topHash: ${topHash}`);
Expand Down

0 comments on commit 7b09016

Please sign in to comment.