1
0
mirror of https://github.com/trezor/trezor-wallet synced 2024-12-30 19:00:53 +00:00

Added success case for verify

This commit is contained in:
Vladimir Volek 2018-10-20 01:05:19 +02:00
parent 9503d1e415
commit 07f9fc30f9
5 changed files with 7 additions and 16 deletions

View File

@ -70,8 +70,13 @@ export const verify = (
if (response && response.success) {
dispatch({
type: SIGN_VERIFY.VERIFY_SUCCESS,
signature: response.payload.success,
type: NOTIFICATION.ADD,
payload: {
type: 'success',
title: 'Verify success',
message: `${response.payload.signature} was verified`,
cancelable: true,
},
});
} else {
dispatch({

View File

@ -2,5 +2,4 @@
export const SIGN_SUCCESS: 'sign__verify__sign__success' = 'sign__verify__sign__success';
export const SIGN_PROGRESS: 'sign__verify__sign_progress' = 'sign__verify__sign_progress';
export const VERIFY_SUCCESS: 'sign__verify__verify__success' = 'sign__verify__verify__success';
export const CLEAR: 'sign__verify__sign__clear' = 'sign__verify__sign__clear';

View File

@ -29,12 +29,6 @@ export default (state: State = initialState, action: Action): State => {
signature: action.signature,
};
case SIGN_VERIFY.VERIFY_SUCCESS:
return {
...state,
signature: action.signature,
};
case SIGN_VERIFY.CLEAR:
return {
...initialState,

View File

@ -20,7 +20,6 @@ const mapStateToProps: MapStateToProps<State, OwnProps, StateProps> = (state: St
selectedAccount: state.selectedAccount,
signature: state.signVerifyReducer.signature,
isSignProgress: state.signVerifyReducer.isSignProgress,
isVerifySuccess: state.signVerifyReducer.isVerifySuccess,
});
const mapDispatchToProps: MapDispatchToProps<Dispatch, OwnProps, DispatchProps> = (dispatch: Dispatch): DispatchProps => ({

View File

@ -1,7 +1,6 @@
import React, { Component } from 'react';
import styled from 'styled-components';
import Input from 'components/inputs/Input';
import PropTypes from 'prop-types';
import Textarea from 'components/Textarea';
import ICONS from 'config/icons';
import Icon from 'components/Icon';
@ -133,7 +132,6 @@ class SignVerify extends Component {
const {
signVerifyActions,
signature,
isVerifySuccess,
} = this.props;
return (
<Content>
@ -247,8 +245,4 @@ class SignVerify extends Component {
}
}
SignVerify.propTypes = {
isVerifySuccess: PropTypes.bool,
};
export default SignVerify;