bug #2949 - resolved unset gas info after send from chat

This commit is contained in:
Goran Jovic 2018-01-11 12:07:07 +01:00 committed by Oskar Thoren
parent 2f6742cdc7
commit 8e5fc1d6f1
No known key found for this signature in database
GPG Key ID: 5128AB0637CD85AF
3 changed files with 5 additions and 7 deletions

View File

@ -407,7 +407,8 @@ function handleSend(groupChat, params, context) {
var gasPrice = calculateGasPrice(params["bot-db"]["sliderValue"]);
var data = {
from: context.from,
value: val
value: val,
gas: web3.toBigNumber(21000)
};
if (groupChat) {

View File

@ -21,11 +21,8 @@
db
(update db :wallet dissoc :request-transaction)))
(defn- dissoc-transaction-details [m]
(apply dissoc m (apply disj (set (keys m)) (keys db/transaction-send-default))))
(defmethod navigation/preload-data! :wallet-send-transaction
[db [event]]
(if (= event :navigate-back)
db
(update-in db [:wallet :send-transaction] dissoc-transaction-details)))
(assoc-in db [:wallet :send-transaction] db/transaction-send-default)))

View File

@ -108,8 +108,8 @@
:symbol symbol
:value (money/bignumber (or value 0))
:data data
:gas (money/to-decimal gas)
:gas-price (money/to-decimal gasPrice)
:gas (money/bignumber (money/to-decimal gas))
:gas-price (money/bignumber (money/to-decimal gasPrice))
:timestamp now
:message-id message_id}
sending-from-chat? (not (get-in db [:wallet :send-transaction :waiting-signal?]))