review comments

This commit is contained in:
Jonathan Rainville 2019-01-17 11:30:36 -05:00
parent 7c9e56aebe
commit d96b51b3c3
2 changed files with 2 additions and 2 deletions

View File

@ -8,7 +8,7 @@ module.exports = (embark) => {
embark.registerConsoleCommand({
description: "Flattens all or some of your contracts so that they can be verified on etherscan\n\t\tYou can specify which contract to flatten by using their filename (relative to the contract directory specified in embark.json). For multiple contracts, separate them using a comma",
matches: (cmd) => {
const [commandName] = cmd.split(' '); // You can use `split` for commands that receive parameters
const [commandName] = cmd.split(' ');
return commandName === 'flatten';
},
usage: "flatten or flatten <contracts>",

View File

@ -70,7 +70,7 @@ class Flattener {
let contractsToFlatten;
try {
contractsToFlatten = contractNames.map(contractName => {
const contract = contracts[Object.keys(contracts).find(contractKey => contracts[contractKey].className === contractName)];
const contract = Object.values(contracts).find(contract => contract.className === contractName);
if (!contract) {
throw new Error('No contract named ' + contractName);
}