From cf59e6b1eb40fab6a1fab2975692ed0de44b062b Mon Sep 17 00:00:00 2001 From: Roman Volosovskyi Date: Wed, 27 Sep 2017 08:14:43 +0200 Subject: [PATCH] fix nil gasPrice --- resources/js/bots/wallet/bot.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/resources/js/bots/wallet/bot.js b/resources/js/bots/wallet/bot.js index a332b0f7d5..194dbfd1ed 100644 --- a/resources/js/bots/wallet/bot.js +++ b/resources/js/bots/wallet/bot.js @@ -359,13 +359,17 @@ function validateSend(params, context) { function handleSend(params, context) { var val = web3.toWei(params["amount"].replace(",", "."), "ether"); + var gasPrice = calculateGasPrice(params["bot-db"]["sliderValue"]); var data = { from: context.from, to: params["bot-db"]["public"]["recipient"]["address"], - value: val, - gasPrice: calculateGasPrice(params["bot-db"]["sliderValue"]) + value: val }; + if (gasPrice) { + data.gasPrice = gasPrice; + } + web3.eth.sendTransaction(data, function(error, hash) { if (error) { status.sendSignal("handler-result", {