diff --git a/packages/web3-eth/src/factories/MethodFactory.js b/packages/web3-eth/src/factories/MethodFactory.js index 987656ea385..7021652f126 100644 --- a/packages/web3-eth/src/factories/MethodFactory.js +++ b/packages/web3-eth/src/factories/MethodFactory.js @@ -52,7 +52,8 @@ import { GetWorkMethod, GetPastLogsMethod, RequestAccountsMethod, - VersionMethod + VersionMethod, + ChainIdMethod } from 'web3-core-method'; export default class MethodFactory extends AbstractMethodFactory { @@ -97,7 +98,8 @@ export default class MethodFactory extends AbstractMethodFactory { getWork: GetWorkMethod, getPastLogs: GetPastLogsMethod, requestAccounts: RequestAccountsMethod, - getId: VersionMethod + getId: VersionMethod, + getChainId: ChainIdMethod }; } } diff --git a/packages/web3-eth/src/signers/TransactionSigner.js b/packages/web3-eth/src/signers/TransactionSigner.js index 77c05a6cd68..d10c18d9b70 100644 --- a/packages/web3-eth/src/signers/TransactionSigner.js +++ b/packages/web3-eth/src/signers/TransactionSigner.js @@ -48,7 +48,7 @@ export default class TransactionSigner { const privateKey = this.accounts.wallet[from]; if (this.isUndefinedOrNull(tx.chainId)) { - tx.chainId = await moduleInstance.getId(); + tx.chainId = await moduleInstance.getChainId(); } if (this.isUndefinedOrNull(tx.nonce)) { tx.nonce = await moduleInstance.getTransactionCount(tx.from);