mirror of
https://github.com/embarklabs/embark.git
synced 2025-02-18 08:36:51 +00:00
fix(contractsConfig): fix using ints as gas and gasPrice
This commit is contained in:
parent
c5e29b7844
commit
dd14262108
@ -12,11 +12,11 @@ export function prepare(config: any) {
|
|||||||
const args = config.contracts[contractName].args;
|
const args = config.contracts[contractName].args;
|
||||||
const onDeploy = config.contracts[contractName].onDeploy;
|
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);
|
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);
|
config.contracts[contractName].gasPrice = utils.getWeiBalanceFromString(gasPrice, web3);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user