bug #2899 - using /send command always uses ETH currency
This commit is contained in:
parent
52ddccca96
commit
5a58211703
|
@ -104,7 +104,9 @@
|
||||||
[(re-frame/inject-cofx :now)]
|
[(re-frame/inject-cofx :now)]
|
||||||
(fn [{:keys [db now]} [_ {:keys [id message_id args] :as transaction}]]
|
(fn [{:keys [db now]} [_ {:keys [id message_id args] :as transaction}]]
|
||||||
(if (transaction-valid? transaction)
|
(if (transaction-valid? transaction)
|
||||||
(let [{:keys [from to value symbol data gas gasPrice]} args
|
;NOTE(goranjovic): the transactions started from chat using /send command
|
||||||
|
; are only in ether, so this parameter defaults to ETH
|
||||||
|
(let [{:keys [from to value symbol data gas gasPrice] :or {symbol :ETH}} args
|
||||||
;;TODO (andrey) revisit this map later (this map from old transactions, idk if we need all these fields)
|
;;TODO (andrey) revisit this map later (this map from old transactions, idk if we need all these fields)
|
||||||
transaction {:id id
|
transaction {:id id
|
||||||
:from from
|
:from from
|
||||||
|
|
|
@ -14,7 +14,13 @@
|
||||||
(re-frame/reg-sub ::send-transaction
|
(re-frame/reg-sub ::send-transaction
|
||||||
:<- [:wallet]
|
:<- [:wallet]
|
||||||
(fn [wallet]
|
(fn [wallet]
|
||||||
(:send-transaction wallet)))
|
(let [transaction (:send-transaction wallet)]
|
||||||
|
;NOTE(goranjovic): the transactions started from chat using /send command
|
||||||
|
; are only in ether, so this parameter defaults to ETH
|
||||||
|
(if (:symbol transaction)
|
||||||
|
transaction
|
||||||
|
(assoc transaction :symbol :ETH)))))
|
||||||
|
|
||||||
|
|
||||||
(re-frame/reg-sub :wallet.send/symbol
|
(re-frame/reg-sub :wallet.send/symbol
|
||||||
:<- [::send-transaction]
|
:<- [::send-transaction]
|
||||||
|
|
Loading…
Reference in New Issue