mirror of
https://github.com/trezor/trezor-wallet
synced 2025-01-03 21:00:55 +00:00
Fix flow
This commit is contained in:
parent
0999c99432
commit
6c2ae9c1be
@ -7,14 +7,16 @@ import * as NOTIFICATION from 'actions/constants/notification';
|
||||
import * as SIGN_VERIFY from './constants/signVerify';
|
||||
|
||||
export type SignVerifyAction = {
|
||||
type: typeof SIGN_VERIFY.SIGN_SUCCESS,
|
||||
signature: string
|
||||
} | {
|
||||
type: typeof SIGN_VERIFY.SIGN_PROGRESS,
|
||||
isSignProgress: boolean
|
||||
} | {
|
||||
type: typeof SIGN_VERIFY.CLEAR,
|
||||
state: State
|
||||
type: typeof SIGN_VERIFY.SIGN_SUCCESS,
|
||||
signature: string
|
||||
} | {
|
||||
type: typeof SIGN_VERIFY.VERIFY_PROGRESS,
|
||||
isVerifyProgress: boolean
|
||||
} | {
|
||||
type: typeof SIGN_VERIFY.CLEAR
|
||||
}
|
||||
|
||||
export const sign = (
|
||||
|
@ -4,7 +4,6 @@ import styled from 'styled-components';
|
||||
import Input from 'components/inputs/Input';
|
||||
import Textarea from 'components/Textarea';
|
||||
import { validateAddress } from 'utils/ethUtils';
|
||||
import Icon from 'components/Icon';
|
||||
import Title from 'views/Wallet/components/Title';
|
||||
import Button from 'components/Button';
|
||||
import Content from 'views/Wallet/components/Content';
|
||||
@ -70,10 +69,6 @@ class SignVerify extends Component<Props, State> {
|
||||
};
|
||||
}
|
||||
|
||||
getPath() {
|
||||
return this.props.selectedAccount.account.addressPath;
|
||||
}
|
||||
|
||||
getAddress() {
|
||||
let result = null;
|
||||
const { selectedAccount } = this.props;
|
||||
@ -103,6 +98,8 @@ class SignVerify extends Component<Props, State> {
|
||||
}
|
||||
|
||||
render() {
|
||||
if (!this.props.selectedAccount.account) return null;
|
||||
|
||||
const {
|
||||
signVerifyActions,
|
||||
signature,
|
||||
@ -152,7 +149,7 @@ class SignVerify extends Component<Props, State> {
|
||||
>Clear
|
||||
</Button>
|
||||
<StyledButton
|
||||
onClick={() => signVerifyActions.sign(this.getPath(), this.state.signMessage)}
|
||||
onClick={() => signVerifyActions.sign(this.props.selectedAccount.account.addressPath, this.state.signMessage)}
|
||||
>Sign
|
||||
</StyledButton>
|
||||
</RowButtons>
|
||||
|
@ -1,6 +1,5 @@
|
||||
import styled from 'styled-components';
|
||||
import { H2 } from 'components/Heading';
|
||||
import Button from 'components/Button';
|
||||
import Paragraph from 'components/Paragraph';
|
||||
import React from 'react';
|
||||
import { connect } from 'react-redux';
|
||||
|
Loading…
Reference in New Issue
Block a user