|
4 | 4 | [quo.core :as quo]
|
5 | 5 | [react-native.core :as rn]
|
6 | 6 | [react-native.gesture :as gesture]
|
7 |
| - [status-im.common.password-authentication.view :as password-authentication] |
8 | 7 | [status-im.constants :as constants]
|
9 | 8 | [status-im.contexts.communities.actions.addresses-for-permissions.style :as style]
|
10 | 9 | [status-im.contexts.communities.actions.permissions-sheet.view :as permissions-sheet]
|
|
222 | 221 | confirm-changes
|
223 | 222 | (fn []
|
224 | 223 | (if can-edit-addresses?
|
225 |
| - (rf/dispatch |
226 |
| - [:password-authentication/show |
227 |
| - {:content (fn [] [password-authentication/view])} |
228 |
| - {:label (i18n/label :t/enter-password) |
229 |
| - :on-press (fn [password] |
230 |
| - (rf/dispatch |
231 |
| - [:communities/edit-shared-addresses |
232 |
| - {:community-id id |
233 |
| - :password password |
234 |
| - :addresses addresses-to-reveal |
235 |
| - :on-success (fn [] |
236 |
| - (rf/dispatch [:dismiss-modal :addresses-for-permissions]) |
237 |
| - (rf/dispatch [:hide-bottom-sheet]))}]))}]) |
238 | 224 | (do
|
239 |
| - (rf/dispatch [:communities/set-share-all-addresses id flag-share-all-addresses]) |
240 |
| - (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]))) |
241 | 240 | pending? (rf/sub [:communities/has-pending-request-to-join? id])
|
242 | 241 | highest-role (rf/sub [:communities/highest-role-for-selection id])
|
243 | 242 | [unmodified-role _] (rn/use-state highest-role)]
|
|
0 commit comments