Skip to content

Commit

Permalink
MethodFactory and TransactionSigner updated with ChainIdMethod in the…
Browse files Browse the repository at this point in the history
… eth module
  • Loading branch information
Samuel Furter committed Feb 18, 2019
1 parent fcc3d6c commit d98cef2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions packages/web3-eth/src/factories/MethodFactory.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ import {
GetWorkMethod,
GetPastLogsMethod,
RequestAccountsMethod,
VersionMethod
VersionMethod,
ChainIdMethod
} from 'web3-core-method';

export default class MethodFactory extends AbstractMethodFactory {
Expand Down Expand Up @@ -97,7 +98,8 @@ export default class MethodFactory extends AbstractMethodFactory {
getWork: GetWorkMethod,
getPastLogs: GetPastLogsMethod,
requestAccounts: RequestAccountsMethod,
getId: VersionMethod
getId: VersionMethod,
getChainId: ChainIdMethod
};
}
}
2 changes: 1 addition & 1 deletion packages/web3-eth/src/signers/TransactionSigner.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit d98cef2

Please sign in to comment.