dont display previous state when checking

This commit is contained in:
Andrea Maria Piana 2024-02-16 17:11:09 +00:00
parent fa9b53854b
commit cfaed80066
No known key found for this signature in database
3 changed files with 8 additions and 4 deletions

View File

@ -53,7 +53,7 @@
:style {:color (colors/theme-colors colors/danger-50 colors/danger-60 theme)}} :style {:color (colors/theme-colors colors/danger-50 colors/danger-60 theme)}}
error-message]]) error-message]])
(when (= description :top) (when (and (= description :top) role)
[rn/view [rn/view
{:style style/description-top} {:style style/description-top}
[text/text [text/text

View File

@ -61,7 +61,8 @@
(rf/dispatch [:communities/get-permissioned-balances id]) (rf/dispatch [:communities/get-permissioned-balances id])
(fn [] (fn []
(let [{:keys [name color images]} (rf/sub [:communities/community id]) (let [{:keys [name color images]} (rf/sub [:communities/community id])
{:keys [highest-permission-role]} (rf/sub [:community/token-gated-overview id]) {:keys [checking?
highest-permission-role]} (rf/sub [:community/token-gated-overview id])
accounts (rf/sub [:wallet/accounts-without-watched-accounts]) accounts (rf/sub [:wallet/accounts-without-watched-accounts])
selected-addresses (rf/sub [:communities/selected-permission-addresses id]) selected-addresses (rf/sub [:communities/selected-permission-addresses id])
share-all-addresses? (rf/sub [:communities/share-all-addresses? id]) share-all-addresses? (rf/sub [:communities/share-all-addresses? id])
@ -105,7 +106,8 @@
{:actions :two-actions {:actions :two-actions
:button-one-label (i18n/label :t/confirm-changes) :button-one-label (i18n/label :t/confirm-changes)
:button-one-props {:customization-color color :button-one-props {:customization-color color
:disabled? (or (empty? selected-addresses) :disabled? (or checking?
(empty? selected-addresses)
(not highest-permission-role) (not highest-permission-role)
(not unsaved-address-changes?)) (not unsaved-address-changes?))
:on-press (fn [] :on-press (fn []
@ -123,9 +125,10 @@
(not highest-permission-role)) (not highest-permission-role))
:top-error :top-error
:top) :top)
:role (role-keyword highest-permission-role) :role (when-not checking? (role-keyword highest-permission-role))
:error-message (cond :error-message (cond
(empty? selected-addresses) (i18n/label :t/no-addresses-selected) (empty? selected-addresses) (i18n/label :t/no-addresses-selected)
(not highest-permission-role) (i18n/label (not highest-permission-role) (i18n/label
:t/addresses-dont-contain-tokens-needed) :t/addresses-dont-contain-tokens-needed)
:else nil)}]])))) :else nil)}]]))))

View File

@ -330,6 +330,7 @@
highest-permission-role (:type highest-role) highest-permission-role (:type highest-role)
can-request-access? (and (boolean highest-permission-role) (not networks-not-supported?))] can-request-access? (and (boolean highest-permission-role) (not networks-not-supported?))]
{:can-request-access? can-request-access? {:can-request-access? can-request-access?
:checking? checking?
:highest-permission-role highest-permission-role :highest-permission-role highest-permission-role
:networks-not-supported? networks-not-supported? :networks-not-supported? networks-not-supported?
:no-member-permission? (and highest-permission-role :no-member-permission? (and highest-permission-role