diff --git a/packages/p2p/src/components/payment-method-card/__tests__/payment-method-card.spec.tsx b/packages/p2p/src/components/payment-method-card/__tests__/payment-method-card.spec.tsx index bd0633c0e811..91cf6dc5c212 100644 --- a/packages/p2p/src/components/payment-method-card/__tests__/payment-method-card.spec.tsx +++ b/packages/p2p/src/components/payment-method-card/__tests__/payment-method-card.spec.tsx @@ -29,9 +29,6 @@ const payment_method_card_props = { }; const mock_store: DeepPartial> = { - general_store: { - active_index: 0, - }, my_ads_store: { payment_method_ids: [1], }, diff --git a/packages/p2p/src/components/payment-method-card/payment-method-card.tsx b/packages/p2p/src/components/payment-method-card/payment-method-card.tsx index 35e812cb76a3..4cb786c8e12b 100644 --- a/packages/p2p/src/components/payment-method-card/payment-method-card.tsx +++ b/packages/p2p/src/components/payment-method-card/payment-method-card.tsx @@ -43,8 +43,7 @@ const PaymentMethodCard = ({ small = false, style, }: TPaymentMethodCardProps) => { - const { general_store, my_ads_store, my_profile_store } = useStores(); - const { active_index } = general_store; + const { my_ads_store, my_profile_store } = useStores(); const { payment_method_ids } = my_ads_store; const { showModal } = useModalManagerContext(); @@ -116,7 +115,7 @@ const PaymentMethodCard = ({ size={medium || small ? 16 : 24} /> )} - {is_vertical_ellipsis_visible && ( + {is_vertical_ellipsis_visible ? ( - )} - {(active_index === 2 || active_index === 0) && ( + ) : ( { if (!my_profile_store.advertiser_has_payment_methods) { my_profile_store.getPaymentMethodsList(); + my_profile_store.getAdvertiserPaymentMethods(); } advertiser_page_store.setFormErrorMessage('');