Skip to content

Commit

Permalink
allows fastbtc only for whitelisted wallets
Browse files Browse the repository at this point in the history
  • Loading branch information
creed-victor committed Mar 19, 2021
1 parent 23c5731 commit fe43322
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/app/components/UserAssets/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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');

Expand Down Expand Up @@ -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()}
/>
)}
Expand Down

1 comment on commit fe43322

@vercel
Copy link

@vercel vercel bot commented on fe43322 Mar 19, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.