Commit 7fad8041 by Giang Tran

fix bug go back

parent 3d7507a0
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
2DCD954D1E0B4F2C00145EB5 /* InvestTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* InvestTests.m */; }; 2DCD954D1E0B4F2C00145EB5 /* InvestTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* InvestTests.m */; };
2FCC6749524E697FC9323F22 /* libPods-Invest-InvestTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = ABCEBFE5646F1EF68E7C87AB /* libPods-Invest-InvestTests.a */; }; 2FCC6749524E697FC9323F22 /* libPods-Invest-InvestTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = ABCEBFE5646F1EF68E7C87AB /* libPods-Invest-InvestTests.a */; };
48E6A9A75AE9C55476F21D2D /* libPods-Invest-tvOSTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4ECD31835B4784D2DC719E76 /* libPods-Invest-tvOSTests.a */; }; 48E6A9A75AE9C55476F21D2D /* libPods-Invest-tvOSTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4ECD31835B4784D2DC719E76 /* libPods-Invest-tvOSTests.a */; };
52B7A0A425F722CF00CEDA09 /* BuildFile in Resources */ = {isa = PBXBuildFile; }; 52B7A0A425F722CF00CEDA09 /* (null) in Resources */ = {isa = PBXBuildFile; };
52F3AE2D26257DEC00F77114 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 52F3AE2C26257DEB00F77114 /* GoogleService-Info.plist */; }; 52F3AE2D26257DEC00F77114 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 52F3AE2C26257DEB00F77114 /* GoogleService-Info.plist */; };
52FB2B09262400D400DD7983 /* BootSplash.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 52FB2B08262400D400DD7983 /* BootSplash.storyboard */; }; 52FB2B09262400D400DD7983 /* BootSplash.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 52FB2B08262400D400DD7983 /* BootSplash.storyboard */; };
52FB2B0A262400D400DD7983 /* BootSplash.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 52FB2B08262400D400DD7983 /* BootSplash.storyboard */; }; 52FB2B0A262400D400DD7983 /* BootSplash.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 52FB2B08262400D400DD7983 /* BootSplash.storyboard */; };
...@@ -406,7 +406,7 @@ ...@@ -406,7 +406,7 @@
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */, 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */,
13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */, 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */,
52F3AE2D26257DEC00F77114 /* GoogleService-Info.plist in Resources */, 52F3AE2D26257DEC00F77114 /* GoogleService-Info.plist in Resources */,
52B7A0A425F722CF00CEDA09 /* BuildFile in Resources */, 52B7A0A425F722CF00CEDA09 /* (null) in Resources */,
52FB2B09262400D400DD7983 /* BootSplash.storyboard in Resources */, 52FB2B09262400D400DD7983 /* BootSplash.storyboard in Resources */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
...@@ -912,7 +912,7 @@ ...@@ -912,7 +912,7 @@
); );
INFOPLIST_FILE = Invest/Info.plist; INFOPLIST_FILE = Invest/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 2.1; MARKETING_VERSION = 2.0;
OTHER_LDFLAGS = ( OTHER_LDFLAGS = (
"$(inherited)", "$(inherited)",
"-ObjC", "-ObjC",
...@@ -941,7 +941,7 @@ ...@@ -941,7 +941,7 @@
DEVELOPMENT_TEAM = MXZ24GRH48; DEVELOPMENT_TEAM = MXZ24GRH48;
INFOPLIST_FILE = Invest/Info.plist; INFOPLIST_FILE = Invest/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 2.1; MARKETING_VERSION = 2.0;
OTHER_LDFLAGS = ( OTHER_LDFLAGS = (
"$(inherited)", "$(inherited)",
"-ObjC", "-ObjC",
......
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
"async": "^3.2.0", "async": "^3.2.0",
"axios": "^0.21.1", "axios": "^0.21.1",
"dateformat": "^4.5.1", "dateformat": "^4.5.1",
"jsencrypt": "^3.2.0",
"lodash": "^4.17.20", "lodash": "^4.17.20",
"moment": "^2.29.1", "moment": "^2.29.1",
"react": "16.11.0", "react": "16.11.0",
......
...@@ -15,6 +15,24 @@ import AsyncStorage from '@react-native-community/async-storage'; ...@@ -15,6 +15,24 @@ import AsyncStorage from '@react-native-community/async-storage';
import {DETAILNEW, TABNAVIGATOR, AUTHEN} from '../routers/ScreenNames'; import {DETAILNEW, TABNAVIGATOR, AUTHEN} from '../routers/ScreenNames';
import R from '../assets/R'; import R from '../assets/R';
import {isTablet} from 'react-native-device-info'; import {isTablet} from 'react-native-device-info';
import {RSA_KEY, MY_RSA_KEY} from './constants';
import JSEncrypt from 'jsencrypt';
export const encryptRSAString = (val) => {
var encrypt = new JSEncrypt();
encrypt.setPublicKey(MY_RSA_KEY.publicKey);
var encrypted = encrypt.encrypt(val);
console.log('Ma hoa', encrypted);
return encrypted;
};
export const decryptRSAString = (val) => {
var decrypt = new JSEncrypt();
decrypt.setPrivateKey(RSA_KEY.privateKey);
var uncrypted = decrypt.decrypt(val);
console.log('giai hoa', uncrypted);
return uncrypted;
};
export const logout = (navigation) => { export const logout = (navigation) => {
AsyncStorage.clear(); AsyncStorage.clear();
......
...@@ -10,4 +10,81 @@ export const RadioBuySaleEN = [ ...@@ -10,4 +10,81 @@ export const RadioBuySaleEN = [
export const OTP_TYPE = { export const OTP_TYPE = {
CUSTOMER_REQUEST_DEPOSIT: 'CUSTOMER_REQUEST_DEPOSIT', CUSTOMER_REQUEST_DEPOSIT: 'CUSTOMER_REQUEST_DEPOSIT',
REQUEST_WITHDRAW: 'REQUEST_WITHDRAW', REQUEST_WITHDRAW: 'REQUEST_WITHDRAW',
} };
export const RSA_KEY = {
privateKey: `-----BEGIN RSA PRIVATE KEY-----
MIIEpQIBAAKCAQEAriPaOfp9zSDIsde2OJPU3GKlV2EXqhEGxnmO6NHnz3SCJiTA
cTMIbckGKYsmsPoZyAmdP4irA+zMUA16vixXc1+R4whR1qVcXRQ2ZL/QOAtlgBUu
9rF3/+dexv3PW/2Di1uBdGn7khj3Mrs1PKWY9FEtb+NdgTF61RKWnhE6ktoKgukI
1XN5Xvt+5QqwOpPnDcByWyrw7J5N8Jc9bsP+GC7SzURE00nuw1uazrBvVpgcgyiA
yHj3SFJIF89MZYuulJxi9GYjv6ov3kcW5o14kNPExNEgPtlTVyoe1qub/xknSm12
GOTd5V8yvjgJ8ipjHxC7CvEEhG7AT5sJ/3pOywIDAQABAoIBAQCFQT4u+7XkkF/D
Z1Qzezx54KqxcMTRCPJsUny/QFDo+TjWw2zXsruSdy/V/nt/FgNAhcrk4UosWLoH
0CjK+dd5m/phBu7JGATT3TG6auWE3YOwPYWQlUFEe+KU14gj1p0guMcZNDikFaKk
GYmlfPrMiooAgrX8tMZP4keLcZem4xvclhOF49NOaQgbeydBGf33vFUN86qMG5V8
dUy80HkZ55TNXvY6GWpfKw7nOT7LjY1dNSGykNyMVoiLIQ7rMupzXVsu40Y6jajK
7S/pWZnDLPhMMepakFVzgy/D0ixwfrfRQN1PMFAS84r1n8CpA0rjm9xLyc7sLpEp
PEGbY9GxAoGBANUlhfK2e+kpoE40q3F1o2dwAglC+ombj8+VhJc7jnf8YLYcp4mG
+8RSqLueobR4UnFInkFRuN8VklkMISMHD+YuUhamzBkGnllA6THsgafqWOi1vO1A
9sm/UhHPnONm7tp5Ogxh3LZHSLStl8Ca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OnQt
1uF/A5ZNV3IHgwa/Y4jxF+KHcvlvAyyOiDTVZAqn2/+JC+3z219OZCNet+VTmozz
AgMBAAE=
-----END PUBLIC KEY-----
\ No newline at end of file
import React, {useEffect, useRef} from 'react'; import React, {useEffect, useRef} from 'react';
import {View} from 'react-native'; import {Alert, View} from 'react-native';
import {connect} from 'react-redux'; import {connect} from 'react-redux';
import StackNavigation from './routers/StackNavigation'; import StackNavigation from './routers/StackNavigation';
...@@ -10,12 +10,14 @@ import NoInternetComponent from './components/NoInternet'; ...@@ -10,12 +10,14 @@ import NoInternetComponent from './components/NoInternet';
import DropdownAlert from 'react-native-dropdownalert'; import DropdownAlert from 'react-native-dropdownalert';
import DeviceInfo from 'react-native-device-info'; import DeviceInfo from 'react-native-device-info';
import R from './assets/R'; import R from './assets/R';
import {WIDTHXD, HEIGHTXD} from './Config/Functions'; import {WIDTHXD, HEIGHTXD, decryptRSAString} from './Config/Functions';
import DropdownManager from './components/DropdownAlert/DropdownManager'; import DropdownManager from './components/DropdownAlert/DropdownManager';
import AsyncStorage from '@react-native-community/async-storage'; import AsyncStorage from '@react-native-community/async-storage';
import KEY from './assets/AsynStorage'; import KEY from './assets/AsynStorage';
import I18n, {setLocation} from './helper/i18/i18n'; import I18n, {setLocation} from './helper/i18/i18n';
import {changeLanguage} from './actions/language'; import {changeLanguage} from './actions/language';
import {RSA_KEY, MY_RSA_KEY} from './Config/constants';
import JSEncrypt from 'jsencrypt';
enableScreens(); enableScreens();
...@@ -25,6 +27,7 @@ const RootView = (props) => { ...@@ -25,6 +27,7 @@ const RootView = (props) => {
dropDownAlertRef.current, dropDownAlertRef.current,
dropDownAlertLongTimeRef.current, dropDownAlertLongTimeRef.current,
); );
setInitLanguage(); setInitLanguage();
}, []); }, []);
...@@ -35,6 +38,7 @@ const RootView = (props) => { ...@@ -35,6 +38,7 @@ const RootView = (props) => {
if (laguage) props.changeLanguage(laguage); if (laguage) props.changeLanguage(laguage);
setLocation(I18n, laguage); setLocation(I18n, laguage);
}; };
return ( return (
<> <>
<View style={{flex: 1}}> <View style={{flex: 1}}>
......
...@@ -36,6 +36,10 @@ const EnterPasswordSmartOTP = (props) => { ...@@ -36,6 +36,10 @@ const EnterPasswordSmartOTP = (props) => {
const onCheckPINSmartOTPPin = async () => { const onCheckPINSmartOTPPin = async () => {
let pinCode = `${firstNumber}${secondsNumber}${thirdNumber}${fourNumber}`; let pinCode = `${firstNumber}${secondsNumber}${thirdNumber}${fourNumber}`;
setFirstNumber(null);
setSecondsNumber(null);
setThirdNumber(null);
setFourNumber(null);
navigation.navigate(CONFIRMCHANGESMARTOTP, { navigation.navigate(CONFIRMCHANGESMARTOTP, {
pre_otp: pinCode, pre_otp: pinCode,
old_password: props.route.params.old_password, old_password: props.route.params.old_password,
......
...@@ -47,10 +47,7 @@ const ConfirmChangeSmartOTP = (props) => { ...@@ -47,10 +47,7 @@ const ConfirmChangeSmartOTP = (props) => {
setSecondsNumber(null); setSecondsNumber(null);
setThirdNumber(null); setThirdNumber(null);
setFourNumber(null); setFourNumber(null);
navigation.reset({ navigation.navigate(SMARTOTPCONFIG);
index: 1,
routes: [{name: TABNAVIGATOR}, {name: SMARTOTPCONFIG}],
});
} else { } else {
showAlert(TYPE.ERROR, I18n.t('Notification'), res.data.message); showAlert(TYPE.ERROR, I18n.t('Notification'), res.data.message);
setFirstNumber(null); setFirstNumber(null);
......
...@@ -5197,6 +5197,11 @@ jsdom@^16.4.0: ...@@ -5197,6 +5197,11 @@ jsdom@^16.4.0:
ws "^7.2.3" ws "^7.2.3"
xml-name-validator "^3.0.0" xml-name-validator "^3.0.0"
jsencrypt@^3.2.0:
version "3.2.0"
resolved "https://registry.yarnpkg.com/jsencrypt/-/jsencrypt-3.2.0.tgz#09242aabf1984165dcd7698fe6ed163be77c05f8"
integrity sha512-Y/WBrCYRP1A2I1OEXxqurO+W3AC5uXhiArprpYQ0Y8/1Dc3NaiINAyCLx7HzXGwN7xvW3s5xpeOTdwD7lD1SQQ==
jsesc@^2.5.1: jsesc@^2.5.1:
version "2.5.2" version "2.5.2"
resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz" resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment