Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(connector-quorum): transaction with different credentials #1098 #1488

Merged
merged 2 commits into from
Nov 5, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,19 @@ export class PluginLedgerConnectorQuorum
// the private key that we need to run the transaction.
const privateKeyHex = await keychainPlugin?.get(keychainEntryKey as string);

if (!transactionConfig.gas) {
this.log.debug(
`${fnTag} Gas not specified in the transaction values. Using the estimate from web3`,
);
transactionConfig.gas = await this.web3.eth.estimateGas(
transactionConfig,
);
this.log.debug(
`${fnTag} Gas estimated from web3 is: `,
transactionConfig.gas,
);
}

return this.transactPrivateKey({
transactionConfig,
web3SigningCredential: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ test(testCase, async (t: Test) => {
invocationType: EthContractInvocationType.Call,
methodName: "getName",
params: [],
gas: 1000000,
// gas: 1000000,
web3SigningCredential: {
ethAccount: testEthAccount.address,
secret: testEthAccount.privateKey,
Expand All @@ -345,7 +345,7 @@ test(testCase, async (t: Test) => {
invocationType: EthContractInvocationType.Send,
methodName: "getName",
params: [],
gas: 1000000,
//gas: 1000000,
web3SigningCredential: {
ethAccount: testEthAccount.address,
secret: testEthAccount.privateKey,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ test(testCase, async (t: Test) => {
invocationType: EthContractInvocationType.Send,
methodName: "setName",
params: [newName],
gas: 1000000,
// gas: 1000000,
web3SigningCredential: {
ethAccount: testEthAccount.address,
secret: testEthAccount.privateKey,
Expand All @@ -323,7 +323,7 @@ test(testCase, async (t: Test) => {
invocationType: EthContractInvocationType.Call,
methodName: "getName",
params: [],
gas: 1000000,
// gas: 1000000,
web3SigningCredential: {
ethAccount: testEthAccount.address,
secret: testEthAccount.privateKey,
Expand Down