@@ -58,9 +58,9 @@ describe('Delegated user decryption', function () {
5858 ) ;
5959 await delegateTx . wait ( ) ;
6060
61- // Wait for 15 blocks to ensure delegation is propagated by the coprocessor.
61+ // Wait for 2 blocks to ensure delegation is propagated by the coprocessor.
6262 const currentBlock = await ethers . provider . getBlockNumber ( ) ;
63- await waitForBlock ( currentBlock + 15 ) ;
63+ await waitForBlock ( currentBlock + 2 ) ;
6464
6565 // Get the encrypted balance handle of the smartWallet.
6666 const balanceHandle = await this . token . balanceOf ( this . smartWalletAddress ) ;
@@ -95,9 +95,9 @@ describe('Delegated user decryption', function () {
9595 ) ;
9696 await delegateTx . wait ( ) ;
9797
98- // Wait for 15 blocks to ensure delegation is propagated by the coprocessor.
98+ // Wait for 2 blocks to ensure delegation is propagated by the coprocessor.
9999 const currentBlock = await ethers . provider . getBlockNumber ( ) ;
100- await waitForBlock ( currentBlock + 15 ) ;
100+ await waitForBlock ( currentBlock + 2 ) ;
101101
102102 // Get the encrypted balance handle of the smartWallet.
103103 const balanceHandle = await this . token . balanceOf ( this . smartWalletAddress ) ;
@@ -132,9 +132,9 @@ describe('Delegated user decryption', function () {
132132 ) ;
133133 await delegateTx . wait ( ) ;
134134
135- // Wait for 15 blocks to ensure delegation is propagated by the coprocessor.
135+ // Wait for 2 blocks to ensure delegation is propagated by the coprocessor.
136136 let currentBlock = await ethers . provider . getBlockNumber ( ) ;
137- await waitForBlock ( currentBlock + 15 ) ;
137+ await waitForBlock ( currentBlock + 2 ) ;
138138
139139 // Get the current smartWallet balance before transfer
140140 const smartWalletBalanceBefore = await this . token . balanceOf ( this . smartWalletAddress ) ;
@@ -212,9 +212,9 @@ describe('Delegated user decryption', function () {
212212 ) ;
213213 await delegateTx . wait ( ) ;
214214
215- // Wait for 15 blocks to ensure delegation is propagated by the coprocessor.
215+ // Wait for 2 blocks to ensure delegation is propagated by the coprocessor.
216216 const currentBlock1 = await ethers . provider . getBlockNumber ( ) ;
217- await waitForBlock ( currentBlock1 + 15 ) ;
217+ await waitForBlock ( currentBlock1 + 2 ) ;
218218
219219 // Revoke the delegation for Bob's EOA.
220220 const revokeTx = await this . smartWallet
@@ -225,9 +225,9 @@ describe('Delegated user decryption', function () {
225225 ) ;
226226 await revokeTx . wait ( ) ;
227227
228- // Wait for 15 blocks to ensure revocation is propagated by the coprocessor.
228+ // Wait for 2 blocks to ensure revocation is propagated by the coprocessor.
229229 const currentBlock2 = await ethers . provider . getBlockNumber ( ) ;
230- await waitForBlock ( currentBlock2 + 15 ) ;
230+ await waitForBlock ( currentBlock2 + 2 ) ;
231231
232232 // Try to decrypt the smartWallet balance with Bob's EOA, which should now fail.
233233 const balanceHandle = await this . token . balanceOf ( this . smartWalletAddress ) ;
@@ -243,9 +243,7 @@ describe('Delegated user decryption', function () {
243243 this . signers . bob ,
244244 privateKey ,
245245 publicKey ,
246- )
247- ) . to . be . rejectedWith (
248- new RegExp ( USER_DECRYPTION_NOT_DELEGATED_SELECTOR ) ,
249- ) ;
246+ ) ,
247+ ) . to . be . rejectedWith ( 'Execution reverted' ) ;
250248 } ) ;
251249} ) ;
0 commit comments