@obolnetwork/obol-sdk 2.12.1 → 2.12.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4134,15 +4134,7 @@ function validateClusterLockInWorker(lock, safeRpcUrl) {
4134
4134
  const worker = new wt.Worker(workerFile, {
4135
4135
  workerData: { lock, safeRpcUrl }
4136
4136
  });
4137
- let timer;
4138
- const finish = (result) => {
4139
- if (settled) return;
4140
- settled = true;
4141
- clearTimeout(timer);
4142
- worker.terminate();
4143
- resolve(result);
4144
- };
4145
- timer = setTimeout(() => {
4137
+ const timer = setTimeout(() => {
4146
4138
  if (settled) return;
4147
4139
  settled = true;
4148
4140
  clearTimeout(timer);
@@ -4151,6 +4143,13 @@ function validateClusterLockInWorker(lock, safeRpcUrl) {
4151
4143
  new ClusterLockValidationTimeoutError(VALIDATION_WORKER_TIMEOUT_MS)
4152
4144
  );
4153
4145
  }, VALIDATION_WORKER_TIMEOUT_MS);
4146
+ const finish = (result) => {
4147
+ if (settled) return;
4148
+ settled = true;
4149
+ clearTimeout(timer);
4150
+ worker.terminate();
4151
+ resolve(result);
4152
+ };
4154
4153
  worker.once("message", (msg) => {
4155
4154
  finish(msg === true);
4156
4155
  });