Skip to content

Commit

Permalink
[WALL] Fix issue with cashier blocked message blinking (binary-com#14653
Browse files Browse the repository at this point in the history
)

* fix: issue with cashier blocked blinking

* fix: refactor condition for is cashier blocked
  • Loading branch information
adrienne-deriv committed Apr 19, 2024
1 parent 1ed5caf commit ed0a5a7
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const CashierLocked: React.FC<TCashierLockedProps> = ({ children, module }) => {
const { data: activeWallet } = useActiveWalletAccount();
const { data: authentication } = useAuthentication();
const { data: cashierValidation } = useCashierValidation();
const { data: status } = useAccountStatus();
const { data: status, isFetching: isFetchingAccountStatus } = useAccountStatus();

const currency = activeWallet?.currency || 'USD';
const isVirtual = activeWallet?.is_virtual;
Expand All @@ -36,7 +36,7 @@ const CashierLocked: React.FC<TCashierLockedProps> = ({ children, module }) => {
const noResidence = cashierValidation?.no_residence;

const isSystemMaintenance = cashierValidation?.system_maintenance && !isVirtual;
const isCashierLocked = status?.is_cashier_locked && !isVirtual;
const isCashierLocked = !isFetchingAccountStatus && status?.is_cashier_locked && !isVirtual;
const isDepositLocked = status?.is_deposit_locked && module === 'deposit';
const isWithdrawalLocked = status?.is_withdrawal_locked && module === 'withdrawal';

Expand Down

0 comments on commit ed0a5a7

Please sign in to comment.