Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
I
InvestCustomer
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Giang Tran
InvestCustomer
Commits
e86c175a
Commit
e86c175a
authored
Jun 11, 2021
by
Nguyễn Thị Thúy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update check setting smart otp
parent
af55d763
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
75 additions
and
41 deletions
+75
-41
build.gradle
android/app/build.gradle
+2
-2
app-release.apk
android/app/release/app-release.apk
+0
-0
output-metadata.json
android/app/release/output-metadata.json
+2
-2
project.pbxproj
ios/Invest.xcodeproj/project.pbxproj
+4
-4
WalletDeposit.js
src/Screens/Action/Wallet/WalletDeposit.js
+0
-0
WalletWithdraw.js
src/Screens/Action/Wallet/WalletWithdraw.js
+28
-6
Home.js
src/Screens/Home/Home.js
+9
-1
ConfirmOTPSmart.js
src/Screens/SmartOTP/ConfirmOTPSmart.js
+7
-7
SettingSmartOTP.js
src/Screens/SmartOTP/SettingSmartOTP.js
+2
-0
Aleart.js
src/components/Aleart.js
+19
-19
en.js
src/helper/i18/locales/en.js
+1
-0
vn.js
src/helper/i18/locales/vn.js
+1
-0
No files found.
android/app/build.gradle
View file @
e86c175a
...
@@ -132,8 +132,8 @@ android {
...
@@ -132,8 +132,8 @@ android {
applicationId
"com.dcv.invest"
applicationId
"com.dcv.invest"
minSdkVersion
rootProject
.
ext
.
minSdkVersion
minSdkVersion
rootProject
.
ext
.
minSdkVersion
targetSdkVersion
rootProject
.
ext
.
targetSdkVersion
targetSdkVersion
rootProject
.
ext
.
targetSdkVersion
versionCode
1
5
versionCode
1
6
versionName
"
1.9
"
versionName
"
2.0
"
vectorDrawables
.
useSupportLibrary
=
true
vectorDrawables
.
useSupportLibrary
=
true
}
}
splits
{
splits
{
...
...
android/app/release/app-release.apk
deleted
100644 → 0
View file @
af55d763
File deleted
android/app/release/output-metadata.json
View file @
e86c175a
...
@@ -11,8 +11,8 @@
...
@@ -11,8 +11,8 @@
"type"
:
"SINGLE"
,
"type"
:
"SINGLE"
,
"filters"
:
[],
"filters"
:
[],
"properties"
:
[],
"properties"
:
[],
"versionCode"
:
1
5
,
"versionCode"
:
1
6
,
"versionName"
:
"
1.9
"
,
"versionName"
:
"
2.0
"
,
"enabled"
:
true
,
"enabled"
:
true
,
"outputFile"
:
"app-release.apk"
"outputFile"
:
"app-release.apk"
}
}
...
...
ios/Invest.xcodeproj/project.pbxproj
View file @
e86c175a
...
@@ -903,7 +903,7 @@
...
@@ -903,7 +903,7 @@
CODE_SIGN_ENTITLEMENTS
=
Invest/Invest.entitlements
;
CODE_SIGN_ENTITLEMENTS
=
Invest/Invest.entitlements
;
CODE_SIGN_IDENTITY
=
"Apple Development"
;
CODE_SIGN_IDENTITY
=
"Apple Development"
;
CODE_SIGN_STYLE
=
Automatic
;
CODE_SIGN_STYLE
=
Automatic
;
CURRENT_PROJECT_VERSION
=
5
;
CURRENT_PROJECT_VERSION
=
7
;
DEVELOPMENT_TEAM
=
MXZ24GRH48
;
DEVELOPMENT_TEAM
=
MXZ24GRH48
;
ENABLE_BITCODE
=
NO
;
ENABLE_BITCODE
=
NO
;
GCC_PREPROCESSOR_DEFINITIONS
=
(
GCC_PREPROCESSOR_DEFINITIONS
=
(
...
@@ -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.
0
;
MARKETING_VERSION
=
2.
2
;
OTHER_LDFLAGS
=
(
OTHER_LDFLAGS
=
(
"$(inherited)"
,
"$(inherited)"
,
"-ObjC"
,
"-ObjC"
,
...
@@ -937,11 +937,11 @@
...
@@ -937,11 +937,11 @@
CODE_SIGN_ENTITLEMENTS
=
Invest/Invest.entitlements
;
CODE_SIGN_ENTITLEMENTS
=
Invest/Invest.entitlements
;
CODE_SIGN_IDENTITY
=
"Apple Development"
;
CODE_SIGN_IDENTITY
=
"Apple Development"
;
CODE_SIGN_STYLE
=
Automatic
;
CODE_SIGN_STYLE
=
Automatic
;
CURRENT_PROJECT_VERSION
=
5
;
CURRENT_PROJECT_VERSION
=
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.
0
;
MARKETING_VERSION
=
2.
2
;
OTHER_LDFLAGS
=
(
OTHER_LDFLAGS
=
(
"$(inherited)"
,
"$(inherited)"
,
"-ObjC"
,
"-ObjC"
,
...
...
src/Screens/Action/Wallet/WalletDeposit.js
View file @
e86c175a
This diff is collapsed.
Click to expand it.
src/Screens/Action/Wallet/WalletWithdraw.js
View file @
e86c175a
...
@@ -10,7 +10,7 @@ import {
...
@@ -10,7 +10,7 @@ import {
TouchableWithoutFeedback
,
TouchableWithoutFeedback
,
Keyboard
,
Keyboard
,
KeyboardAvoidingView
,
KeyboardAvoidingView
,
ScrollView
,
ScrollView
,
DeviceEventEmitter
,
}
from
'react-native'
;
}
from
'react-native'
;
import
R
from
'../../../assets/R'
;
import
R
from
'../../../assets/R'
;
import
HeaderBack
from
'../../../components/Header/HeaderBack'
;
import
HeaderBack
from
'../../../components/Header/HeaderBack'
;
...
@@ -30,14 +30,15 @@ import RadioForm from 'react-native-simple-radio-button';
...
@@ -30,14 +30,15 @@ import RadioForm from 'react-native-simple-radio-button';
import
{
widthDraw
,
getListWidthDraw
}
from
'../../../apis/Functions/Widthdraw'
;
import
{
widthDraw
,
getListWidthDraw
}
from
'../../../apis/Functions/Widthdraw'
;
import
{
useNavigation
}
from
'@react-navigation/native'
;
import
{
useNavigation
}
from
'@react-navigation/native'
;
import
{
showLoading
,
hideLoading
}
from
'../../../actions/loadingAction'
;
import
{
showLoading
,
hideLoading
}
from
'../../../actions/loadingAction'
;
import
{
saveUserToRedux
}
from
'../../../actions/users'
;
import
{
confirmAlert
}
from
'../../../components/Aleart'
;
import
{
confirmAlert
}
from
'../../../components/Aleart'
;
import
{
import
{
ADDMETHODPAY
,
ADDMETHODPAY
,
ENTER_PASSWORD_SMART_OTP
,
ENTER_PASSWORD_SMART_OTP
,
SETTINGOTP
,
}
from
'../../../routers/ScreenNames'
;
}
from
'../../../routers/ScreenNames'
;
import
TextMoney
from
'../../../components/Input/InputMoney'
;
import
TextMoney
from
'../../../components/Input/InputMoney'
;
import
I18n
from
'../../../helper/i18/i18n'
;
import
I18n
from
'../../../helper/i18/i18n'
;
import
{
getOTPApi
}
from
'../../../apis/Functions/users'
;
import
{
get
DetailUser
,
get
OTPApi
}
from
'../../../apis/Functions/users'
;
import
{
SMARTOTP
}
from
'../../../routers/ScreenNames'
;
import
{
SMARTOTP
}
from
'../../../routers/ScreenNames'
;
import
{
showAlert
,
TYPE
}
from
'../../../components/DropdownAlert'
;
import
{
showAlert
,
TYPE
}
from
'../../../components/DropdownAlert'
;
var
radio_props
=
[
var
radio_props
=
[
...
@@ -117,9 +118,29 @@ const WalletWithdraw = (props) => {
...
@@ -117,9 +118,29 @@ const WalletWithdraw = (props) => {
I18n
.
t
(
'WarnMaxReqestWithdraw'
),
I18n
.
t
(
'WarnMaxReqestWithdraw'
),
);
);
}
else
{
}
else
{
navigate
.
navigate
(
ENTER_PASSWORD_SMART_OTP
,
{
if
(
!
props
.
user
.
smart_otp_status
)
{
onGoToSmartOTP
:
(
pinCode
,
otp
)
=>
onGoToSmartOTP
(
pinCode
,
otp
),
confirmAlert
(
});
`
${
I18n
.
t
(
'YouHaveNotSettingSmartOTP'
)}
`
,
()
=>
{
navigate
.
navigate
(
SETTINGOTP
,
{
isFromTransaction
:
true
,
setupSmartOTPSuccess
:
()
=>
{
navigate
.
goBack
()
navigate
.
goBack
()
navigate
.
navigate
(
ENTER_PASSWORD_SMART_OTP
,
{
onGoToSmartOTP
:
(
pinCode
,
otp
)
=>
onGoToSmartOTP
(
pinCode
,
otp
),
});
DeviceEventEmitter
.
emit
(
'reloadUserInfo'
);
},
});
},
`
${
I18n
.
t
(
'setting'
)}
`
,
);
}
else
{
navigate
.
navigate
(
ENTER_PASSWORD_SMART_OTP
,
{
onGoToSmartOTP
:
(
pinCode
,
otp
)
=>
onGoToSmartOTP
(
pinCode
,
otp
),
});
}
}
}
}
else
{
}
else
{
showAlert
(
showAlert
(
...
@@ -317,4 +338,5 @@ const mapStateToProps = (state) => {
...
@@ -317,4 +338,5 @@ const mapStateToProps = (state) => {
export
default
connect
(
mapStateToProps
,
{
export
default
connect
(
mapStateToProps
,
{
showLoading
,
showLoading
,
hideLoading
,
hideLoading
,
saveUserToRedux
})(
WalletWithdraw
);
})(
WalletWithdraw
);
src/Screens/Home/Home.js
View file @
e86c175a
import
React
,
{
useEffect
,
useState
}
from
'react'
;
import
React
,
{
useEffect
,
useState
}
from
'react'
;
import
{
Alert
,
Platform
,
View
}
from
'react-native'
;
import
{
Alert
,
DeviceEventEmitter
,
Platform
,
View
}
from
'react-native'
;
import
{
connect
}
from
'react-redux'
;
import
{
connect
}
from
'react-redux'
;
import
{
getTransaction
}
from
'../../apis/Functions/users'
;
import
{
getTransaction
}
from
'../../apis/Functions/users'
;
import
{
getImagesHome
}
from
'../../apis/Functions/General'
;
import
{
getImagesHome
}
from
'../../apis/Functions/General'
;
...
@@ -14,6 +14,7 @@ import {showAlert, TYPE} from '../../components/DropdownAlert/index';
...
@@ -14,6 +14,7 @@ import {showAlert, TYPE} from '../../components/DropdownAlert/index';
import
VersionChecker
from
'../VersionChecker'
;
import
VersionChecker
from
'../VersionChecker'
;
import
{
saveUserToRedux
}
from
'../../actions/users'
;
import
{
saveUserToRedux
}
from
'../../actions/users'
;
import
{
getDetailUser
}
from
'../../apis/Functions/users'
;
import
{
getDetailUser
}
from
'../../apis/Functions/users'
;
import
{
logout
}
from
'../../Config/Functions'
;
const
Home
=
(
props
)
=>
{
const
Home
=
(
props
)
=>
{
const
[
data
,
setData
]
=
useState
({
total_deposit
:
0
,
total_withdraw
:
0
});
const
[
data
,
setData
]
=
useState
({
total_deposit
:
0
,
total_withdraw
:
0
});
...
@@ -52,6 +53,13 @@ const Home = (props) => {
...
@@ -52,6 +53,13 @@ const Home = (props) => {
useEffect
(()
=>
{
useEffect
(()
=>
{
getData
();
getData
();
initSocket
();
initSocket
();
let
reloadUserInfoListener
=
DeviceEventEmitter
.
addListener
(
'reloadUserInfo'
,
(
e
)
=>
{
console
.
log
(
'run in to reloadUserInfo'
);
onRefresh
();
});
return
()
=>
{
reloadUserInfoListener
.
remove
();
};
},
[]);
},
[]);
useEffect
(()
=>
{
useEffect
(()
=>
{
...
...
src/Screens/SmartOTP/ConfirmOTPSmart.js
View file @
e86c175a
import
React
,
{
Component
,
useEffect
,
useState
}
from
'react'
;
import
React
,
{
useState
}
from
'react'
;
import
{
import
{
View
,
View
,
Text
,
Text
,
TextInput
,
StyleSheet
,
StyleSheet
,
TouchableOpacity
,
TouchableOpacity
,
Platform
,
Platform
,
Alert
,
}
from
'react-native'
;
}
from
'react-native'
;
import
HeaderBack
from
'../../components/Header/HeaderBack'
;
import
HeaderBack
from
'../../components/Header/HeaderBack'
;
...
@@ -19,7 +17,6 @@ import {
...
@@ -19,7 +17,6 @@ import {
import
{
getFontXD
,
HEIGHTXD
,
WIDTHXD
}
from
'../../Config/Functions'
;
import
{
getFontXD
,
HEIGHTXD
,
WIDTHXD
}
from
'../../Config/Functions'
;
import
R
from
'../../assets/R'
;
import
R
from
'../../assets/R'
;
import
{
TABNAVIGATOR
}
from
'../../routers/ScreenNames'
;
import
{
TABNAVIGATOR
}
from
'../../routers/ScreenNames'
;
import
{
verifyOTPApi
}
from
'../../apis/Functions/users'
;
import
{
useNavigation
}
from
'@react-navigation/native'
;
import
{
useNavigation
}
from
'@react-navigation/native'
;
import
I18n
from
'../../helper/i18/i18n'
;
import
I18n
from
'../../helper/i18/i18n'
;
import
AppText
from
'../../components/AppText'
;
import
AppText
from
'../../components/AppText'
;
...
@@ -29,12 +26,11 @@ import {connect} from 'react-redux';
...
@@ -29,12 +26,11 @@ import {connect} from 'react-redux';
import
{
showAlert
,
TYPE
}
from
'../../components/DropdownAlert'
;
import
{
showAlert
,
TYPE
}
from
'../../components/DropdownAlert'
;
import
CountDown
from
'../../components/CountDown'
;
import
CountDown
from
'../../components/CountDown'
;
import
{
import
{
verifyOTPApiSmart
,
getOTPApi
,
verifyStoreOTPApiSmart
,
verifyStoreOTPApiSmart
,
getOTPApiSmartOTP
,
getOTPApiSmartOTP
,
}
from
'../../apis/Functions/users'
;
}
from
'../../apis/Functions/users'
;
const
CELL_COUNT
=
4
;
const
CELL_COUNT
=
4
;
const
ConfirmOTPSmart
=
(
propsa
)
=>
{
const
ConfirmOTPSmart
=
(
propsa
)
=>
{
...
@@ -82,7 +78,11 @@ const ConfirmOTPSmart = (propsa) => {
...
@@ -82,7 +78,11 @@ const ConfirmOTPSmart = (propsa) => {
showAlert
(
TYPE
.
SUCCESS
,
I18n
.
t
(
'Notification'
),
res
.
data
.
message
);
showAlert
(
TYPE
.
SUCCESS
,
I18n
.
t
(
'Notification'
),
res
.
data
.
message
);
propsa
.
hideLoading
();
propsa
.
hideLoading
();
if
(
res
.
data
.
code
==
200
)
{
if
(
res
.
data
.
code
==
200
)
{
navigate
.
navigate
(
TABNAVIGATOR
);
if
(
propsa
.
route
.
params
.
isFromTransaction
)
{
propsa
.
route
.
params
.
setupSmartOTPSuccess
();
}
else
{
navigate
.
navigate
(
TABNAVIGATOR
);
}
}
else
{
}
else
{
showAlert
(
TYPE
.
ERROR
,
I18n
.
t
(
'Notification'
),
res
.
data
.
message
);
showAlert
(
TYPE
.
ERROR
,
I18n
.
t
(
'Notification'
),
res
.
data
.
message
);
}
}
...
...
src/Screens/SmartOTP/SettingSmartOTP.js
View file @
e86c175a
...
@@ -47,6 +47,8 @@ const SettingOTP = (props) => {
...
@@ -47,6 +47,8 @@ const SettingOTP = (props) => {
navigatiton
.
navigate
(
CONFIRMOTPSMART
,
{
navigatiton
.
navigate
(
CONFIRMOTPSMART
,
{
password
,
password
,
password_confirmation
,
password_confirmation
,
isFromTransaction
:
props
.
route
.
params
.
isFromTransaction
,
setupSmartOTPSuccess
:
props
.
route
.
params
.
setupSmartOTPSuccess
});
});
}
else
{
}
else
{
showAlert
(
TYPE
.
ERROR
,
I18n
.
t
(
'Notification'
),
res
.
data
.
message
);
showAlert
(
TYPE
.
ERROR
,
I18n
.
t
(
'Notification'
),
res
.
data
.
message
);
...
...
src/components/Aleart.js
View file @
e86c175a
...
@@ -2,25 +2,25 @@ import {Alert} from 'react-native';
...
@@ -2,25 +2,25 @@ import {Alert} from 'react-native';
import
I18n
from
'../helper/i18/i18n'
;
import
I18n
from
'../helper/i18/i18n'
;
export
const
NotificationAlert
=
(
string
)
=>
{
export
const
NotificationAlert
=
(
string
)
=>
{
Alert
.
alert
(
I18n
.
t
(
'Notification'
),
string
);
Alert
.
alert
(
I18n
.
t
(
'Notification'
),
string
);
};
};
export
const
confirmAlert
=
(
content
,
callback
)
=>
{
export
const
confirmAlert
=
(
content
,
callback
,
positiveTitle
)
=>
{
Alert
.
alert
(
Alert
.
alert
(
I18n
.
t
(
'Notification'
),
I18n
.
t
(
'Notification'
),
content
,
content
,
[
[
{
{
text
:
I18n
.
t
(
'Cancel'
),
text
:
I18n
.
t
(
'Cancel'
),
style
:
'cancel'
,
style
:
'cancel'
,
},
},
{
{
text
:
I18n
.
t
(
'Ok'
),
text
:
positiveTitle
?
positiveTitle
:
I18n
.
t
(
'Ok'
),
onPress
:
()
=>
{
onPress
:
()
=>
{
callback
();
callback
();
},
},
},
},
],
],
{
cancelable
:
false
},
{
cancelable
:
false
},
);
);
};
};
src/helper/i18/locales/en.js
View file @
e86c175a
...
@@ -326,4 +326,5 @@ export default {
...
@@ -326,4 +326,5 @@ export default {
ResetSmartOTP2
:
' press 3 to meet technical support staff.'
,
ResetSmartOTP2
:
' press 3 to meet technical support staff.'
,
ForgotSmartOTP
:
'Forgot Smart OTP'
,
ForgotSmartOTP
:
'Forgot Smart OTP'
,
WarnMaxReqestWithdraw
:
'Invalid withdrawal amount'
,
WarnMaxReqestWithdraw
:
'Invalid withdrawal amount'
,
YouHaveNotSettingSmartOTP
:
'You have not installed Smart OTP'
,
};
};
src/helper/i18/locales/vn.js
View file @
e86c175a
...
@@ -323,4 +323,5 @@ export default {
...
@@ -323,4 +323,5 @@ export default {
'Để đảm bảo an toàn trong quá trình sử dụng ứng dụng, bạn vui lòng liên hệ đến tổng đài: '
,
'Để đảm bảo an toàn trong quá trình sử dụng ứng dụng, bạn vui lòng liên hệ đến tổng đài: '
,
ResetSmartOTP2
:
' bấm phím 3 để gặp nhân viên hỗ trợ kỹ thuật.'
,
ResetSmartOTP2
:
' bấm phím 3 để gặp nhân viên hỗ trợ kỹ thuật.'
,
ForgotSmartOTP
:
'Quên Smart OTP'
,
ForgotSmartOTP
:
'Quên Smart OTP'
,
YouHaveNotSettingSmartOTP
:
'Bạn chưa cài đặt Smart OTP'
,
};
};
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment