diff --git a/src/actions/SignVerifyActions.js b/src/actions/SignVerifyActions.js index f823f807..57228911 100644 --- a/src/actions/SignVerifyActions.js +++ b/src/actions/SignVerifyActions.js @@ -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 = ( diff --git a/src/views/Wallet/views/Account/SignVerify/index.js b/src/views/Wallet/views/Account/SignVerify/index.js index 7dc46401..bea0913d 100644 --- a/src/views/Wallet/views/Account/SignVerify/index.js +++ b/src/views/Wallet/views/Account/SignVerify/index.js @@ -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 { }; } - getPath() { - return this.props.selectedAccount.account.addressPath; - } - getAddress() { let result = null; const { selectedAccount } = this.props; @@ -103,6 +98,8 @@ class SignVerify extends Component { } render() { + if (!this.props.selectedAccount.account) return null; + const { signVerifyActions, signature, @@ -152,7 +149,7 @@ class SignVerify extends Component { >Clear signVerifyActions.sign(this.getPath(), this.state.signMessage)} + onClick={() => signVerifyActions.sign(this.props.selectedAccount.account.addressPath, this.state.signMessage)} >Sign diff --git a/src/views/Wallet/views/Seedless/index.js b/src/views/Wallet/views/Seedless/index.js index 799e2e0f..84030eac 100644 --- a/src/views/Wallet/views/Seedless/index.js +++ b/src/views/Wallet/views/Seedless/index.js @@ -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';