Commit 66a0eee4 authored by Maurelian's avatar Maurelian

refactor(ctb): Abstract addOwner method to giveToFallbackOwner

parent da8a1f23
...@@ -111,20 +111,19 @@ contract LivenessModule is ISemver { ...@@ -111,20 +111,19 @@ contract LivenessModule is ISemver {
} }
// Add the fallback owner as the sole owner of the Safe // Add the fallback owner as the sole owner of the Safe
_addOwnerWithThreshold({ _owner: fallbackOwner, _threshold: 1 }); _giveToFallbackOwner();
} }
_verifyFinalState(); _verifyFinalState();
} }
/// @notice Adds the owner `owner` to the Safe and updates the threshold to `_threshold`. /// @notice Sets the fallback owner as the sole owner of the Safe with a threshold of 1
/// @param _owner New owner address. function _giveToFallbackOwner() internal {
/// @param _threshold New threshold.
function _addOwnerWithThreshold(address _owner, uint256 _threshold) internal {
safe.execTransactionFromModule({ safe.execTransactionFromModule({
to: address(safe), to: address(safe),
value: 0, value: 0,
operation: Enum.Operation.Call, operation: Enum.Operation.Call,
data: abi.encodeCall(OwnerManager.addOwnerWithThreshold, (_owner, _threshold)) data: abi.encodeCall(OwnerManager.addOwnerWithThreshold, (fallbackOwner, 1))
}); });
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment