Skip to content

Commit

Permalink
Remove privileged sender check and related test in KintoWalletFactory…
Browse files Browse the repository at this point in the history
… contract.
  • Loading branch information
ylv-io committed Oct 22, 2024
1 parent 66d0b4e commit 38942a0
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 8 deletions.
3 changes: 0 additions & 3 deletions src/wallet/KintoWalletFactory.sol
Original file line number Diff line number Diff line change
Expand Up @@ -236,9 +236,6 @@ contract KintoWalletFactory is Initializable, UUPSUpgradeable, OwnableUpgradeabl
if (recoverer != IKintoWallet(wallet).recoverer()) {
revert OnlyRecoverer(recoverer, IKintoWallet(wallet).recoverer());
}
bool isPrivileged =
owner() == msg.sender || IAccessControl(address(kintoID)).hasRole(kintoID.KYC_PROVIDER_ROLE(), msg.sender);
if (!isPrivileged) revert InvalidSender(msg.sender);
(bool sent,) = recoverer.call{value: msg.value}("");
if (!sent) revert SendFailed();
}
Expand Down
5 changes: 0 additions & 5 deletions test/unit/KintoWalletFactory.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -607,9 +607,4 @@ contract KintoWalletFactoryTest is SharedSetup {
vm.expectRevert(abi.encodeWithSelector(IKintoWalletFactory.OnlyRecoverer.selector, address(123), _recoverer));
_walletFactory.sendMoneyToRecoverer(address(_kintoWallet), address(123));
}

function testSendMoneyToRecoverer_RevertWhenInvalidSender() public {
vm.expectRevert(abi.encodeWithSelector(IKintoWalletFactory.InvalidSender.selector, address(this)));
_walletFactory.sendMoneyToRecoverer(address(_kintoWallet), _recoverer);
}
}

0 comments on commit 38942a0

Please sign in to comment.