fix(contractsConfig): fix using ints as gas and gasPrice

This commit is contained in:
Jonathan Rainville 2019-02-22 09:05:40 -05:00 committed by Iuri Matias
parent c5e29b7844
commit dd14262108
1 changed files with 2 additions and 2 deletions

View File

@ -12,11 +12,11 @@ export function prepare(config: any) {
const args = config.contracts[contractName].args;
const onDeploy = config.contracts[contractName].onDeploy;
if (gas && gas.match(unitRegex)) {
if (gas && gas.toString().match(unitRegex)) {
config.contracts[contractName].gas = utils.getWeiBalanceFromString(gas, web3);
}
if (gasPrice && gasPrice.match(unitRegex)) {
if (gasPrice && gasPrice.toString().match(unitRegex)) {
config.contracts[contractName].gasPrice = utils.getWeiBalanceFromString(gasPrice, web3);
}