From 3c3faa86096764b8e0ce1197cda65125bfc32500 Mon Sep 17 00:00:00 2001 From: Roman Kolpakov Date: Tue, 20 Aug 2024 15:39:22 +0300 Subject: [PATCH] fix: sealable calls resume return value fix --- contracts/libraries/SealableCalls.sol | 2 +- test/unit/libraries/SealableCalls.t.sol | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/contracts/libraries/SealableCalls.sol b/contracts/libraries/SealableCalls.sol index bff9cc2b..db2738c5 100644 --- a/contracts/libraries/SealableCalls.sol +++ b/contracts/libraries/SealableCalls.sol @@ -63,7 +63,7 @@ library SealableCalls { function callResume(ISealable sealable) internal returns (bool success, bytes memory lowLevelError) { try sealable.resume() { (bool isPausedCallSuccess, bytes memory isPausedLowLevelError, bool isPaused) = callIsPaused(sealable); - success = isPausedCallSuccess && isPaused; + success = isPausedCallSuccess && !isPaused; lowLevelError = isPausedLowLevelError; } catch (bytes memory resumeLowLevelError) { success = false; diff --git a/test/unit/libraries/SealableCalls.t.sol b/test/unit/libraries/SealableCalls.t.sol index d847e50f..12a8771d 100644 --- a/test/unit/libraries/SealableCalls.t.sol +++ b/test/unit/libraries/SealableCalls.t.sol @@ -60,7 +60,7 @@ contract SealableCallsUnitTests is UnitTest { (bool success, bytes memory lowLevelError) = SealableCalls.callResume(_sealableMock); - assertFalse(success); + assertTrue(success); assertEq(lowLevelError.length, 0); (bool isPausedSuccess,, bool isPaused) = SealableCalls.callIsPaused(_sealableMock);