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 9
9
assert , assertArgument
10
10
} from "../utils/index.js" ;
11
11
12
+ import type { SignatureLike } from "../crypto/index.js"
12
13
import type {
13
14
BlockParams , LogParams ,
14
15
TransactionReceiptParams , TransactionResponseParams ,
@@ -215,11 +216,25 @@ export function formatTransactionResponse(value: any): TransactionResponseParams
215
216
blobVersionedHashes : allowNull ( arrayOf ( formatHash , true ) , null ) ,
216
217
217
218
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
+
218
233
return {
219
234
address : getAddress ( v . address ) ,
220
235
chainId : getBigInt ( v . chainId ) ,
221
236
nonce : getBigInt ( v . nonce ) ,
222
- signature : Signature . from ( v . signature ? v . signature : v )
237
+ signature : Signature . from ( sig )
223
238
} ;
224
239
} , false ) , null ) ,
225
240
You can’t perform that action at this time.
0 commit comments