Skip to content

Commit 84c4b2e

Browse files
committed
cleanup
1 parent f08dc8f commit 84c4b2e

File tree

3 files changed

+22
-56
lines changed

3 files changed

+22
-56
lines changed

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

+5-16
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
[quo.core :as quo]
44
[react-native.core :as rn]
55
[react-native.gesture :as gesture]
6-
[status-im.common.password-authentication.view :as password-authentication]
76
[status-im.contexts.communities.actions.accounts-selection.style :as style]
87
[status-im.contexts.communities.actions.addresses-for-permissions.view :as addresses-for-permissions]
98
[status-im.contexts.communities.actions.airdrop-addresses.view :as airdrop-addresses]
@@ -54,22 +53,12 @@
5453
(rf/dispatch
5554
[:standard-auth/authorize
5655
{:on-auth-success (fn [password]
57-
(rf/dispatch [:dispatch
58-
[:communities/request-to-join-with-addresses
59-
{:community-id id
60-
:password password}]]))
61-
:on-auth-fail (fn [err]
62-
(log/info "Biometric authentication failed" err)
6356
(rf/dispatch
64-
[:password-authentication/show
65-
{:content (fn [] [password-authentication/view])
66-
:community-id id}
67-
{:label (i18n/label :t/join-open-community)
68-
:on-press (fn [password]
69-
(rf/dispatch
70-
[:communities/request-to-join-with-addresses
71-
{:community-id id
72-
:password password}]))}]))}])
57+
[:communities/request-to-join-with-addresses
58+
{:community-id id
59+
:password password}]))
60+
:on-auth-fail (fn [err]
61+
(log/info "Biometric authentication failed" err))}])
7362
(navigate-back)))
7463

7564
open-permission-sheet

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

+13-30
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
[react-native.core :as rn]
55
[react-native.gesture :as gesture]
66
[status-im.common.not-implemented :as not-implemented]
7-
[status-im.common.password-authentication.view :as password-authentication]
87
[status-im.contexts.communities.actions.airdrop-addresses.style :as style]
98
[taoensso.timbre :as log]
109
[utils.i18n :as i18n]
@@ -21,36 +20,20 @@
2120
(if can-edit-addresses?
2221
(rf/dispatch
2322
[:standard-auth/authorize
24-
{:on-auth-fail (fn [err]
25-
(log/info "Biometric authentication failed" err)
23+
{:on-auth-success (fn [password]
2624
(rf/dispatch
27-
[:password-authentication/show
28-
{:content (fn [] [password-authentication/view])}
29-
{:label (i18n/label :t/enter-password)
30-
:on-press (fn [password]
31-
(rf/dispatch
32-
[:communities/edit-shared-addresses
33-
{:community-id community-id
34-
:password password
35-
:airdrop-address address
36-
:on-success (fn []
37-
(rf/dispatch
38-
[:dismiss-modal
39-
:address-for-airdrop])
40-
(rf/dispatch
41-
[:hide-bottom-sheet]))}]))}]))
42-
:on-auth-success (fn [password]
43-
(rf/dispatch [:dispatch
44-
[:communities/edit-shared-addresses
45-
{:community-id community-id
46-
:password password
47-
:airdrop-address address
48-
:on-success (fn []
49-
(rf/dispatch
50-
[:dismiss-modal
51-
:address-for-airdrop])
52-
(rf/dispatch
53-
[:hide-bottom-sheet]))}]]))}])
25+
[:communities/edit-shared-addresses
26+
{:community-id community-id
27+
:password password
28+
:airdrop-address address
29+
:on-success (fn []
30+
(rf/dispatch
31+
[:dismiss-modal
32+
:address-for-airdrop])
33+
(rf/dispatch
34+
[:hide-bottom-sheet]))}]))
35+
:on-auth-fail (fn [err]
36+
(log/info "Biometric authentication failed" err))}])
5437
(do
5538
(rf/dispatch [:communities/set-airdrop-address community-id address])
5639
(rf/dispatch [:hide-bottom-sheet])))))]

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

+4-10
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
[quo.theme]
66
[react-native.core :as rn]
77
[react-native.gesture :as gesture]
8-
[status-im.common.password-authentication.view :as password-authentication]
98
[status-im.contexts.communities.actions.community-rules-list.view :as community-rules]
109
[status-im.contexts.communities.actions.request-to-join.style :as style]
1110
[taoensso.timbre :as log]
@@ -17,16 +16,11 @@
1716
(rf/dispatch
1817
[:standard-auth/authorize
1918
{:on-auth-success (fn [password]
20-
(rf/dispatch [:dispatch
21-
[:communities/request-to-join
22-
{:community-id id :password password}]]))
19+
(rf/dispatch
20+
[:communities/request-to-join
21+
{:community-id id :password password}]))
2322
:on-auth-fail (fn [err]
24-
(log/info "Biometric authentication failed" err)
25-
(rf/dispatch [:password-authentication/show
26-
{:content (fn [] [password-authentication/view])}
27-
{:label (i18n/label :t/join-open-community)
28-
:on-press #(rf/dispatch [:communities/request-to-join
29-
{:community-id id :password %}])}]))}])
23+
(log/info "Biometric authentication failed" err))}])
3024

3125
(rf/dispatch [:navigate-back]))
3226

0 commit comments

Comments
 (0)