You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
trezor-wallet/src/reducers/SignVerifyReducer.js

29 lines
624 B

/* @flow */
import type { Action } from 'flowtype';
import * as SIGN_VERIFY from '../actions/constants/signVerify';
export type State = {
signature: string
}
export const initialState: State = {
signature: '',
};
export default (state: State = initialState, action: Action): State => {
switch (action.type) {
case SIGN_VERIFY.SIGN_SUCCESS:
return {
...state,
signature: action.signature,
};
case SIGN_VERIFY.CLEAR:
return {
...initialState,
};
default:
return state;
}
};