mirror of
https://github.com/trezor/trezor-wallet
synced 2024-12-01 04:38:15 +00:00
Confirm moved to modals
This commit is contained in:
parent
68a8307b49
commit
dd6117b008
21
src/components/modals/confirm/Action/index.js
Normal file
21
src/components/modals/confirm/Action/index.js
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
/* @flow */
|
||||||
|
|
||||||
|
import React from 'react';
|
||||||
|
import styled from 'styled-components';
|
||||||
|
import { H3 } from 'components/Heading';
|
||||||
|
|
||||||
|
const Wrapper = styled.div``;
|
||||||
|
|
||||||
|
const Header = styled.div`
|
||||||
|
padding: 48px;
|
||||||
|
`;
|
||||||
|
|
||||||
|
const ConfirmAction = () => (
|
||||||
|
<Wrapper>
|
||||||
|
<Header>
|
||||||
|
<H3>Confirm Action on your Trezor</H3>
|
||||||
|
</Header>
|
||||||
|
</Wrapper>
|
||||||
|
);
|
||||||
|
|
||||||
|
export default ConfirmAction;
|
@ -7,7 +7,7 @@ import styled from 'styled-components';
|
|||||||
import colors from 'config/colors';
|
import colors from 'config/colors';
|
||||||
import { FONT_SIZE } from 'config/variables';
|
import { FONT_SIZE } from 'config/variables';
|
||||||
|
|
||||||
import H3 from 'components/Heading';
|
import { H3 } from 'components/Heading';
|
||||||
import P from 'components/Paragraph';
|
import P from 'components/Paragraph';
|
||||||
|
|
||||||
import type { Props } from '../../Container';
|
import type { Props } from '../../Container';
|
||||||
|
@ -17,6 +17,7 @@ import InvalidPin from 'components/modals/pin/Invalid';
|
|||||||
import Passphrase from 'components/modals/passphrase/Passphrase';
|
import Passphrase from 'components/modals/passphrase/Passphrase';
|
||||||
import PassphraseType from 'components/modals/passphrase/Type';
|
import PassphraseType from 'components/modals/passphrase/Type';
|
||||||
import ConfirmSignTx from 'components/modals/confirm/SignTx';
|
import ConfirmSignTx from 'components/modals/confirm/SignTx';
|
||||||
|
import ConfirmAction from 'components/modals/confirm/Action';
|
||||||
import ConfirmUnverifiedAddress from 'components/modals/confirm/UnverifiedAddress';
|
import ConfirmUnverifiedAddress from 'components/modals/confirm/UnverifiedAddress';
|
||||||
import ForgetDevice from 'components/modals/device/Forget';
|
import ForgetDevice from 'components/modals/device/Forget';
|
||||||
import RememberDevice from 'components/modals/device/Remember';
|
import RememberDevice from 'components/modals/device/Remember';
|
||||||
@ -90,6 +91,9 @@ const getDeviceContextModal = (props: Props) => {
|
|||||||
case 'ButtonRequest_SignTx':
|
case 'ButtonRequest_SignTx':
|
||||||
return <ConfirmSignTx device={modal.device} sendForm={props.sendForm} />;
|
return <ConfirmSignTx device={modal.device} sendForm={props.sendForm} />;
|
||||||
|
|
||||||
|
case 'ButtonRequest_Other':
|
||||||
|
return <ConfirmAction />;
|
||||||
|
|
||||||
case RECEIVE.REQUEST_UNVERIFIED:
|
case RECEIVE.REQUEST_UNVERIFIED:
|
||||||
return (
|
return (
|
||||||
<ConfirmUnverifiedAddress
|
<ConfirmUnverifiedAddress
|
||||||
|
@ -5,6 +5,7 @@ import * as SIGN_VERIFY from '../actions/constants/signVerify';
|
|||||||
export type State = {
|
export type State = {
|
||||||
signature: string;
|
signature: string;
|
||||||
isSignProgress: boolean;
|
isSignProgress: boolean;
|
||||||
|
isVerifyProgress: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const initialState: State = {
|
export const initialState: State = {
|
||||||
|
@ -11,7 +11,6 @@ import Tooltip from 'components/Tooltip';
|
|||||||
import Input from 'components/inputs/Input';
|
import Input from 'components/inputs/Input';
|
||||||
|
|
||||||
import ICONS from 'config/icons';
|
import ICONS from 'config/icons';
|
||||||
import TrezorConfirm from 'components/trezorActions/Confirm';
|
|
||||||
import colors from 'config/colors';
|
import colors from 'config/colors';
|
||||||
import { CONTEXT_DEVICE } from 'actions/constants/modal';
|
import { CONTEXT_DEVICE } from 'actions/constants/modal';
|
||||||
|
|
||||||
|
@ -144,15 +144,6 @@ class SignVerify extends Component<Props, State> {
|
|||||||
rows={4}
|
rows={4}
|
||||||
maxRows={4}
|
maxRows={4}
|
||||||
maxLength="255"
|
maxLength="255"
|
||||||
trezorAction={this.props.isSignProgress ? (
|
|
||||||
<ActionWrapper>
|
|
||||||
<StyledIcon
|
|
||||||
icon={ICONS.T1}
|
|
||||||
color={colors.WHITE}
|
|
||||||
/>
|
|
||||||
Check address on your Trezor
|
|
||||||
</ActionWrapper>
|
|
||||||
) : null}
|
|
||||||
/>
|
/>
|
||||||
</Row>
|
</Row>
|
||||||
<Row>
|
<Row>
|
||||||
@ -189,15 +180,6 @@ class SignVerify extends Component<Props, State> {
|
|||||||
state={(this.state.verifyAddress && validateAddress(this.state.verifyAddress)) ? 'error' : null}
|
state={(this.state.verifyAddress && validateAddress(this.state.verifyAddress)) ? 'error' : null}
|
||||||
bottomText={this.state.verifyAddress !== '' ? validateAddress(this.state.verifyAddress) : null}
|
bottomText={this.state.verifyAddress !== '' ? validateAddress(this.state.verifyAddress) : null}
|
||||||
isSmallText
|
isSmallText
|
||||||
trezorAction={this.props.isVerifyProgress ? (
|
|
||||||
<ActionWrapper>
|
|
||||||
<StyledIcon
|
|
||||||
icon={ICONS.T1}
|
|
||||||
color={colors.WHITE}
|
|
||||||
/>
|
|
||||||
Check address on your Trezor
|
|
||||||
</ActionWrapper>
|
|
||||||
) : null}
|
|
||||||
/>
|
/>
|
||||||
</Row>
|
</Row>
|
||||||
<Row>
|
<Row>
|
||||||
@ -209,15 +191,6 @@ class SignVerify extends Component<Props, State> {
|
|||||||
rows={4}
|
rows={4}
|
||||||
maxRows={4}
|
maxRows={4}
|
||||||
maxLength="255"
|
maxLength="255"
|
||||||
trezorAction={this.props.isVerifyProgress ? (
|
|
||||||
<ActionWrapper>
|
|
||||||
<StyledIcon
|
|
||||||
icon={ICONS.T1}
|
|
||||||
color={colors.WHITE}
|
|
||||||
/>
|
|
||||||
Check address on your Trezor
|
|
||||||
</ActionWrapper>
|
|
||||||
) : null}
|
|
||||||
/>
|
/>
|
||||||
</Row>
|
</Row>
|
||||||
<Row>
|
<Row>
|
||||||
|
Loading…
Reference in New Issue
Block a user