mirror of
https://github.com/trezor/trezor-wallet
synced 2025-01-02 12:20:53 +00:00
Added success case for verify
This commit is contained in:
parent
9503d1e415
commit
07f9fc30f9
@ -70,8 +70,13 @@ export const verify = (
|
|||||||
|
|
||||||
if (response && response.success) {
|
if (response && response.success) {
|
||||||
dispatch({
|
dispatch({
|
||||||
type: SIGN_VERIFY.VERIFY_SUCCESS,
|
type: NOTIFICATION.ADD,
|
||||||
signature: response.payload.success,
|
payload: {
|
||||||
|
type: 'success',
|
||||||
|
title: 'Verify success',
|
||||||
|
message: `${response.payload.signature} was verified`,
|
||||||
|
cancelable: true,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
dispatch({
|
dispatch({
|
||||||
|
@ -2,5 +2,4 @@
|
|||||||
|
|
||||||
export const SIGN_SUCCESS: 'sign__verify__sign__success' = 'sign__verify__sign__success';
|
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 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';
|
export const CLEAR: 'sign__verify__sign__clear' = 'sign__verify__sign__clear';
|
@ -29,12 +29,6 @@ export default (state: State = initialState, action: Action): State => {
|
|||||||
signature: action.signature,
|
signature: action.signature,
|
||||||
};
|
};
|
||||||
|
|
||||||
case SIGN_VERIFY.VERIFY_SUCCESS:
|
|
||||||
return {
|
|
||||||
...state,
|
|
||||||
signature: action.signature,
|
|
||||||
};
|
|
||||||
|
|
||||||
case SIGN_VERIFY.CLEAR:
|
case SIGN_VERIFY.CLEAR:
|
||||||
return {
|
return {
|
||||||
...initialState,
|
...initialState,
|
||||||
|
@ -20,7 +20,6 @@ const mapStateToProps: MapStateToProps<State, OwnProps, StateProps> = (state: St
|
|||||||
selectedAccount: state.selectedAccount,
|
selectedAccount: state.selectedAccount,
|
||||||
signature: state.signVerifyReducer.signature,
|
signature: state.signVerifyReducer.signature,
|
||||||
isSignProgress: state.signVerifyReducer.isSignProgress,
|
isSignProgress: state.signVerifyReducer.isSignProgress,
|
||||||
isVerifySuccess: state.signVerifyReducer.isVerifySuccess,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const mapDispatchToProps: MapDispatchToProps<Dispatch, OwnProps, DispatchProps> = (dispatch: Dispatch): DispatchProps => ({
|
const mapDispatchToProps: MapDispatchToProps<Dispatch, OwnProps, DispatchProps> = (dispatch: Dispatch): DispatchProps => ({
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
import styled from 'styled-components';
|
import styled from 'styled-components';
|
||||||
import Input from 'components/inputs/Input';
|
import Input from 'components/inputs/Input';
|
||||||
import PropTypes from 'prop-types';
|
|
||||||
import Textarea from 'components/Textarea';
|
import Textarea from 'components/Textarea';
|
||||||
import ICONS from 'config/icons';
|
import ICONS from 'config/icons';
|
||||||
import Icon from 'components/Icon';
|
import Icon from 'components/Icon';
|
||||||
@ -133,7 +132,6 @@ class SignVerify extends Component {
|
|||||||
const {
|
const {
|
||||||
signVerifyActions,
|
signVerifyActions,
|
||||||
signature,
|
signature,
|
||||||
isVerifySuccess,
|
|
||||||
} = this.props;
|
} = this.props;
|
||||||
return (
|
return (
|
||||||
<Content>
|
<Content>
|
||||||
@ -247,8 +245,4 @@ class SignVerify extends Component {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SignVerify.propTypes = {
|
|
||||||
isVerifySuccess: PropTypes.bool,
|
|
||||||
};
|
|
||||||
|
|
||||||
export default SignVerify;
|
export default SignVerify;
|
Loading…
Reference in New Issue
Block a user