From fe433222343a5b4042e11ce7b7df8c29a128ef80 Mon Sep 17 00:00:00 2001 From: Victor Creed Date: Fri, 19 Mar 2021 20:17:29 +0200 Subject: [PATCH] allows fastbtc only for whitelisted wallets --- src/app/components/UserAssets/index.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/app/components/UserAssets/index.tsx b/src/app/components/UserAssets/index.tsx index 7e81dec7d..a99c090da 100644 --- a/src/app/components/UserAssets/index.tsx +++ b/src/app/components/UserAssets/index.tsx @@ -28,6 +28,7 @@ import { getTokenContractName } from '../../../utils/blockchain/contract-helpers import { Sovryn } from '../../../utils/sovryn'; import { CSovActions } from '../../containers/WalletPage/components/CSovActions'; import { FastBtcDialog } from '../../containers/FastBtcDialog'; +import { useIsWhitelisted } from '../../hooks/whitelist/useIsWhitelisted'; export function UserAssets() { const { t } = useTranslation(); @@ -104,6 +105,7 @@ function AssetRow({ item, onFastBtc }: AssetProps) { const [tokens, setTokens] = useState('0'); const dollars = useCachedAssetPrice(item.asset, Asset.USDT); const history = useHistory(); + const whitelisted = useIsWhitelisted(); const [dollarValue, setDollarValue] = useState('0'); @@ -177,6 +179,7 @@ function AssetRow({ item, onFastBtc }: AssetProps) { minimal text={t(translations.userAssets.actions.deposit)} className="text-gold button-round" + disabled={!whitelisted} onClick={() => onFastBtc()} /> )}