Skip to content

Commit

Permalink
fix(connector-besu): removed repeated check
Browse files Browse the repository at this point in the history
Signed-off-by: AzaharaC <[email protected]>
  • Loading branch information
AzaharaC authored and petermetz committed May 25, 2021
1 parent 23788d4 commit a4cb63b
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -557,11 +557,7 @@ export class PluginLedgerConnectorBesu
keychainPlugin,
`${fnTag} keychain for ID:"${req.keychainId}"`,
);
if (!keychainPlugin.has(req.contractName)) {
throw new Error(
`${fnTag} Cannot create an instance of the contract because the contractName and the contractName on the keychain does not match`,
);
}

const networkId = await this.web3.eth.net.getId();

const tmpContract = new this.web3.eth.Contract(req.contractAbi);
Expand Down Expand Up @@ -621,6 +617,10 @@ export class PluginLedgerConnectorBesu

keychainPlugin.set(contractName, contractJSON);
}
} else {
throw new Error(
`${fnTag} Cannot create an instance of the contract because the contractName and the contractName on the keychain does not match`,
);
}
return runTxResponse;
}
Expand Down

0 comments on commit a4cb63b

Please sign in to comment.