Skip to content

Commit fe0c5c2

Browse files
authored
fix Incorrect name and image at Ready to import key pair screen (#22080)
1 parent 8c91fbd commit fe0c5c2

File tree

9 files changed

+37
-28
lines changed

9 files changed

+37
-28
lines changed
149 KB
Loading
278 KB
Loading
-4.06 KB
Binary file not shown.
-6.05 KB
Binary file not shown.

src/quo/foundations/resources.cljs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
{:keycard-logo (js/require "../resources/images/ui2/keycard-logo.png")
55
:keycard-chip-light (js/require "../resources/images/ui2/keycard-chip-light.png")
66
:keycard-chip-dark (js/require "../resources/images/ui2/keycard-chip-dark.png")
7-
:keycard-watermark (js/require "../resources/images/ui2/keycard-watermark.png")
87
:bored-ape (js/require "../resources/images/mock2/bored-ape.png")})
98

109
(def ui-themed

src/status_im/common/resources.cljs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@
1818
:podcasts (js/require "../resources/images/ui2/podcasts.png")
1919
:generate-keys (js/require "../resources/images/ui2/generate-keys.png")
2020
:add-key-to-keycard (js/require "../resources/images/ui2/add-key-to-keycard.png")
21+
:import-key-to-keycard (js/require "../resources/images/ui2/import-key-to-keycard.png")
2122
:ethereum-address (js/require "../resources/images/ui2/ethereum-address.png")
2223
:use-keycard (js/require "../resources/images/ui2/keycard.png")
2324
:use-recovery-phrase (js/require "../resources/images/ui2/recovery-phrase.png")
2425
:check-your-keycard (js/require "../resources/images/ui2/check-your-keycard.png")
2526
:qr-code (js/require "../resources/images/ui2/qr-code.png")
2627
:keycard-logo (js/require "../resources/images/ui2/keycard-logo.png")
27-
:keycard-watermark (js/require "../resources/images/ui2/keycard-watermark.png")
2828
:keycard-buy (js/require "../resources/images/ui2/keycard-buy.png")
2929
:keycard-migration (js/require "../resources/images/ui2/keycard-migration.png")
3030
:keycard-migration-failed (js/require "../resources/images/ui2/keycard-migration-failed.png")

src/status_im/contexts/keycard/create/events.cljs

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
(ns status-im.contexts.keycard.create.events
22
(:require [clojure.string :as string]
3+
[status-im.common.resources :as resources]
4+
[utils.i18n :as i18n]
35
[utils.re-frame :as rf]
46
[utils.security.core :as security]))
57

@@ -49,10 +51,13 @@
4951
security/safe-unmask-data
5052
(string/join " ")
5153
security/mask-data))
52-
:fx [[:dispatch [:keycard/create.create-or-enter-pin]]]}))
54+
:fx [[:dispatch
55+
[:keycard/create.create-or-enter-pin
56+
{:ready-to-add-screen-title (i18n/label :t/ready-add-keypair-keycard)
57+
:ready-to-add-screen-image (resources/get-image :add-key-to-keycard)}]]]}))
5358

5459
(rf/reg-event-fx :keycard/create.create-or-enter-pin
55-
(fn [{:keys [db]}]
60+
(fn [{:keys [db]} [{:keys [ready-to-add-screen-title ready-to-add-screen-image]}]]
5661
(let [{:keys [initialized?]} (get-in db [:keycard :application-info])]
5762
{:fx [[:dispatch [:navigate-back]]
5863
(if initialized?
@@ -66,7 +71,9 @@
6671
{:on-complete (fn [new-pin]
6772
(rf/dispatch [:navigate-back])
6873
(rf/dispatch [:keycard/create.save-pin new-pin])
69-
(rf/dispatch [:open-modal :screen/keycard.create.ready-to-add]))}]])]})))
74+
(rf/dispatch [:open-modal :screen/keycard.create.ready-to-add
75+
{:title ready-to-add-screen-title
76+
:image ready-to-add-screen-image}]))}]])]})))
7077

7178
(rf/reg-event-fx :keycard/create.save-pin
7279
(fn [{:keys [db]} [pin]]
@@ -123,4 +130,7 @@
123130
(if (contains? (:profile/profiles-overview db) key-uid)
124131
{:fx [[:dispatch [:onboarding/multiaccount-already-exists key-uid]]]}
125132
{:db (assoc-in db [:keycard :create :masked-phrase] masked-seed-phrase)
126-
:fx [[:dispatch [:keycard/create.create-or-enter-pin]]]})))
133+
:fx [[:dispatch
134+
[:keycard/create.create-or-enter-pin
135+
{:ready-to-add-screen-title (i18n/label :t/ready-to-import-keypair-keycard)
136+
:ready-to-add-screen-image (resources/get-image :import-key-to-keycard)}]]]})))

src/status_im/contexts/keycard/create/view.cljs

Lines changed: 21 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -48,25 +48,24 @@
4848

4949
(defn ready-to-add
5050
[]
51-
[:<>
52-
[quo/page-nav
53-
{:icon-name :i/close
54-
:on-press events-helper/navigate-back
55-
:right-side [{:icon-name :i/info
56-
:on-press #(rf/dispatch [:show-bottom-sheet
57-
{:content ready-to-add-documentation
58-
:theme :dark
59-
:shell? true}])}]}]
60-
[quo/page-top
61-
{:title (i18n/label :t/ready-add-keypair-keycard)
62-
:description :text
63-
:description-text ""}]
64-
[rn/image
65-
{:resize-mode :contain
66-
:style {:flex 1 :align-self :center :margin-vertical 37}
67-
:source (resources/get-image :add-key-to-keycard)}]
68-
[common.view/tips]
69-
[quo/bottom-actions
70-
{:actions :one-action
71-
:button-one-label (i18n/label :t/scan-keycard)
72-
:button-one-props {:on-press #(rf/dispatch [:keycard/create.start])}}]])
51+
(let [{:keys [title image]} (rf/sub [:get-screen-params])]
52+
[:<>
53+
[quo/page-nav
54+
{:icon-name :i/close
55+
:on-press events-helper/navigate-back
56+
:right-side [{:icon-name :i/info
57+
:on-press #(rf/dispatch [:show-bottom-sheet
58+
{:content ready-to-add-documentation
59+
:theme :dark
60+
:shell? true}])}]}]
61+
[quo/page-top
62+
{:title title}]
63+
[rn/image
64+
{:resize-mode :contain
65+
:style {:flex 1 :align-self :center :margin-vertical 37}
66+
:source image}]
67+
[common.view/tips]
68+
[quo/bottom-actions
69+
{:actions :one-action
70+
:button-one-label (i18n/label :t/scan-keycard)
71+
:button-one-props {:on-press #(rf/dispatch [:keycard/create.start])}}]]))

translations/en.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2134,6 +2134,7 @@
21342134
"ready-add-keypair-keycard-documentation": "When you create a Status profile, the Status app generates cryptographic keys for your profile authentication and authorization.\n\nYour Keycard stores the cryptographic keys for your Status profile, permanently offline and isolated from the internet, and also secures your Wallet accounts.",
21352135
"ready-keycard": "Get your Keycard ready",
21362136
"ready-to-change-pin": "Ready to change PIN",
2137+
"ready-to-import-keypair-keycard": "Ready to import key pair to the Keycard",
21372138
"ready-to-migrate-key-pair": "Ready to migrate profile key pair to the Keycard",
21382139
"ready-to-scan": "Ready to Scan",
21392140
"ready-to-unblock-keycard": "Ready to unblock Keycard",

0 commit comments

Comments
 (0)