-
Notifications
You must be signed in to change notification settings - Fork 305
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[P2PS] / Ameerul / P2PS-4586 Remove p2p package from deriv-app #17785
base: master
Are you sure you want to change the base?
Changes from all commits
a88e77d
e3ee256
badf5ef
e686b0c
50f46f5
552ee55
23eccf1
2ce67f5
e68bcd9
d80acea
45ea1c0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,5 @@ | ||
import React, { useState } from 'react'; | ||
import { | ||
useCurrentCurrencyConfig, | ||
useHasFiatCurrency, | ||
useHasP2PSupportedCurrencies, | ||
useIsP2PEnabled, | ||
} from '@deriv/hooks'; | ||
import { useCurrentCurrencyConfig, useHasFiatCurrency } from '@deriv/hooks'; | ||
import { observer, useStore } from '@deriv/stores'; | ||
import { localize } from '@deriv/translations'; | ||
import { useHistory } from 'react-router'; | ||
|
@@ -18,13 +13,10 @@ const CashierOnboardingP2PCard: React.FC = observer(() => { | |
const { openRealAccountSignup } = ui; | ||
const { setDepositTarget } = general_store; | ||
const history = useHistory(); | ||
const { data: has_p2p_supported_currencies } = useHasP2PSupportedCurrencies(); | ||
const { is_p2p_enabled } = useIsP2PEnabled(); | ||
const has_fiat_currency = useHasFiatCurrency(); | ||
const currency_config = useCurrentCurrencyConfig(); | ||
const can_switch_to_fiat_account = currency_config?.is_crypto && has_fiat_currency; | ||
const [is_dialog_visible, setIsDialogVisible] = useState(false); | ||
const should_show_p2p_card = is_p2p_enabled || has_p2p_supported_currencies; | ||
|
||
const onClick = () => { | ||
setDepositTarget('/cashier/p2p'); | ||
|
@@ -43,8 +35,6 @@ const CashierOnboardingP2PCard: React.FC = observer(() => { | |
history.push('/cashier/p2p'); | ||
}; | ||
|
||
if (!should_show_p2p_card) return null; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. removed any logic that checks whether or not we should display p2p in the toggle-menu-drawer under cashier or under cashier tabs. This is because we already handle if the user can view p2p or not within the standalone application already. Also we should still show p2p exists, even if the user can't use it, this was an earlier suggestion from jy a long time back, since how will users know certain applications exist within deriv if we never see it |
||
|
||
return ( | ||
<React.Fragment> | ||
<CashierOnboardingCard | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is all related to share my ads edge cases, so this can be removed. here is the figma file: https://www.figma.com/design/4MOUx8arWrBnUJvA3LufAh/branch/bTQkniOz9NeT3fXVFXs1Ns/P2P---My-ads?node-id=21750-322071&node-type=instance&t=g2DYm5qkh9mhZwf7-0