mirror of
https://github.com/status-im/status-react.git
synced 2025-01-11 19:44:47 +00:00
bug 4123 - fixed dapp transactions and incorrect amount formatting in transaction fee screen
Signed-off-by: Goran Jovic <goranjovic@gmail.com>
This commit is contained in:
parent
4b7360db17
commit
957c09a55e
@ -210,7 +210,7 @@
|
|||||||
[react/view
|
[react/view
|
||||||
[components/cartouche {:disabled? disabled?}
|
[components/cartouche {:disabled? disabled?}
|
||||||
(i18n/label :t/amount)
|
(i18n/label :t/amount)
|
||||||
[amount-input m]]
|
[amount-input m token]]
|
||||||
(when error
|
(when error
|
||||||
[tooltip/tooltip error])])
|
[tooltip/tooltip error])])
|
||||||
|
|
||||||
|
@ -115,9 +115,11 @@
|
|||||||
|
|
||||||
(defview transaction-fee []
|
(defview transaction-fee []
|
||||||
(letsubs [{:keys [amount symbol] :as transaction} [:wallet.send/transaction]
|
(letsubs [{:keys [amount symbol] :as transaction} [:wallet.send/transaction]
|
||||||
|
network [:get-current-account-network]
|
||||||
edit [:wallet/edit]]
|
edit [:wallet/edit]]
|
||||||
(let [gas (or (:gas edit) (:gas transaction))
|
(let [gas (or (:gas edit) (:gas transaction))
|
||||||
gas-price (or (:gas-price edit) (:gas-price transaction))]
|
gas-price (or (:gas-price edit) (:gas-price transaction))
|
||||||
|
{:keys [decimals]} (tokens/asset-for (ethereum/network->chain-keyword network) symbol)]
|
||||||
[wallet.components/simple-screen {:status-toolbar-type :modal-wallet}
|
[wallet.components/simple-screen {:status-toolbar-type :modal-wallet}
|
||||||
[toolbar true act/close-white
|
[toolbar true act/close-white
|
||||||
(i18n/label :t/wallet-transaction-fee)]
|
(i18n/label :t/wallet-transaction-fee)]
|
||||||
@ -151,7 +153,7 @@
|
|||||||
(i18n/label :t/amount)
|
(i18n/label :t/amount)
|
||||||
[react/view {:accessibility-label :amount-input}
|
[react/view {:accessibility-label :amount-input}
|
||||||
[wallet.components/cartouche-text-content
|
[wallet.components/cartouche-text-content
|
||||||
(str (money/to-fixed (money/wei->ether amount)))
|
(str (money/to-fixed (money/internal->formatted amount symbol decimals)))
|
||||||
(name symbol)]]]
|
(name symbol)]]]
|
||||||
[wallet.components/cartouche {:disabled? true}
|
[wallet.components/cartouche {:disabled? true}
|
||||||
(i18n/label :t/wallet-transaction-total-fee)
|
(i18n/label :t/wallet-transaction-total-fee)
|
||||||
@ -280,7 +282,7 @@
|
|||||||
(i18n/label :t/message)
|
(i18n/label :t/message)
|
||||||
[components/amount-input {:disabled? true
|
[components/amount-input {:disabled? true
|
||||||
:input-options {:multiline true
|
:input-options {:multiline true
|
||||||
:default-value data}}]]]]
|
:default-value data}} nil]]]]
|
||||||
[signing-buttons
|
[signing-buttons
|
||||||
#(re-frame/dispatch [:wallet/discard-transaction-navigate-back])
|
#(re-frame/dispatch [:wallet/discard-transaction-navigate-back])
|
||||||
#(re-frame/dispatch [:wallet/sign-transaction-modal])
|
#(re-frame/dispatch [:wallet/sign-transaction-modal])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user