Skip to content

Commit

Permalink
feat: provide testnet wallet warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
kyranjamie committed Jan 5, 2021
1 parent 17518bf commit cd4866d
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 1 deletion.
29 changes: 29 additions & 0 deletions app/components/testnet/exchange-withdrawal-warning.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import React, { FC } from 'react';
import { ExclamationMarkCircleIcon, Flex, Text, FlexProps } from '@blockstack/ui';

export const ExchangeWithdrawalWarning: FC<FlexProps> = props => {
return (
<Flex
backgroundColor="#FCEBEC"
width="100%"
borderRadius="6px"
padding="base"
mt="tight"
pr="base-loose"
{...props}
>
<ExclamationMarkCircleIcon
color="#CF0000"
width="16px"
height="16px"
minWidth="16px"
mr="tight"
mt="1px"
/>
<Text textStyle="body.small">
<strong>DO NOT withdraw</strong> from cryptocurrency exchanges, such as Binance, to this
wallet. <br /> This wallet is for <strong>testnet STX only</strong>.
</Text>
</Flex>
);
};
5 changes: 4 additions & 1 deletion app/modals/receive-stx/receive-stx-modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ import { useHotkeys } from 'react-hotkeys-hook';
import Qr from 'qrcode.react';
import { Text, Modal, Button, Flex, Box, useClipboard } from '@blockstack/ui';

import { TxModalHeader, TxModalFooter } from '../transaction/transaction-modal-layout';
import { NETWORK } from '@constants/index';
import { homeActions } from '@store/home/home.reducer';
import { TxModalHeader, TxModalFooter } from '../transaction/transaction-modal-layout';
import { ExchangeWithdrawalWarning } from '@components/testnet/exchange-withdrawal-warning';

interface ReceiveStxModalProps {
address: string;
Expand Down Expand Up @@ -36,6 +38,7 @@ export const ReceiveStxModal: FC<ReceiveStxModalProps> = ({ address }) => {
<Text textStyle="body.large.medium" mt="loose">
Wallet address
</Text>
{NETWORK === 'testnet' && <ExchangeWithdrawalWarning />}
<Flex
mt="base-tight"
justifyContent="center"
Expand Down

0 comments on commit cd4866d

Please sign in to comment.