diff --git a/flake.nix b/flake.nix index 18015e51..b32e3740 100644 --- a/flake.nix +++ b/flake.nix @@ -31,6 +31,7 @@ rust-analyzer nodePackages.typescript nodePackages.typescript-language-server + nodePackages.prettier zellij ]; RUST_LOG = "info,hyper=error,parse_headers=error,encode_headers=error,wasmer_compiler_cranelift=info,solana_rpc_client=debug,solana_client=debug,jsonrpsee_server=info"; diff --git a/js/sdk-core/src/base-client.ts b/js/sdk-core/src/base-client.ts index 3e0d2f53..68fd8a48 100644 --- a/js/sdk-core/src/base-client.ts +++ b/js/sdk-core/src/base-client.ts @@ -310,11 +310,10 @@ export class BaseClient { } if (!err) { - await this.__invokeEventCallback(event, - { - isCheckpoint: effects?.checkpoint !== undefined, - source, - }) + await this.__invokeEventCallback(event, { + isCheckpoint: effects?.checkpoint !== undefined, + source, + }) } if (err) { @@ -394,19 +393,16 @@ export class BaseClient { try { await this.__checkStateSha(frame.stateSha, 'checkpoint-state-sha-mismatch') let histLen = frame.histories.length - for (let i = 0; i < histLen; i ++) { + for (let i = 0; i < histLen; i++) { const h = frame.histories[i] const remaining = histLen - i - 1 - await this.__handleEvent(h.event, h.timestamp, h.stateSha, - { kind: 'backlog', remaining } - ) + await this.__handleEvent(h.event, h.timestamp, h.stateSha, { kind: 'backlog', remaining }) } if (histLen === 0) { - this.__invokeEventCallback(undefined, - { - isCheckpoint: true, - source: { kind: 'backlog', remaining: 0 } - }) + this.__invokeEventCallback(undefined, { + isCheckpoint: true, + source: { kind: 'backlog', remaining: 0 }, + }) } } finally { console.groupEnd()