fix(stack/contracts-manager): ensure custom `abiDefinition` is set properly if provided

Turns out that 17cec1b787 has never worked as intended.
Custom provided `abiDefinition` values have been simply ignored. Embark always used the
`abiDefnition` that resulted from the Smart Contract compilation.
This commit is contained in:
Pascal Precht 2020-02-12 12:58:29 +01:00 committed by Pascal Precht
parent e9be40c289
commit b4b4848913
1 changed files with 1 additions and 1 deletions

View File

@ -325,7 +325,7 @@ export default class ContractsManager {
contract.swarmHash = compiledContract.swarmHash;
contract.gasEstimates = compiledContract.gasEstimates;
contract.functionHashes = compiledContract.functionHashes;
contract.abiDefinition = compiledContract.abiDefinition;
contract.abiDefinition = contractConfig?.abiDefinition ?? compiledContract.abiDefinition;
contract.filename = compiledContract.filename;
contract.originalFilename = compiledContract.originalFilename || ("contracts/" + contract.filename);
contract.path = dappPath(contract.originalFilename);