mirror of
https://github.com/status-im/status-react.git
synced 2025-02-28 02:20:50 +00:00
bug #4593 - fixed gas update after default gas
This commit is contained in:
parent
cd5542f648
commit
435b2271fd
@ -241,7 +241,9 @@
|
||||
(handlers/register-handler-db
|
||||
:wallet/update-gas-price-success
|
||||
(fn [db [_ price edit?]]
|
||||
(assoc-in db [:wallet (if edit? :edit :send-transaction) :gas-price] price)))
|
||||
(if edit?
|
||||
(assoc-in db [:wallet :edit :gas-price] {:value price :invalid? false})
|
||||
(assoc-in db [:wallet :send-transaction :gas-price] price))))
|
||||
|
||||
(handlers/register-handler-fx
|
||||
:wallet/update-estimated-gas
|
||||
|
@ -353,7 +353,9 @@
|
||||
:wallet.send/reset-gas-default
|
||||
(fn [{:keys [db]}]
|
||||
{:dispatch [:wallet/update-gas-price true]
|
||||
:db (assoc-in db [:wallet :edit :gas] nil)}))
|
||||
:db (assoc-in db [:wallet :edit :gas]
|
||||
{:value (ethereum/estimate-gas (-> db :wallet :send-transaction :symbol))
|
||||
:invalid? false})}))
|
||||
|
||||
(defn update-gas-price [db edit?]
|
||||
{:update-gas-price {:web3 (:web3 db)
|
||||
|
Loading…
x
Reference in New Issue
Block a user