Skip to content

Commit 40d37cc

Browse files
committed
Fix schema and fix share all addresses button
1 parent 89c44ab commit 40d37cc

File tree

2 files changed

+27
-23
lines changed
  • src/status_im/contexts/communities/actions

2 files changed

+27
-23
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181
[:cat
8282
[:map {:closed true}
8383
[:community-id string?]
84-
[:password string?]
84+
[:password [:maybe [:or string? object?]]]
8585
[:pub-key string?]
8686
[:addresses-to-reveal
8787
[:or [:set string?]

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

Lines changed: 26 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -221,22 +221,22 @@
221221
confirm-changes
222222
(fn []
223223
(if can-edit-addresses?
224-
(rf/dispatch
225-
[:standard-auth/authorize
226-
{:auth-button-label (i18n/label :t/confirm-changes)
227-
:on-auth-success (fn [password]
228-
(rf/dispatch
229-
[:communities/edit-shared-addresses
230-
{:community-id id
231-
:password password
232-
:addresses addresses-to-reveal
233-
:on-success (fn []
234-
(rf/dispatch [:dismiss-modal
235-
:addresses-for-permissions])
236-
(rf/dispatch [:hide-bottom-sheet]))}]))}])
237224
(do
238-
(rf/dispatch [:communities/set-share-all-addresses id flag-share-all-addresses])
239-
(rf/dispatch [:communities/set-addresses-to-reveal id addresses-to-reveal]))))
225+
(rf/dispatch
226+
[:standard-auth/authorize
227+
{:auth-button-label (i18n/label :t/confirm-changes)
228+
:on-auth-success (fn [password]
229+
(rf/dispatch
230+
[:communities/edit-shared-addresses
231+
{:community-id id
232+
:password password
233+
:addresses addresses-to-reveal
234+
:on-success (fn []
235+
(rf/dispatch [:dismiss-modal
236+
:addresses-for-permissions])
237+
(rf/dispatch [:hide-bottom-sheet]))}]))}])
238+
(rf/dispatch [:communities/set-share-all-addresses id flag-share-all-addresses]))
239+
(rf/dispatch [:communities/set-addresses-to-reveal id addresses-to-reveal])) )
240240
pending? (rf/sub [:communities/has-pending-request-to-join? id])
241241
highest-role (rf/sub [:communities/highest-role-for-selection id])
242242
[unmodified-role _] (rn/use-state highest-role)]
@@ -360,13 +360,17 @@
360360
id
361361
color
362362
flag-share-all-addresses]
363-
:header [quo/page-setting
364-
{:checked? flag-share-all-addresses
365-
:customization-color color
366-
:on-change toggle-flag-share-all-addresses
367-
:setting-text (i18n/label
368-
:t/share-all-current-and-future-addresses)
369-
:container-style {:margin-bottom 16}}]
363+
:header [quo/category
364+
{:list-type :settings
365+
:data [{:title
366+
(i18n/label
367+
:t/share-all-current-and-future-addresses)
368+
:action :selector
369+
:action-props
370+
{:on-change toggle-flag-share-all-addresses
371+
:customization-color color
372+
:checked? flag-share-all-addresses}}]
373+
:container-style {:padding-bottom 16 :padding-horizontal 0}}]
370374
:content-container-style {:padding-horizontal 20}
371375
:key-fn :address
372376
:data wallet-accounts}]

0 commit comments

Comments
 (0)