Skip to content

Commit c5fa0a9

Browse files
committed
Fix tests and mocks
1 parent 5ebc1f2 commit c5fa0a9

File tree

3 files changed

+18
-2
lines changed

3 files changed

+18
-2
lines changed

packages/utils/migration/test/encoder_v1_v3.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -621,7 +621,7 @@ describe('MigrationEncoder_v1v3', async () => {
621621
// This should now be a v3 wallet on chain
622622

623623
// Wait for any pending transactions to fully settle
624-
await new Promise((resolve) => setTimeout(resolve, 100))
624+
await new Promise((resolve) => setTimeout(resolve, 1000))
625625

626626
// Save the wallet information to the state provider
627627
const stateProvider = new State.Local.Provider()

packages/utils/migration/test/migrator_v1_v3.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ describe('Migrator_v1v3', async () => {
8585
const v3Wallet = await migrator.convertWallet(v1Wallet, options)
8686

8787
// Wait for any pending transactions from v1 wallet operations to settle
88-
await new Promise((resolve) => setTimeout(resolve, 100))
88+
await new Promise((resolve) => setTimeout(resolve, 1000))
8989

9090
// Test the wallet works as a v3 wallet now with a test transaction
9191
const call: Payload.Call = {

packages/wallet/wdk/test/sessions.test.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,10 @@ describe('Sessions (via Manager)', () => {
261261
// Undeployed wallet
262262
return Promise.resolve('0x')
263263
}
264+
if (method === 'eth_getStorageAt') {
265+
// Return 0 for storage slots (implementation)
266+
return Promise.resolve('0x0000000000000000000000000000000000000000000000000000000000000000')
267+
}
264268
if (method === 'eth_call' && params[0].data === AbiFunction.encodeData(Constants.READ_NONCE, [0n])) {
265269
// Nonce is 0
266270
return Promise.resolve('0x00')
@@ -335,6 +339,10 @@ describe('Sessions (via Manager)', () => {
335339
// Undeployed wallet
336340
return Promise.resolve('0x')
337341
}
342+
if (method === 'eth_getStorageAt') {
343+
// Return 0 for storage slots (implementation)
344+
return Promise.resolve('0x0000000000000000000000000000000000000000000000000000000000000000')
345+
}
338346
if (method === 'eth_call' && params[0].data === AbiFunction.encodeData(Constants.READ_NONCE, [0n])) {
339347
// Nonce is 0
340348
return Promise.resolve('0x00')
@@ -410,6 +418,10 @@ describe('Sessions (via Manager)', () => {
410418
// Undeployed wallet
411419
return Promise.resolve('0x')
412420
}
421+
if (method === 'eth_getStorageAt') {
422+
// Return 0 for storage slots (implementation)
423+
return Promise.resolve('0x0000000000000000000000000000000000000000000000000000000000000000')
424+
}
413425
if (method === 'eth_call' && params[0].data === AbiFunction.encodeData(Constants.READ_NONCE, [0n])) {
414426
// Nonce is 0
415427
return Promise.resolve('0x00')
@@ -497,6 +509,10 @@ describe('Sessions (via Manager)', () => {
497509
// Undeployed wallet
498510
return Promise.resolve('0x')
499511
}
512+
if (method === 'eth_getStorageAt') {
513+
// Return 0 for storage slots (implementation)
514+
return Promise.resolve('0x0000000000000000000000000000000000000000000000000000000000000000')
515+
}
500516
if (method === 'eth_call' && params[0].data === AbiFunction.encodeData(Constants.READ_NONCE, [0n])) {
501517
// Nonce is 0
502518
return Promise.resolve('0x00')

0 commit comments

Comments
 (0)