Post-review fixes

This commit is contained in:
alwx 2024-06-25 13:41:07 +02:00
parent cb532d5e95
commit f44813fb57
No known key found for this signature in database
GPG Key ID: D9E51F0C88DB4E2A
9 changed files with 41 additions and 41 deletions

View File

@ -1,12 +1,11 @@
(ns status-im.common.raw-data-block.style
(:require [quo.foundations.colors :as colors]))
(defn container
[bottom-margin?]
(def container
{:flex 1
:padding 10
:margin-top 10.5
:margin-bottom (when bottom-margin? 10.5)
:margin-bottom 0
:border-width 1
:border-color colors/neutral-10
:border-radius 16})

View File

@ -4,9 +4,9 @@
[status-im.common.raw-data-block.style :as style]))
(defn view
[{:keys [data bottom-margin?] :or {bottom-margin? true}}]
[data]
[rn/scroll-view
{:style (style/container bottom-margin?)
{:style style/container
:content-container-style style/content}
[quo/text
{:size :paragraph-2

View File

@ -2,9 +2,7 @@
(:require [status-im.common.raw-data-block.view :as raw-data-block]
[utils.re-frame :as rf]))
(defn data-block
(defn view
[]
(let [display-data (rf/sub [:wallet-connect/current-request-display-data])]
[raw-data-block/view
{:data display-data
:bottom-margin? false}]))
[raw-data-block/view display-data]))

View File

@ -12,13 +12,13 @@
(rf/dispatch [:hide-bottom-sheet])
(rf/dispatch [:wallet-connect/respond-current-session password]))
(defn footer
[{:keys [warning-label slide-button-text disabed?]} children]
(defn view
[{:keys [warning-label slide-button-text disabed?]} & children]
(let [{:keys [customization-color]} (rf/sub [:wallet-connect/current-request-account-details])]
[rn/view {:style style/content-container}
[rn/view
{:style style/data-items-container}
children]
(into [rn/view
{:style style/data-items-container}]
children)
[rn/view {:style style/auth-container}
[standard-authentication/slide-button
{:size :size-48

View File

@ -3,7 +3,7 @@
[react-native.core :as rn]
[status-im.contexts.wallet.wallet-connect.modals.common.header.style :as style]))
(defn header
(defn view
[{:keys [label dapp account]}]
[rn/view
{:style style/header-container}

View File

@ -14,6 +14,10 @@
{:flex 1
:padding-horizontal 20})
(def sign-message-content-container
(merge data-content-container
{:margin-bottom 10.5}))
(def data-item
{:flex 1
:background-color :transparent})

View File

@ -27,11 +27,11 @@
:accessibility-label :wallet-connect-sign-message-close}]
[rn/view {:flex 1}
[rn/view {:style style/data-content-container}
[header/header
[header/view
{:label (i18n/label :t/wallet-connect-send-transaction-header)
:dapp dapp
:account account}]
[data-block/data-block]]
[data-block/view]]
(when error-state
[quo/alert-banner
{:action? false
@ -41,7 +41,7 @@
:not-enough-assets
:t/not-enough-assets))}])
[footer/footer
[footer/view
{:warning-label (i18n/label :t/wallet-connect-send-transaction-warning)
:slide-button-text (i18n/label :t/slide-to-send)
:disabled? error-state}

View File

@ -23,13 +23,13 @@
:on-press #(rf/dispatch [:navigate-back])
:accessibility-label :wallet-connect-sign-message-close}]
[rn/view {:flex 1}
[rn/view {:style style/data-content-container}
[header/header
[rn/view {:style style/sign-message-content-container}
[header/view
{:label (i18n/label :t/wallet-connect-sign-message-header)
:dapp dapp
:account account}]
[data-block/data-block]]
[footer/footer
[data-block/view]]
[footer/view
{:warning-label (i18n/label :t/wallet-connect-sign-message-warning)
:slide-button-text (i18n/label :t/slide-to-sign)}
[quo/data-item

View File

@ -27,11 +27,11 @@
:accessibility-label :wallet-connect-sign-message-close}]
[rn/view {:flex 1}
[rn/view {:style style/data-content-container}
[header/header
[header/view
{:label (i18n/label :t/wallet-connect-sign-transaction-header)
:dapp dapp
:account account}]
[data-block/data-block]]
[data-block/view]]
(when error-state
[quo/alert-banner
{:action? false
@ -41,24 +41,23 @@
:not-enough-assets
:t/not-enough-assets))}])
[footer/footer
[footer/view
{:warning-label (i18n/label :t/wallet-connect-sign-transaction-warning)
:slide-button-text (i18n/label :t/slide-to-sign)
:disabled? error-state}
[:<>
[quo/data-item
{:status :default
:card? false
:container-style style/data-item
:title (i18n/label :t/network)
:subtitle-type :network
:network-image (:source network)
:subtitle (:full-name network)}]
[quo/data-item
{:size :small
:status :default
:card? false
:container-style style/data-item
:title (i18n/label :t/max-fees)
:subtitle (or max-fees-fiat-formatted (i18n/label :t/no-fees))}]]]]]))
[quo/data-item
{:status :default
:card? false
:container-style style/data-item
:title (i18n/label :t/network)
:subtitle-type :network
:network-image (:source network)
:subtitle (:full-name network)}]
[quo/data-item
{:size :small
:status :default
:card? false
:container-style style/data-item
:title (i18n/label :t/max-fees)
:subtitle (or max-fees-fiat-formatted (i18n/label :t/no-fees))}]]]]))