mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-24 13:53:23 +03:00
added encUnlockPin entry in application store
This commit is contained in:
parent
99eb404040
commit
598038d8f6
@ -31,7 +31,8 @@ import {
|
|||||||
SET_COLOR_THEME,
|
SET_COLOR_THEME,
|
||||||
SET_SETTINGS_MIGRATED,
|
SET_SETTINGS_MIGRATED,
|
||||||
HIDE_POSTS_THUMBNAILS,
|
HIDE_POSTS_THUMBNAILS,
|
||||||
SET_TERMS_ACCEPTED
|
SET_TERMS_ACCEPTED,
|
||||||
|
SET_ENC_UNLOCK_PIN
|
||||||
} from '../constants/constants';
|
} from '../constants/constants';
|
||||||
|
|
||||||
export const login = (payload) => ({
|
export const login = (payload) => ({
|
||||||
@ -209,4 +210,9 @@ export const setIsTermsAccepted = (isTermsAccepted:boolean) => ({
|
|||||||
type: SET_TERMS_ACCEPTED
|
type: SET_TERMS_ACCEPTED
|
||||||
})
|
})
|
||||||
|
|
||||||
|
export const setEncryptedUnlockPin = (encryptedUnlockPin:string) => ({
|
||||||
|
payload:encryptedUnlockPin,
|
||||||
|
type: SET_ENC_UNLOCK_PIN
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
@ -36,6 +36,7 @@ export const SET_LAST_APP_VERSION = 'SET_LAST_APP_VERSION';
|
|||||||
export const SET_COLOR_THEME = 'SET_COLOR_THEME';
|
export const SET_COLOR_THEME = 'SET_COLOR_THEME';
|
||||||
export const SET_SETTINGS_MIGRATED = 'SET_SETTINGS_MIGRATED';
|
export const SET_SETTINGS_MIGRATED = 'SET_SETTINGS_MIGRATED';
|
||||||
export const SET_TERMS_ACCEPTED = 'SET_TERMS_ACCEPTED';
|
export const SET_TERMS_ACCEPTED = 'SET_TERMS_ACCEPTED';
|
||||||
|
export const SET_ENC_UNLOCK_PIN = 'SET_ENC_UNLOCK_PIN';
|
||||||
|
|
||||||
// Accounts
|
// Accounts
|
||||||
export const ADD_OTHER_ACCOUNT = 'ADD_OTHER_ACCOUNT';
|
export const ADD_OTHER_ACCOUNT = 'ADD_OTHER_ACCOUNT';
|
||||||
|
@ -30,6 +30,7 @@ import {
|
|||||||
SET_SETTINGS_MIGRATED,
|
SET_SETTINGS_MIGRATED,
|
||||||
HIDE_POSTS_THUMBNAILS,
|
HIDE_POSTS_THUMBNAILS,
|
||||||
SET_TERMS_ACCEPTED,
|
SET_TERMS_ACCEPTED,
|
||||||
|
SET_ENC_UNLOCK_PIN
|
||||||
} from '../constants/constants';
|
} from '../constants/constants';
|
||||||
|
|
||||||
interface State {
|
interface State {
|
||||||
@ -65,6 +66,7 @@ interface State {
|
|||||||
pin: string|null;
|
pin: string|null;
|
||||||
isPinCodeOpen: boolean;
|
isPinCodeOpen: boolean;
|
||||||
isRenderRequired: boolean;
|
isRenderRequired: boolean;
|
||||||
|
encUnlockPin: string;
|
||||||
lastAppVersion:string;
|
lastAppVersion:string;
|
||||||
settingsMigratedV2: boolean;
|
settingsMigratedV2: boolean;
|
||||||
hidePostsThumbnails: boolean;
|
hidePostsThumbnails: boolean;
|
||||||
@ -104,13 +106,14 @@ const initialState:State = {
|
|||||||
pin: null,
|
pin: null,
|
||||||
isPinCodeOpen: false,
|
isPinCodeOpen: false,
|
||||||
isRenderRequired: false,
|
isRenderRequired: false,
|
||||||
|
encUnlockPin: '',
|
||||||
lastAppVersion:'',
|
lastAppVersion:'',
|
||||||
settingsMigratedV2: false,
|
settingsMigratedV2: false,
|
||||||
hidePostsThumbnails: false,
|
hidePostsThumbnails: false,
|
||||||
isTermsAccepted: false,
|
isTermsAccepted: false,
|
||||||
};
|
};
|
||||||
|
|
||||||
export default function (state = initialState, action) {
|
export default function (state = initialState, action):State {
|
||||||
switch (action.type) {
|
switch (action.type) {
|
||||||
case LOGIN:
|
case LOGIN:
|
||||||
return {
|
return {
|
||||||
@ -283,6 +286,12 @@ export default function (state = initialState, action) {
|
|||||||
isTermsAccepted:action.payload
|
isTermsAccepted:action.payload
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case SET_ENC_UNLOCK_PIN:
|
||||||
|
return {
|
||||||
|
...state,
|
||||||
|
encUnlockPin:action.payload
|
||||||
|
}
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return state;
|
return state;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user