Skip to content

Commit

Permalink
no running promise
Browse files Browse the repository at this point in the history
  • Loading branch information
benesjan committed Oct 6, 2023
1 parent f15afcc commit 9fe305f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions yarn-project/cli/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
import { StructType, decodeFunctionSignatureWithParameterNames } from '@aztec/foundation/abi';
import { JsonStringify } from '@aztec/foundation/json-rpc';
import { DebugLogger, LogFn } from '@aztec/foundation/log';
import { RunningPromise } from '@aztec/foundation/running-promise';
import { sleep } from '@aztec/foundation/sleep';
import { fileURLToPath } from '@aztec/foundation/url';
import { compileContract, generateNoirInterface, generateTypescriptInterface } from '@aztec/noir-compiler/cli';
import { CompleteAddress, ContractData, LogFilter } from '@aztec/types';
Expand Down Expand Up @@ -323,7 +323,10 @@ export function getProgram(log: LogFn, debugLogger: DebugLogger): Command {

if (follow) {
log('Fetching logs...');
new RunningPromise(fetchLogs, 1000).start();
while (true) {
await fetchLogs();
await sleep(1000);
}
} else {
await fetchLogs();
}
Expand Down

0 comments on commit 9fe305f

Please sign in to comment.