Fix a bug when TruffleArtifactAdapter wasn't correctly parsing solc config in the pre 5.0 version of trufle

This commit is contained in:
Leonid Logvinov 2019-02-28 16:45:46 -08:00
parent 13ee8686bb
commit 77ad8e1a80
No known key found for this signature in database
GPG Key ID: 0DD294BFDE8C95D4
2 changed files with 10 additions and 1 deletions

View File

@ -1,4 +1,13 @@
[
{
"version": "6.0.7",
"changes": [
{
"note": "Fix a bug when `TruffleArtifactAdapter` wasn't correctly parsing solc config in the pre 5.0 version of trufle",
"pr": "todo"
}
]
},
{
"version": "6.0.6",
"changes": [

View File

@ -83,7 +83,7 @@ export class TruffleArtifactAdapter extends AbstractArtifactAdapter {
const truffleConfig = this._getTruffleConfig();
if (!_.isUndefined(truffleConfig.solc)) {
// Truffle < 5.0
return (truffleConfig as any).solc.settings;
return (truffleConfig as any).solc;
} else if (!_.isUndefined((truffleConfig as any).compilers.solc)) {
// Truffle >= 5.0
return (truffleConfig as any).compilers.solc.settings;