|
|
|
@ -1,9 +1,11 @@
|
|
|
|
|
/* @flow */
|
|
|
|
|
'use strict';
|
|
|
|
|
|
|
|
|
|
import { UI } from 'trezor-connect';
|
|
|
|
|
import * as RECEIVE from '../actions/constants/receive';
|
|
|
|
|
import type { Action } from '~/flowtype';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export type State = {
|
|
|
|
|
addressVerified: boolean;
|
|
|
|
|
addressUnverified: boolean;
|
|
|
|
@ -30,6 +32,9 @@ export default (state: State = initialState, action: Action): State => {
|
|
|
|
|
addressVerified: true,
|
|
|
|
|
addressUnverified: false
|
|
|
|
|
}
|
|
|
|
|
case RECEIVE.HIDE_ADDRESS :
|
|
|
|
|
return initialState;
|
|
|
|
|
|
|
|
|
|
case RECEIVE.SHOW_UNVERIFIED_ADDRESS :
|
|
|
|
|
return {
|
|
|
|
|
...state,
|
|
|
|
@ -37,6 +42,15 @@ export default (state: State = initialState, action: Action): State => {
|
|
|
|
|
addressUnverified: true
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
case UI.REQUEST_BUTTON :
|
|
|
|
|
if (action.payload.code === 'ButtonRequest_Address') {
|
|
|
|
|
return {
|
|
|
|
|
...state,
|
|
|
|
|
addressVerified: true,
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return state;
|
|
|
|
|
|
|
|
|
|
default:
|
|
|
|
|
return state;
|
|
|
|
|
}
|
|
|
|
|