Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
armaniferrante committed Mar 21, 2021
1 parent 7b88e16 commit b3dea65
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions ts/src/program.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion ts/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"allowSyntheticDefaultImports": true,
"experimentalDecorators": true,
"emitDecoratorMetadata": true,
"noImplicitAny": true,
"noImplicitAny": false,

"esModuleInterop": true,
"composite": true,
Expand Down

0 comments on commit b3dea65

Please sign in to comment.