11import { describe , expect , test } from 'vitest'
2-
3- import { toPackedUserOperation } from './toPackedUserOperation.js'
42import type { UserOperation } from '../../types/userOperation.js'
3+ import { toPackedUserOperation } from './toPackedUserOperation.js'
54
65const paymasterSignatureMagic = '0x22e325a297439656'
76
@@ -54,7 +53,9 @@ describe('toPackedUserOperation', () => {
5453 expect ( packed . paymasterAndData ) . toMatchInlineSnapshot (
5554 `"0x12345678901234567890123456789012345678900000000000000000000000000069ed750000000000000000000000000069ed75deadbeef22e325a297439656"` ,
5655 )
57- expect ( packed . paymasterAndData . endsWith ( paymasterSignatureMagic . slice ( 2 ) ) ) . toBe ( true )
56+ expect (
57+ packed . paymasterAndData . endsWith ( paymasterSignatureMagic . slice ( 2 ) ) ,
58+ ) . toBe ( true )
5859 } )
5960
6061 test ( 'forHash: false - includes signature + length + magic' , ( ) => {
@@ -64,7 +65,9 @@ describe('toPackedUserOperation', () => {
6465 expect ( packed . paymasterAndData ) . toMatchInlineSnapshot (
6566 `"0x12345678901234567890123456789012345678900000000000000000000000000069ed750000000000000000000000000069ed75deadbeefcafebabe000422e325a297439656"` ,
6667 )
67- expect ( packed . paymasterAndData . endsWith ( paymasterSignatureMagic . slice ( 2 ) ) ) . toBe ( true )
68+ expect (
69+ packed . paymasterAndData . endsWith ( paymasterSignatureMagic . slice ( 2 ) ) ,
70+ ) . toBe ( true )
6871 expect ( packed . paymasterAndData ) . toContain ( 'cafebabe' )
6972 expect ( packed . paymasterAndData ) . toContain ( '0004' )
7073 } )
0 commit comments