File tree 2 files changed +1
-20
lines changed
2 files changed +1
-20
lines changed Original file line number Diff line number Diff line change @@ -444,10 +444,7 @@ contract Morpho is IMorphoStaticTyping {
444
444
445
445
/// @inheritdoc IMorphoBase
446
446
function setAuthorizationWithSig (Authorization memory authorization , Signature calldata signature ) external {
447
- require (
448
- authorization.isAuthorized != isAuthorized[authorization.authorizer][authorization.authorized],
449
- ErrorsLib.ALREADY_SET
450
- );
447
+ /// Do not check whether authorization is already set because the nonce increment is a desired side effect.
451
448
require (block .timestamp <= authorization.deadline, ErrorsLib.SIGNATURE_EXPIRED);
452
449
require (authorization.nonce == nonce[authorization.authorizer]++ , ErrorsLib.INVALID_NONCE);
453
450
Original file line number Diff line number Diff line change @@ -26,22 +26,6 @@ contract AuthorizationIntegrationTest is BaseTest {
26
26
morpho.setAuthorization (addressFuzz, true );
27
27
}
28
28
29
- function testAlreadySetWithSig (Authorization memory authorization , Signature memory sig ) public {
30
- authorization.isAuthorized = false ;
31
- authorization.authorizer = address (this );
32
- authorization.deadline = block .timestamp ;
33
- authorization.nonce = 0 ;
34
-
35
- vm.expectRevert (bytes (ErrorsLib.ALREADY_SET));
36
- morpho.setAuthorizationWithSig (authorization, sig);
37
-
38
- morpho.setAuthorization (authorization.authorized, true );
39
-
40
- authorization.isAuthorized = true ;
41
- vm.expectRevert (bytes (ErrorsLib.ALREADY_SET));
42
- morpho.setAuthorizationWithSig (authorization, sig);
43
- }
44
-
45
29
function testSetAuthorizationWithSignatureDeadlineOutdated (
46
30
Authorization memory authorization ,
47
31
uint256 privateKey ,
You can’t perform that action at this time.
0 commit comments