[#12837] Cannot remove value from the 'Custom nonce' field
Signed-off-by: andrey <motor4ik@gmail.com>
This commit is contained in:
parent
8b055cd3c3
commit
ae26024890
|
@ -7,7 +7,8 @@
|
||||||
[status-im.utils.money :as money]
|
[status-im.utils.money :as money]
|
||||||
[status-im.signing.eip1559 :as eip1559]
|
[status-im.signing.eip1559 :as eip1559]
|
||||||
[taoensso.timbre :as log]
|
[taoensso.timbre :as log]
|
||||||
[status-im.popover.core :as popover]))
|
[status-im.popover.core :as popover]
|
||||||
|
[clojure.string :as string]))
|
||||||
|
|
||||||
(def min-gas-price-wei ^js (money/bignumber 1))
|
(def min-gas-price-wei ^js (money/bignumber 1))
|
||||||
|
|
||||||
|
@ -211,9 +212,7 @@
|
||||||
[{db :db} price]
|
[{db :db} price]
|
||||||
(if (eip1559/sync-enabled?)
|
(if (eip1559/sync-enabled?)
|
||||||
(let [{:keys [normal-base-fee max-priority-fee]} price
|
(let [{:keys [normal-base-fee max-priority-fee]} price
|
||||||
max-priority-fee-bn (money/with-precision
|
max-priority-fee-bn (money/with-precision (get-suggested-tip max-priority-fee) 0)]
|
||||||
(get-suggested-tip max-priority-fee)
|
|
||||||
0)]
|
|
||||||
{:db (-> db
|
{:db (-> db
|
||||||
(assoc-in [:signing/tx :maxFeePerGas]
|
(assoc-in [:signing/tx :maxFeePerGas]
|
||||||
(money/to-hex (money/add max-priority-fee-bn
|
(money/to-hex (money/add max-priority-fee-bn
|
||||||
|
@ -279,7 +278,7 @@
|
||||||
{:events [:signing.nonce/submit]}
|
{:events [:signing.nonce/submit]}
|
||||||
[{db :db :as cofx} nonce]
|
[{db :db :as cofx} nonce]
|
||||||
(fx/merge cofx
|
(fx/merge cofx
|
||||||
{:db (assoc-in db [:signing/tx :nonce] nonce)}
|
{:db (assoc-in db [:signing/tx :nonce] (if (string/blank? nonce) nil nonce))}
|
||||||
(bottom-sheet/hide-bottom-sheet)))
|
(bottom-sheet/hide-bottom-sheet)))
|
||||||
|
|
||||||
(re-frame/reg-fx
|
(re-frame/reg-fx
|
||||||
|
|
|
@ -399,6 +399,5 @@
|
||||||
{:type :primary
|
{:type :primary
|
||||||
:accessibility-label :save-nonce
|
:accessibility-label :save-nonce
|
||||||
:theme :accent
|
:theme :accent
|
||||||
:disabled (clojure.string/blank? @nonce)
|
|
||||||
:on-press #(re-frame/dispatch [:signing.nonce/submit @nonce])}
|
:on-press #(re-frame/dispatch [:signing.nonce/submit @nonce])}
|
||||||
(i18n/label :t/save)]]])))
|
(i18n/label :t/save)]]])))
|
||||||
|
|
|
@ -439,9 +439,7 @@
|
||||||
(let [{:keys [slow-base-fee normal-base-fee fast-base-fee
|
(let [{:keys [slow-base-fee normal-base-fee fast-base-fee
|
||||||
current-base-fee max-priority-fee]}
|
current-base-fee max-priority-fee]}
|
||||||
price
|
price
|
||||||
max-priority-fee-bn (money/with-precision
|
max-priority-fee-bn (money/with-precision (signing.gas/get-suggested-tip max-priority-fee) 0)
|
||||||
(signing.gas/get-suggested-tip max-priority-fee)
|
|
||||||
0)
|
|
||||||
fee-cap (-> normal-base-fee
|
fee-cap (-> normal-base-fee
|
||||||
money/bignumber
|
money/bignumber
|
||||||
(money/add max-priority-fee-bn)
|
(money/add max-priority-fee-bn)
|
||||||
|
|
Loading…
Reference in New Issue