From 2ede5c83db1682558c8c37242671cc3289b7d473 Mon Sep 17 00:00:00 2001 From: Dmytro Stebaiev Date: Tue, 9 Jul 2024 19:30:12 +0300 Subject: [PATCH] Fix protection --- src/upgrader.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/upgrader.ts b/src/upgrader.ts index 09b379b..5d1fe94 100644 --- a/src/upgrader.ts +++ b/src/upgrader.ts @@ -203,11 +203,13 @@ export abstract class Upgrader { private async protectedDeployNewImplementation (contract: string) { await this.deploySemaphore.acquire(); + let result: ContractToUpgrade | null = null; try { - return this.deployNewImplementation(contract); + result = await this.deployNewImplementation(contract); } finally { this.deploySemaphore.release(); } + return result; } private async deployNewImplementation (contract: string) {