Skip to content

Commit 431265d

Browse files
committed
clean
1 parent 6049a7d commit 431265d

File tree

4 files changed

+47
-41
lines changed

4 files changed

+47
-41
lines changed

src/status_im/contexts/communities/actions/accounts_selection/view.cljs

+8-7
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,14 @@
5353
(fn []
5454
(rf/dispatch
5555
[:standard-auth/authorize
56-
{:on-auth-success (fn [password]
57-
(rf/dispatch
58-
[:communities/request-to-join-with-addresses
59-
{:community-id id
60-
:password (security/safe-unmask-data password)}]))
61-
:on-auth-fail (fn [err]
62-
(log/info "Biometric authentication failed" err))}])
56+
{:auth-button-label (i18n/label :t/confirm-changes)
57+
:on-auth-success (fn [password]
58+
(rf/dispatch
59+
[:communities/request-to-join-with-addresses
60+
{:community-id id
61+
:password (security/safe-unmask-data password)}]))
62+
:on-auth-fail (fn [err]
63+
(log/info "Biometric authentication failed" err))}])
6364
(navigate-back)))
6465

6566
open-permission-sheet

src/status_im/contexts/communities/actions/addresses_for_permissions/view.cljs

+17-14
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,14 @@
44
[quo.core :as quo]
55
[react-native.core :as rn]
66
[react-native.gesture :as gesture]
7-
[status-im.common.password-authentication.view :as password-authentication]
87
[status-im.constants :as constants]
98
[status-im.contexts.communities.actions.addresses-for-permissions.style :as style]
109
[status-im.contexts.communities.actions.permissions-sheet.view :as permissions-sheet]
10+
[taoensso.timbre :as log]
1111
[utils.i18n :as i18n]
1212
[utils.money :as money]
13-
[utils.re-frame :as rf]))
13+
[utils.re-frame :as rf]
14+
[utils.security.core :as security]))
1415

1516
(defn- role-keyword
1617
[role]
@@ -249,18 +250,20 @@
249250
(fn []
250251
(if can-edit-addresses?
251252
(rf/dispatch
252-
[:password-authentication/show
253-
{:content (fn [] [password-authentication/view])}
254-
{:label (i18n/label :t/enter-password)
255-
:on-press (fn [password]
256-
(rf/dispatch
257-
[:communities/edit-shared-addresses
258-
{:community-id id
259-
:password password
260-
:addresses addresses-to-reveal
261-
:on-success (fn []
262-
(rf/dispatch [:dismiss-modal :addresses-for-permissions])
263-
(rf/dispatch [:hide-bottom-sheet]))}]))}])
253+
[:standard-auth/authorize
254+
{:auth-button-label (i18n/label :t/confirm-changes)
255+
:on-auth-success (fn [password]
256+
(rf/dispatch
257+
[:communities/edit-shared-addresses
258+
{:community-id id
259+
:password (security/safe-unmask-data password)
260+
:addresses addresses-to-reveal
261+
:on-success (fn []
262+
(rf/dispatch [:dismiss-modal
263+
:addresses-for-permissions])
264+
(rf/dispatch [:hide-bottom-sheet]))}]))
265+
:on-auth-fail (fn [err]
266+
(log/info "Biometric authentication failed" err))}])
264267
(do
265268
(rf/dispatch [:communities/set-share-all-addresses id flag-share-all-addresses])
266269
(rf/dispatch [:communities/set-addresses-to-reveal id addresses-to-reveal]))))]

src/status_im/contexts/communities/actions/airdrop_addresses/view.cljs

+15-14
Original file line numberDiff line numberDiff line change
@@ -21,20 +21,21 @@
2121
(if can-edit-addresses?
2222
(rf/dispatch
2323
[:standard-auth/authorize
24-
{:on-auth-success (fn [password]
25-
(rf/dispatch
26-
[:communities/edit-shared-addresses
27-
{:community-id community-id
28-
:password (security/safe-unmask-data password)
29-
:airdrop-address address
30-
:on-success (fn []
31-
(rf/dispatch
32-
[:dismiss-modal
33-
:address-for-airdrop])
34-
(rf/dispatch
35-
[:hide-bottom-sheet]))}]))
36-
:on-auth-fail (fn [err]
37-
(log/info "Biometric authentication failed" err))}])
24+
{:auth-button-label (i18n/label :t/confirm-changes)
25+
:on-auth-success (fn [password]
26+
(rf/dispatch
27+
[:communities/edit-shared-addresses
28+
{:community-id community-id
29+
:password (security/safe-unmask-data password)
30+
:airdrop-address address
31+
:on-success (fn []
32+
(rf/dispatch
33+
[:dismiss-modal
34+
:address-for-airdrop])
35+
(rf/dispatch
36+
[:hide-bottom-sheet]))}]))
37+
:on-auth-fail (fn [err]
38+
(log/info "Biometric authentication failed" err))}])
3839
(do
3940
(rf/dispatch [:communities/set-airdrop-address community-id address])
4041
(rf/dispatch [:hide-bottom-sheet])))))]

src/status_im/contexts/communities/actions/request_to_join/view.cljs

+7-6
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,13 @@
1616
[id]
1717
(rf/dispatch
1818
[:standard-auth/authorize
19-
{:on-auth-success (fn [password]
20-
(rf/dispatch
21-
[:communities/request-to-join
22-
{:community-id id :password (security/safe-unmask-data password)}]))
23-
:on-auth-fail (fn [err]
24-
(log/info "Biometric authentication failed" err))}])
19+
{:auth-button-label (i18n/label :t/confirm-changes)
20+
:on-auth-success (fn [password]
21+
(rf/dispatch
22+
[:communities/request-to-join
23+
{:community-id id :password (security/safe-unmask-data password)}]))
24+
:on-auth-fail (fn [err]
25+
(log/info "Biometric authentication failed" err))}])
2526

2627
(rf/dispatch [:navigate-back]))
2728

0 commit comments

Comments
 (0)