File tree 2 files changed +2
-10
lines changed
src/status_im/contexts/communities/actions/addresses_for_permissions 2 files changed +2
-10
lines changed Original file line number Diff line number Diff line change 79
79
; ; incorrect highest permission role.
80
80
{:db (update db :communities/permissions-checks-for-selection dissoc community-id)}
81
81
(let [{:keys [checking?]} (get-in db [:communities/permissions-checks-for-selection community-id])]
82
- (when-not checking?
83
82
{:db (assoc-in db [:communities/permissions-checks-for-selection community-id :checking? ] true )
84
83
:fx [[:json-rpc/call
85
84
[{:method :wakuext_checkPermissionsToJoinCommunity
86
85
:params [{:communityId community-id :addresses addresses}]
87
86
:on-success [:communities/check-permissions-to-join-during-selection-success
88
87
community-id]
89
88
:on-error [:communities/check-permissions-to-join-during-selection-failure
90
- community-id addresses]}]]]}))))
89
+ community-id addresses]}]]]})))
91
90
92
91
; ; This event should be used to check permissions temporarily because it won't
93
92
; ; mutate the state `:communities/permissions-check` (used by many other
Original file line number Diff line number Diff line change 103
103
community-id]
104
104
:on-error [:communities/check-permissions-to-join-during-selection-failure
105
105
community-id addresses]}]]]}
106
- (sut/check-permissions-to-join-for-selection cofx [community-id addresses])))))
107
-
108
- (testing " when there are addresses to check permissions, but currently checking, then skip the check"
109
- (let [addresses [" 0xA" ]
110
- cofx {:db {:communities/permissions-checks-for-selection
111
- {" other-comm-id" {}
112
- community-id {:checking? true }}}}]
113
- (is (nil? (sut/check-permissions-to-join-for-selection cofx [community-id addresses]))))))
106
+ (sut/check-permissions-to-join-for-selection cofx [community-id addresses]))))))
You can’t perform that action at this time.
0 commit comments