mirror of
https://github.com/trezor/trezor-wallet
synced 2024-12-01 04:38:15 +00:00
Clear for signature
This commit is contained in:
parent
50176ebbdf
commit
954ad18f8e
@ -62,7 +62,6 @@ export const verify = (
|
||||
signature,
|
||||
hex,
|
||||
};
|
||||
console.log('input', input);
|
||||
const response = await TrezorConnect.ethereumVerifyMessage(input);
|
||||
|
||||
if (response && response.success) {
|
||||
@ -90,3 +89,11 @@ export const verify = (
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
export const clear = (): ThunkAction => (dispatch: Dispatch): void => {
|
||||
dispatch({
|
||||
type: SIGN_VERIFY.CLEAR,
|
||||
signature: '',
|
||||
});
|
||||
};
|
@ -2,3 +2,4 @@
|
||||
|
||||
export const SIGN_SUCCESS: 'sign__verify__sign__success' = 'sign__verify__sign__success';
|
||||
export const VERIFY_SUCCESS: 'sign__verify__verify__success' = 'sign__verify__verify__success';
|
||||
export const CLEAR: 'sign__verify__sign__clear' = 'sign__verify__sign__clear';
|
@ -11,7 +11,7 @@ export type State = {
|
||||
}
|
||||
|
||||
export const initialState: State = {
|
||||
signature: null,
|
||||
signature: '',
|
||||
};
|
||||
|
||||
export default (state: State = initialState, action: Action): State => {
|
||||
@ -28,6 +28,11 @@ export default (state: State = initialState, action: Action): State => {
|
||||
signature: action.signature,
|
||||
};
|
||||
|
||||
case SIGN_VERIFY.CLEAR:
|
||||
return {
|
||||
...initialState,
|
||||
};
|
||||
|
||||
default:
|
||||
return state;
|
||||
}
|
||||
|
@ -80,6 +80,7 @@ class SignVerify extends Component {
|
||||
this.setState({
|
||||
signMessage: '',
|
||||
});
|
||||
this.props.signVerifyActions.clear();
|
||||
}
|
||||
|
||||
clearVerify = () => {
|
||||
|
Loading…
Reference in New Issue
Block a user