@@ -28,7 +28,7 @@ const convertContextToV3Context = (context: v2commons.context.WalletContext): V3
2828 }
2929}
3030
31- describe ( 'MigrationEncoder_v1v3' , ( ) => {
31+ describe ( 'MigrationEncoder_v1v3' , async ( ) => {
3232 let anvilSigner : MultiSigner
3333 let testSigner : MultiSigner
3434
@@ -57,7 +57,7 @@ describe('MigrationEncoder_v1v3', () => {
5757 testSigner = createMultiSigner ( testSignerPk , providers . v2 )
5858 } )
5959
60- describe ( 'convertConfig' , ( ) => {
60+ describe ( 'convertConfig' , async ( ) => {
6161 it ( 'should convert v1 config to v3 config with single signer' , async ( ) => {
6262 const v1Config : v1 . config . WalletConfig = {
6363 version : 1 ,
@@ -251,7 +251,7 @@ describe('MigrationEncoder_v1v3', () => {
251251 } )
252252 } )
253253
254- describe ( 'prepareMigration' , ( ) => {
254+ describe ( 'prepareMigration' , async ( ) => {
255255 it ( 'should prepare migration transactions correctly' , async ( ) => {
256256 const walletAddress = testAddress
257257 const contexts : VersionedContext = {
@@ -396,7 +396,7 @@ describe('MigrationEncoder_v1v3', () => {
396396 } )
397397 } )
398398
399- describe ( 'decodeTransactions' , ( ) => {
399+ describe ( 'decodeTransactions' , async ( ) => {
400400 it ( 'should decode transactions correctly' , async ( ) => {
401401 const walletAddress = testAddress
402402 const imageHash = '0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef'
@@ -524,7 +524,7 @@ describe('MigrationEncoder_v1v3', () => {
524524 } )
525525 } )
526526
527- describe ( 'constants' , ( ) => {
527+ describe ( 'constants' , async ( ) => {
528528 it ( 'should have correct nonce space' , ( ) => {
529529 expect ( MIGRATION_V1_V3_NONCE_SPACE ) . toBe ( '0x9e4d5bdafd978baf1290aff23057245a2a62bef5' )
530530 } )
@@ -535,7 +535,7 @@ describe('MigrationEncoder_v1v3', () => {
535535 } )
536536 } )
537537
538- describe ( 'integration test' , ( ) => {
538+ describe ( 'integration test' , async ( ) => {
539539 it ( 'should use migration ' , async ( ) => {
540540 // Create v1 config
541541 const v1Config : v1 . config . WalletConfig = {
@@ -620,6 +620,9 @@ describe('MigrationEncoder_v1v3', () => {
620620 expect ( receipt ?. status ) . toBe ( 1 )
621621 // This should now be a v3 wallet on chain
622622
623+ // Wait for any pending transactions to fully settle
624+ await new Promise ( ( resolve ) => setTimeout ( resolve , 100 ) )
625+
623626 // Save the wallet information to the state provider
624627 const stateProvider = new State . Local . Provider ( )
625628 await stateProvider . saveDeploy ( v1ImageHash , convertContextToV3Context ( v1 . DeployedWalletContext ) )
@@ -653,6 +656,8 @@ describe('MigrationEncoder_v1v3', () => {
653656 method : 'eth_sendTransaction' ,
654657 params : [ signedTx ] ,
655658 } )
659+ // Wait a bit for the transaction to be mined
660+ await new Promise ( ( resolve ) => setTimeout ( resolve , 3000 ) )
656661 const testReceipt = await providers . v3 . request ( {
657662 method : 'eth_getTransactionReceipt' ,
658663 params : [ testTx ] ,
0 commit comments