File tree Expand file tree Collapse file tree 1 file changed +5
-9
lines changed
packages/contracts/test/core/dao Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -141,11 +141,6 @@ describe('DAO', function () {
141
141
ownerAddress ,
142
142
PERMISSION_IDS . UPGRADE_DAO_PERMISSION_ID
143
143
) ,
144
- dao . grant (
145
- dao . address ,
146
- ownerAddress ,
147
- PERMISSION_IDS . VALIDATE_SIGNATURE_PERMISSION_ID
148
- ) ,
149
144
dao . grant (
150
145
dao . address ,
151
146
ownerAddress ,
@@ -1230,17 +1225,18 @@ describe('DAO', function () {
1230
1225
) . to . be . eq ( true ) ;
1231
1226
} ) ;
1232
1227
1233
- it ( 'reverts all signatures requests by default' , async ( ) => {
1228
+ it ( 'treats signatures as invalid by default if no permission is set ' , async ( ) => {
1234
1229
const caller = signers [ 0 ] ;
1235
1230
const signer = signers [ 1 ] ;
1236
1231
1237
1232
const message = 'Hi!' ;
1238
1233
const hash = ethers . utils . hashMessage ( message ) ;
1239
1234
const signature = await signer . signMessage ( message ) ;
1240
1235
1241
- // The caller can validate signatures now.
1242
- expect ( await dao . connect ( caller ) . isValidSignature ( hash , signature ) ) . to . be
1243
- . reverted ;
1236
+ // Because no permission is set, the signature is said to be invalid
1237
+ expect (
1238
+ await dao . connect ( caller ) . isValidSignature ( hash , signature )
1239
+ ) . to . equal ( INVALID_ERC1271_SIGNATURE ) ;
1244
1240
} ) ;
1245
1241
1246
1242
it ( 'allows caller specific signature validation' , async ( ) => {
You can’t perform that action at this time.
0 commit comments