Merge pull request #627 from embark-framework/bug_fix/warning-contract-path

trim the contract name to have the warning correctly (patch)
This commit is contained in:
Iuri Matias 2018-07-26 13:31:59 -04:00 committed by GitHub
commit a01e600857
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -178,7 +178,7 @@ class ContractDeployer {
deployedAddress = deployedAddress.substr(2); deployedAddress = deployedAddress.substr(2);
} }
let linkReference = '__' + filename + ":" + contractObj.className; let linkReference = '__' + filename + ":" + contractObj.className;
if (contractCode.indexOf(linkReference) < 0) { if (contractCode.indexOf(linkReference.substr(0, 38)) < 0) { // substr to simulate the cut that solc does
continue; continue;
} }
if (linkReference.length > 40) { if (linkReference.length > 40) {