mirror of
https://github.com/trezor/trezor-wallet
synced 2025-01-07 14:50:52 +00:00
Merge pull request #431 from trezor/feature/tezos
add tezos to coins menu
This commit is contained in:
commit
5c1c86a350
BIN
src/components/modals/external/Tezos/images/xtz.png
vendored
Normal file
BIN
src/components/modals/external/Tezos/images/xtz.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 15 KiB |
70
src/components/modals/external/Tezos/index.js
vendored
Normal file
70
src/components/modals/external/Tezos/index.js
vendored
Normal file
@ -0,0 +1,70 @@
|
||||
/* @flow */
|
||||
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import styled from 'styled-components';
|
||||
import colors from 'config/colors';
|
||||
import icons from 'config/icons';
|
||||
import Icon from 'components/Icon';
|
||||
import Link from 'components/Link';
|
||||
import Button from 'components/Button';
|
||||
import { H2 } from 'components/Heading';
|
||||
import P from 'components/Paragraph';
|
||||
import coins from 'constants/coins';
|
||||
|
||||
import TezosImage from './images/xtz.png';
|
||||
import type { Props as BaseProps } from '../../Container';
|
||||
|
||||
type Props = {
|
||||
onCancel: $ElementType<$ElementType<BaseProps, 'modalActions'>, 'onCancel'>;
|
||||
}
|
||||
|
||||
const Wrapper = styled.div`
|
||||
width: 100%;
|
||||
max-width: 620px;
|
||||
padding: 30px 48px;
|
||||
`;
|
||||
|
||||
const StyledButton = styled(Button)`
|
||||
margin-top: 10px;
|
||||
width: 100%;
|
||||
`;
|
||||
|
||||
const StyledLink = styled(Link)`
|
||||
position: absolute;
|
||||
right: 15px;
|
||||
top: 10px;
|
||||
`;
|
||||
|
||||
const Img = styled.img`
|
||||
display: block;
|
||||
max-width: 100px;
|
||||
margin: 0 auto;
|
||||
height: auto;
|
||||
padding-bottom: 20px;
|
||||
`;
|
||||
|
||||
const TezosWallet = (props: Props) => (
|
||||
<Wrapper>
|
||||
<StyledLink onClick={props.onCancel}>
|
||||
<Icon
|
||||
size={24}
|
||||
color={colors.TEXT_SECONDARY}
|
||||
icon={icons.CLOSE}
|
||||
/>
|
||||
</StyledLink>
|
||||
<Img src={TezosImage} />
|
||||
<H2>Tezos wallet</H2>
|
||||
<P isSmaller>You will be redirected to external wallet</P>
|
||||
|
||||
<Link href={coins.find(i => i.id === 'xtz').url}>
|
||||
<StyledButton onClick={props.onCancel}>Go to external wallet</StyledButton>
|
||||
</Link>
|
||||
</Wrapper>
|
||||
);
|
||||
|
||||
TezosWallet.propTypes = {
|
||||
onCancel: PropTypes.func.isRequired,
|
||||
};
|
||||
|
||||
export default TezosWallet;
|
@ -29,6 +29,7 @@ import WalletType from 'components/modals/device/WalletType';
|
||||
import Nem from 'components/modals/external/Nem';
|
||||
import Cardano from 'components/modals/external/Cardano';
|
||||
import Stellar from 'components/modals/external/Stellar';
|
||||
import Tezos from 'components/modals/external/Tezos';
|
||||
|
||||
import QrModal from 'components/modals/QrModal';
|
||||
|
||||
@ -171,6 +172,8 @@ const getExternalContextModal = (props: Props) => {
|
||||
return (<Stellar onCancel={modalActions.onCancel} />);
|
||||
case 'ada':
|
||||
return (<Cardano onCancel={modalActions.onCancel} />);
|
||||
case 'xtz':
|
||||
return (<Tezos onCancel={modalActions.onCancel} />);
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
|
@ -67,4 +67,10 @@ export default [
|
||||
url: 'https://adalite.io/app',
|
||||
external: true,
|
||||
},
|
||||
{
|
||||
id: 'xtz',
|
||||
coinName: 'Tezos',
|
||||
url: 'https://wallet.simplestaking.com/tezos/wallet/start',
|
||||
external: true,
|
||||
},
|
||||
];
|
BIN
src/images/coins/xtz.png
Normal file
BIN
src/images/coins/xtz.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.2 KiB |
Loading…
Reference in New Issue
Block a user