File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed
Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change 99 assert , assertArgument
1010} from "../utils/index.js" ;
1111
12+ import type { SignatureLike } from "../crypto/index.js"
1213import type {
1314 BlockParams , LogParams ,
1415 TransactionReceiptParams , TransactionResponseParams ,
@@ -215,11 +216,25 @@ export function formatTransactionResponse(value: any): TransactionResponseParams
215216 blobVersionedHashes : allowNull ( arrayOf ( formatHash , true ) , null ) ,
216217
217218 authorizationList : allowNull ( arrayOf ( ( v : any ) => {
219+ let sig : SignatureLike ;
220+ if ( v . signature ) {
221+ sig = v . signature ;
222+
223+ } else {
224+ let yParity = v . yParity ;
225+ if ( yParity === "0x1b" ) {
226+ yParity = 0 ;
227+ } else if ( yParity === "0x1c" ) {
228+ yParity = 1 ;
229+ }
230+ sig = Object . assign ( { } , v , { yParity } ) ;
231+ }
232+
218233 return {
219234 address : getAddress ( v . address ) ,
220235 chainId : getBigInt ( v . chainId ) ,
221236 nonce : getBigInt ( v . nonce ) ,
222- signature : Signature . from ( v . signature ? v . signature : v )
237+ signature : Signature . from ( sig )
223238 } ;
224239 } , false ) , null ) ,
225240
You can’t perform that action at this time.
0 commit comments