Compare commits

..
Author SHA1 Message Date
Alexander e0accaadfa Fix for overlapping elements on Swap input page (#22207)
* Fix for overlapping elements on Swap input page

* Updates for opaqueness
2025-03-04 13:08:59 +00:00
Alexander f1aaf28365 Updated designs for swap sign transaction screen (#22218) 2025-03-04 13:50:37 +01:00
9 changed files with 16 additions and 20 deletions
@@ -1,6 +1,10 @@
(ns quo.components.banners.alert-banner.style
(:require [quo.foundations.colors :as colors]))
(defn alert-banner-container
[theme]
{:background-color (colors/theme-colors colors/white colors/neutral-95 theme)})
(defn container
[container-style]
(merge
@@ -14,7 +14,8 @@
[{:keys [action? text button-text text-number-of-lines container-style on-button-press]}]
(let [theme (quo.theme/use-theme)]
[rn/view
{:accessibility-label :alert-banner}
{:accessibility-label :alert-banner
:style (style/alert-banner-container theme)}
[linear-gradient/linear-gradient
{:style (style/container container-style)
:start {:x 0 :y 0}
@@ -44,7 +44,7 @@
[network-amount
{:network k
:amount (str amount " " (or token-symbol (get default-token-symbols k)))
:divider? (not= (dec i) (-> networks-to-show keys count))
:divider? (not= (inc i) (-> networks-to-show keys count))
:theme theme}])))
(remove nil?)
(into [rn/view
@@ -56,7 +56,7 @@
(let [theme (quo.theme/use-theme)
address (or (:address account-props) (:address token-props))]
[rn/view
{:style (style/container (seq? networks-to-show) theme)}
{:style (style/container (boolean networks-to-show) theme)}
[rn/view
{:style style/info-container}
(case type
@@ -7,7 +7,6 @@
[react-native.safe-area :as safe-area]
[status-im.common.floating-button-page.view :as floating-button-page]
[status-im.contexts.settings.wallet.saved-addresses.add-address-to-save.style :as style]
[status-im.contexts.wallet.common.utils :as utils]
[status-im.contexts.wallet.common.validation :as validation]
[utils.address :as utils-address]
[utils.debounce :as debounce]
@@ -160,7 +159,7 @@
(fn [clipboard-text]
(when-not (string/blank? clipboard-text)
(-> clipboard-text
utils/on-paste-address-or-ens
utils-address/extract-address-without-chains-info
on-change-text)))))
on-press-continue (rn/use-callback
(fn []
@@ -7,7 +7,6 @@
[reagent.core :as reagent]
[status-im.common.floating-button-page.view :as floating-button-page]
[status-im.contexts.wallet.add-account.add-address-to-watch.style :as style]
[status-im.contexts.wallet.common.utils :as utils]
[status-im.contexts.wallet.common.validation :as validation]
[status-im.subs.wallet.add-account.address-to-watch]
[utils.address :as utils-address]
@@ -43,7 +42,7 @@
paste-on-input #(clipboard/get-string
(fn [clipboard-text]
(-> clipboard-text
utils/on-paste-address-or-ens
utils.address/extract-address-without-chains-info
on-change-text)))]
(rn/use-effect (fn []
(when-not (string/blank? scanned-address)
@@ -4,7 +4,6 @@
[status-im.common.qr-codes.view :as qr-codes]
[status-im.constants :as constants]
[status-im.contexts.wallet.common.utils.networks :as network-utils]
[utils.address]
[utils.money :as money]
[utils.number :as number]
[utils.string]))
@@ -480,11 +479,3 @@
(filter (fn [{:keys [tokens]}]
(some positive-balance-in-any-chain? tokens))
operable-account))))
(defn on-paste-address-or-ens
"Check if the clipboard has any valid address and extract the address without any chain info.
If it does not contain an valid address or it is ENS, return the clipboard text as it is"
[clipboard-text]
(if (utils.address/supported-address? clipboard-text)
(utils.address/extract-address-without-chains-info clipboard-text)
clipboard-text))
@@ -61,7 +61,7 @@
(fn [clipboard]
(when-not (empty? clipboard)
(-> clipboard
utils/on-paste-address-or-ens
utils-address/extract-address-without-chains-info
on-change)))))
:ens-regex constants/regx-ens
:scanned-value (or (when recipient-plain-address? send-address) scanned-address)
@@ -12,11 +12,13 @@
{:padding-top 12
:padding-horizontal 20})
(def details-container
(defn details-container
[theme]
{:flex-direction :row
:justify-content :space-between
:padding-top 7
:padding-horizontal 20})
:padding-horizontal 20
:background-color (colors/theme-colors colors/white colors/neutral-95 theme)})
(def detail-item
{:flex 1
@@ -88,7 +88,7 @@
currency-symbol
max-fee)
error-response (rf/sub [:wallet/swap-error-response])]
[rn/view {:style style/details-container}
[rn/view {:style (style/details-container theme)}
[data-item
(cond-> {:title (i18n/label :t/max-fees)
:subtitle max-fee-formatted