This repository was archived by the owner on Mar 5, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +2
-10
lines changed
packages/web3-eth-accounts/src/tx Expand file tree Collapse file tree 1 file changed +2
-10
lines changed Original file line number Diff line number Diff line change @@ -31,15 +31,7 @@ import type {
3131} from './types.js' ;
3232import { BaseTransaction } from './baseTransaction.js' ;
3333
34- let extraTxTypes : Map < Numbers , typeof BaseTransaction < unknown > > ;
35- // use the global object, to work fine even if web3-eth and web3-eth-accounts was on a different versions:
36- const typedGlobal = global as unknown as { extraTxTypes : Map < Numbers , typeof BaseTransaction < unknown > > }
37- if ( ! typedGlobal . extraTxTypes ) {
38- extraTxTypes = new Map ( ) ;
39- typedGlobal . extraTxTypes = extraTxTypes ;
40- } else {
41- extraTxTypes = typedGlobal . extraTxTypes ;
42- }
34+ const extraTxTypes : Map < Numbers , typeof BaseTransaction < unknown > > = new Map ( ) ;
4335
4436// eslint-disable-next-line @typescript-eslint/no-extraneous-class
4537export class TransactionFactory {
@@ -145,7 +137,7 @@ export class TransactionFactory {
145137 */
146138 public static fromBlockBodyData ( data : Uint8Array | Uint8Array [ ] , txOptions : TxOptions = { } ) {
147139 if ( isUint8Array ( data ) ) {
148- return this . fromSerializedData ( data , txOptions ) ;
140+ return this . fromSerializedData ( data , txOptions ) ;
149141 }
150142 if ( Array . isArray ( data ) ) {
151143 // It is a legacy transaction
You can’t perform that action at this time.
0 commit comments