diff --git a/packages/embark-contracts-manager/src/index.js b/packages/embark-contracts-manager/src/index.js index 471d87814..a14f95872 100644 --- a/packages/embark-contracts-manager/src/index.js +++ b/packages/embark-contracts-manager/src/index.js @@ -123,7 +123,8 @@ class ContractsManager { self.events.request("blockchain:contract:create", {abi: contract.abiDefinition, address: contract.deployedAddress}, async (contractObj) => { try { - const value = req.body.value !== undefined ? web3.utils.toWei(req.body.value, 'ether') : 0; + let value = typeof req.body.value === "number" ? req.body.value.toString() : req.body.value; + value = web3.utils.toWei(value, 'ether'); const gas = await contractObj.methods[req.body.method].apply(this, req.body.inputs).estimateGas({ value }); contractObj.methods[req.body.method].apply(this, req.body.inputs)[funcCall]({ from: account,