diff --git a/contracts/Shared Wallet/SharedWallet.sol b/contracts/Shared Wallet/SharedWallet.sol index bfd1940..6f96337 100644 --- a/contracts/Shared Wallet/SharedWallet.sol +++ b/contracts/Shared Wallet/SharedWallet.sol @@ -3,6 +3,7 @@ pragma solidity ^0.8.9; contract SharedWallet { + error Insufficient__Balance( ); address private _owner; mapping(address => bool) private _owners; @@ -44,14 +45,18 @@ contract SharedWallet { // withdraw fund from the shared wallet into the signer of transaction function withdraw(uint256 amount) public validOwner { - require(address(this).balance >= amount); + if(address(this).balance= amount); + if(address(this).balance= endTime, "Cannot withdraw before endTime"); - + if(msg.sender!=owner){ + revert Only__Owner_Can_Withdraw(); + } + if(block.timestamp