From b3dea655f19bb667abf67a2d5db4a698fb119c2c Mon Sep 17 00:00:00 2001 From: armaniferrante Date: Sun, 21 Mar 2021 11:44:35 -0700 Subject: [PATCH] Update --- ts/src/program.ts | 10 +++++----- ts/tsconfig.json | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ts/src/program.ts b/ts/src/program.ts index c667eba925..50d80513d7 100644 --- a/ts/src/program.ts +++ b/ts/src/program.ts @@ -173,7 +173,7 @@ export class Program { return [null, ...handleSystemLog(log)]; } }; - + // @ts-ignore // Each log given, represents an array of messages emitted by // a single transaction, which can execute many different programs across // CPI boundaries. However, the subscription is only interested in the @@ -189,20 +189,20 @@ export class Program { // @ts-ignore return this.provider.connection.onLogs( { mentions: [this.programId.toString()] }, - (logs: any) => { - if (logs.value.err) { + (logs, ctx) => { + if (logs.err) { console.error(logs); return; } - const logScanner = new LogScanner(logs.value.logs); + const logScanner = new LogScanner(logs.logs); const execution = new ExecutionContext(logScanner.next() as string); let log = logScanner.next(); while (log !== null) { let [event, newProgram, didPop] = handleLog(execution, log); if (event) { - callback(event, logs.context.slot); + callback(event, ctx.slot); } if (newProgram) { execution.contextSwitch(newProgram); diff --git a/ts/tsconfig.json b/ts/tsconfig.json index af9edf924c..d59c4a00e3 100644 --- a/ts/tsconfig.json +++ b/ts/tsconfig.json @@ -14,7 +14,7 @@ "allowSyntheticDefaultImports": true, "experimentalDecorators": true, "emitDecoratorMetadata": true, - "noImplicitAny": true, + "noImplicitAny": false, "esModuleInterop": true, "composite": true,