File tree Expand file tree Collapse file tree 2 files changed +2
-10
lines changed
src/status_im/contexts/communities/actions/addresses_for_permissions Expand file tree Collapse file tree 2 files changed +2
-10
lines changed Original file line number Diff line number Diff line change 7979 ; ; incorrect highest permission role.
8080 {:db (update db :communities/permissions-checks-for-selection dissoc community-id)}
8181 (let [{:keys [checking?]} (get-in db [:communities/permissions-checks-for-selection community-id])]
82- (when-not checking?
8382 {:db (assoc-in db [:communities/permissions-checks-for-selection community-id :checking? ] true )
8483 :fx [[:json-rpc/call
8584 [{:method :wakuext_checkPermissionsToJoinCommunity
8685 :params [{:communityId community-id :addresses addresses}]
8786 :on-success [:communities/check-permissions-to-join-during-selection-success
8887 community-id]
8988 :on-error [:communities/check-permissions-to-join-during-selection-failure
90- community-id addresses]}]]]}))))
89+ community-id addresses]}]]]})))
9190
9291; ; This event should be used to check permissions temporarily because it won't
9392; ; mutate the state `:communities/permissions-check` (used by many other
Original file line number Diff line number Diff line change 103103 community-id]
104104 :on-error [:communities/check-permissions-to-join-during-selection-failure
105105 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