|
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]
|
| 10 | + [taoensso.timbre :as log] |
11 | 11 | [utils.i18n :as i18n]
|
12 | 12 | [utils.money :as money]
|
13 |
| - [utils.re-frame :as rf])) |
| 13 | + [utils.re-frame :as rf] |
| 14 | + [utils.security.core :as security])) |
14 | 15 |
|
15 | 16 | (defn- role-keyword
|
16 | 17 | [role]
|
|
249 | 250 | (fn []
|
250 | 251 | (if can-edit-addresses?
|
251 | 252 | (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))}]) |
264 | 267 | (do
|
265 | 268 | (rf/dispatch [:communities/set-share-all-addresses id flag-share-all-addresses])
|
266 | 269 | (rf/dispatch [:communities/set-addresses-to-reveal id addresses-to-reveal]))))]
|
|
0 commit comments