Skip to content

Commit ae6293d

Browse files
Ameerul /PRODQA 1240 Cashier is blank when client is in P2P cashier and switching from Fiat to Crypto (#9544)
* chore: fixed switching account issue from p2p tab * chore: changed if else statement
1 parent 7c36cd5 commit ae6293d

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

packages/cashier/src/containers/cashier/cashier.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,10 +108,13 @@ const Cashier = observer(({ history, location, routes: routes_config }: TCashier
108108
}, [history, is_payment_agent_transfer_visible, is_payment_agent_transfer_visible_is_success]);
109109

110110
React.useEffect(() => {
111-
if (is_p2p_enabled_success && !is_p2p_enabled && history.location.pathname === routes.cashier_p2p) {
111+
if (
112+
(is_p2p_enabled_success && !is_p2p_enabled && history.location.pathname === routes.cashier_p2p) ||
113+
(tab_index === 0 && !is_p2p_enabled)
114+
) {
112115
history.push(routes.cashier_deposit);
113116
}
114-
}, [history, is_p2p_enabled, is_p2p_enabled_success]);
117+
}, [history, is_p2p_enabled, is_p2p_enabled_success, tab_index]);
115118

116119
const onClickClose = () => history.push(routes.traders_hub);
117120
const getMenuOptions = () => {

0 commit comments

Comments
 (0)