From fa5da2af81c29d9e50e215258df7d2cd14baa866 Mon Sep 17 00:00:00 2001 From: Ulises M Date: Tue, 26 Mar 2024 11:41:20 -0600 Subject: [PATCH 1/5] Fix linear-gradient breaking when `customization-color` is unknown --- src/quo/components/gradient/gradient_cover/view.cljs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/quo/components/gradient/gradient_cover/view.cljs b/src/quo/components/gradient/gradient_cover/view.cljs index 2fd86951fd4..5f759b964f6 100644 --- a/src/quo/components/gradient/gradient_cover/view.cljs +++ b/src/quo/components/gradient/gradient_cover/view.cljs @@ -12,9 +12,9 @@ ;; the `:or` destructuring won't work because it's only applied when the ;; `:customization-color` key is non-existent. While deleting an account the key exists ;; and has a `nil` value. - (when customization-color - (let [color-top (colors/resolve-color customization-color 50 20) - color-bottom (colors/resolve-color customization-color 50 0)] + (let [color-top (colors/resolve-color customization-color 50 20) + color-bottom (colors/resolve-color customization-color 50 0)] + (when (and color-top color-bottom) [linear-gradient/linear-gradient {:accessibility-label :gradient-cover :colors [color-top color-bottom] From b3a6b4b72578ff642cad6871bff95e1fc848a24b Mon Sep 17 00:00:00 2001 From: Ulises M Date: Tue, 26 Mar 2024 12:39:39 -0600 Subject: [PATCH 2/5] Fix exception while scanning an address due to non-existing navigation route --- src/status_im/contexts/shell/qr_reader/view.cljs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/status_im/contexts/shell/qr_reader/view.cljs b/src/status_im/contexts/shell/qr_reader/view.cljs index 19a4835d8c8..000994ed3d1 100644 --- a/src/status_im/contexts/shell/qr_reader/view.cljs +++ b/src/status_im/contexts/shell/qr_reader/view.cljs @@ -88,7 +88,7 @@ (load-and-show-profile scanned-text) (eth-address? scanned-text) - (debounce/debounce-and-dispatch [:navigate-to :wallet-accounts scanned-text] 300) + (debounce/debounce-and-dispatch [:navigate-to :wallet.accounts scanned-text] 300) (eip681-address? scanned-text) (do From 91efaa8c8c13cb8044e32b0e48871db2d5db4d17 Mon Sep 17 00:00:00 2001 From: Ulises M Date: Tue, 26 Mar 2024 12:40:21 -0600 Subject: [PATCH 3/5] Small refactor --- .../wallet/account_overview/view.cljs | 24 +++++++++---------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/src/quo/components/wallet/account_overview/view.cljs b/src/quo/components/wallet/account_overview/view.cljs index 466bb062448..e6c74b1100c 100644 --- a/src/quo/components/wallet/account_overview/view.cljs +++ b/src/quo/components/wallet/account_overview/view.cljs @@ -113,19 +113,17 @@ :size :heading-1 :style style/current-value} current-value] - [rn/view - {:style style/row-centered} - [:<> - (when (seq time-frame-string) - [text/text - {:weight :medium - :size :paragraph-2 - :style (style/bottom-time-text (and (not= :custom time-frame) - (seq time-frame-to-string)))} - time-frame-string]) - (when (and (= :custom time-frame) - (seq time-frame-to-string)) - [custom-time-frame time-frame-to-string])] + [rn/view {:style style/row-centered} + (when (seq time-frame-string) + [text/text + {:weight :medium + :size :paragraph-2 + :style (style/bottom-time-text (and (not= :custom time-frame) + (seq time-frame-to-string)))} + time-frame-string]) + (when (and (= :custom time-frame) + (seq time-frame-to-string)) + [custom-time-frame time-frame-to-string]) (when (and (seq percentage-change) (seq currency-change)) [numeric-changes percentage-change currency-change customization-color theme up?])]])])) From f33d3b86daadfe2975922d44327951f639da6e1f Mon Sep 17 00:00:00 2001 From: Ulises M Date: Tue, 26 Mar 2024 12:40:48 -0600 Subject: [PATCH 4/5] Dispatches universal QR code scanner on share address modal --- src/status_im/contexts/wallet/share_address/view.cljs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/status_im/contexts/wallet/share_address/view.cljs b/src/status_im/contexts/wallet/share_address/view.cljs index f15b842715d..9784dc24b04 100644 --- a/src/status_im/contexts/wallet/share_address/view.cljs +++ b/src/status_im/contexts/wallet/share_address/view.cljs @@ -83,7 +83,9 @@ :on-press #(rf/dispatch [:navigate-back]) :background :blur :right-side [{:icon-name :i/scan - :on-press #(js/alert "To be implemented")}] + :on-press (fn [] + (rf/dispatch [:navigate-back]) + (rf/dispatch [:open-modal :shell-qr-reader]))}] :accessibility-label :top-bar}] [quo/page-top {:title title From b68e76d052a25539e881ff17e841b02b3cc67bdc Mon Sep 17 00:00:00 2001 From: Ulises M Date: Wed, 27 Mar 2024 09:26:47 -0600 Subject: [PATCH 5/5] Fix screen keyword --- src/quo/components/wallet/account_overview/view.cljs | 3 +-- src/status_im/contexts/shell/qr_reader/view.cljs | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/quo/components/wallet/account_overview/view.cljs b/src/quo/components/wallet/account_overview/view.cljs index e6c74b1100c..2cbe81493b1 100644 --- a/src/quo/components/wallet/account_overview/view.cljs +++ b/src/quo/components/wallet/account_overview/view.cljs @@ -100,8 +100,7 @@ :or {customization-color :blue}}] (let [time-frame-string (time-string time-frame time-frame-string) up? (= metrics :positive)] - [rn/view - {:style style/account-overview-wrapper} + [rn/view {:style style/account-overview-wrapper} (if (= :loading state) [loading-state (colors/theme-colors colors/neutral-5 colors/neutral-90 theme)] [rn/view diff --git a/src/status_im/contexts/shell/qr_reader/view.cljs b/src/status_im/contexts/shell/qr_reader/view.cljs index 000994ed3d1..fe79efc73bd 100644 --- a/src/status_im/contexts/shell/qr_reader/view.cljs +++ b/src/status_im/contexts/shell/qr_reader/view.cljs @@ -88,7 +88,7 @@ (load-and-show-profile scanned-text) (eth-address? scanned-text) - (debounce/debounce-and-dispatch [:navigate-to :wallet.accounts scanned-text] 300) + (debounce/debounce-and-dispatch [:navigate-to :screen/wallet.accounts scanned-text] 300) (eip681-address? scanned-text) (do