Commit af55d763 by Nguyễn Thị Thúy

Merge remote-tracking branch 'origin/func_smart_otp' into func_smart_otp

parents 1e8e457f 3d7507a0
{
"version": 1,
"artifactType": {
"type": "APK",
"kind": "Directory"
},
"applicationId": "com.dcv.invest",
"variantName": "release",
"elements": [
{
"type": "SINGLE",
"filters": [],
"properties": [],
"versionCode": 15,
"versionName": "1.9",
"enabled": true,
"outputFile": "app-release.apk"
}
]
}
\ No newline at end of file
...@@ -31,7 +31,10 @@ import {widthDraw, getListWidthDraw} from '../../../apis/Functions/Widthdraw'; ...@@ -31,7 +31,10 @@ 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 {confirmAlert} from '../../../components/Aleart'; import {confirmAlert} from '../../../components/Aleart';
import {ADDMETHODPAY, ENTER_PASSWORD_SMART_OTP} from '../../../routers/ScreenNames'; import {
ADDMETHODPAY,
ENTER_PASSWORD_SMART_OTP,
} 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 {getOTPApi} from '../../../apis/Functions/users';
...@@ -66,7 +69,7 @@ const WalletWithdraw = (props) => { ...@@ -66,7 +69,7 @@ const WalletWithdraw = (props) => {
}, [navigate]); }, [navigate]);
const getData = async () => { const getData = async () => {
props.showLoading() props.showLoading();
const res = await getListWidthDraw({ const res = await getListWidthDraw({
platform: Platform.OS, platform: Platform.OS,
}); });
...@@ -84,10 +87,11 @@ const WalletWithdraw = (props) => { ...@@ -84,10 +87,11 @@ const WalletWithdraw = (props) => {
} else { } else {
showAlert(TYPE.ERROR, I18n.t('Notification'), I18n.t('Can_not_get_data')); showAlert(TYPE.ERROR, I18n.t('Notification'), I18n.t('Can_not_get_data'));
} }
props.hideLoading() props.hideLoading();
}; };
const onPressWithdraw = async () => { const onPressWithdraw = async () => {
console.log();
const titles = [ const titles = [
I18n.t('BeneficiaryAccount'), I18n.t('BeneficiaryAccount'),
I18n.t('AmountOfMoney').toLowerCase(), I18n.t('AmountOfMoney').toLowerCase(),
...@@ -97,9 +101,26 @@ const WalletWithdraw = (props) => { ...@@ -97,9 +101,26 @@ const WalletWithdraw = (props) => {
if (index === true) { if (index === true) {
if (amount >= props.user.configs.request_withdraw_amount_min) { if (amount >= props.user.configs.request_withdraw_amount_min) {
if (src == 'WALLET' && amount > props.user.current_money) {
showAlert(
TYPE.WARN,
I18n.t('Notification'),
I18n.t('WarnMaxReqestWithdraw'),
);
} else if (
src == 'INVESTMENT' &&
amount > props.user.current_cqg_money
) {
showAlert(
TYPE.WARN,
I18n.t('Notification'),
I18n.t('WarnMaxReqestWithdraw'),
);
} else {
navigate.navigate(ENTER_PASSWORD_SMART_OTP, { navigate.navigate(ENTER_PASSWORD_SMART_OTP, {
onGoToSmartOTP: (pinCode, otp) => onGoToSmartOTP(pinCode, otp) onGoToSmartOTP: (pinCode, otp) => onGoToSmartOTP(pinCode, otp),
}); });
}
} else { } else {
showAlert( showAlert(
TYPE.WARN, TYPE.WARN,
...@@ -117,7 +138,7 @@ const WalletWithdraw = (props) => { ...@@ -117,7 +138,7 @@ const WalletWithdraw = (props) => {
}; };
const onGoToSmartOTP = (pinCode, otp) => { const onGoToSmartOTP = (pinCode, otp) => {
navigate.goBack() navigate.goBack();
navigate.navigate(SMARTOTP, { navigate.navigate(SMARTOTP, {
type: 'WITHDRAW', type: 'WITHDRAW',
src, src,
...@@ -127,7 +148,7 @@ const WalletWithdraw = (props) => { ...@@ -127,7 +148,7 @@ const WalletWithdraw = (props) => {
pinCode, pinCode,
otp, otp,
}); });
} };
return ( return (
<KeyboardAvoidingView <KeyboardAvoidingView
......
...@@ -20,6 +20,8 @@ import {connect} from 'react-redux'; ...@@ -20,6 +20,8 @@ import {connect} from 'react-redux';
const SmartOTPConfig = (props) => { const SmartOTPConfig = (props) => {
const navigation = useNavigation(); const navigation = useNavigation();
console.log(props.user);
return ( return (
<View style={{flex: 1}}> <View style={{flex: 1}}>
<HeaderBack title={'SettingOTP'} /> <HeaderBack title={'SettingOTP'} />
......
...@@ -291,10 +291,12 @@ export default { ...@@ -291,10 +291,12 @@ export default {
LoginSessionEnd: 'Login session end, please login again', LoginSessionEnd: 'Login session end, please login again',
noteWithdrawMoney: 'Infor CQG account', noteWithdrawMoney: 'Infor CQG account',
SmartOTP: 'Smart OTP', SmartOTP: 'Smart OTP',
SmartOTPWarning: 'Please do not give the OTP to anyone under any circumstances.', SmartOTPWarning:
'Please do not give the OTP to anyone under any circumstances.',
ConfirmTransaction: 'Confirm transaction', ConfirmTransaction: 'Confirm transaction',
OTPWillAutoUpdate: 'OTP code will be automatically update after ', OTPWillAutoUpdate: 'OTP code will be automatically update after ',
OTPWillAutoFill: 'Select "Confirm transaction" code OTP will be filled automatically', OTPWillAutoFill:
'Select "Confirm transaction" code OTP will be filled automatically',
SmartOTPUsingFor: 'OTP code using for:', SmartOTPUsingFor: 'OTP code using for:',
SmartOTPUsingForFirst: '• Withdrawal request', SmartOTPUsingForFirst: '• Withdrawal request',
SmartOTPUsingForSecond: '• Request an internal transfer', SmartOTPUsingForSecond: '• Request an internal transfer',
...@@ -319,7 +321,9 @@ export default { ...@@ -319,7 +321,9 @@ export default {
ConfirmSmartOTP: 'Confirm Smart OTP', ConfirmSmartOTP: 'Confirm Smart OTP',
AddSmartOTP: 'Add Smart OTP', AddSmartOTP: 'Add Smart OTP',
ResetSmartOTP: 'To ensure safety during application use, please contact the operator: ', ResetSmartOTP:
'To ensure safety during application use, please contact the operator: ',
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',
}; };
...@@ -288,6 +288,7 @@ export default { ...@@ -288,6 +288,7 @@ export default {
_Sell: 'Bán', _Sell: 'Bán',
FirstEscrow: 'Ký quỹ ban đầu (VNĐ) ', FirstEscrow: 'Ký quỹ ban đầu (VNĐ) ',
WarnMinReqestWithdraw: 'Số tiền rút phải lớn hơn 1 triệu đồng', WarnMinReqestWithdraw: 'Số tiền rút phải lớn hơn 1 triệu đồng',
WarnMaxReqestWithdraw: 'Số tiền rút không hợp lệ',
Overtime: 'Mã OTP hết hạn sử dụng', Overtime: 'Mã OTP hết hạn sử dụng',
LoginSessionEnd: 'Hết phiên đăng nhập, vui lòng đăng nhập lại', LoginSessionEnd: 'Hết phiên đăng nhập, vui lòng đăng nhập lại',
noteWithdrawMoney: 'Thông tin tài khoản CQG', noteWithdrawMoney: 'Thông tin tài khoản CQG',
...@@ -318,8 +319,8 @@ export default { ...@@ -318,8 +319,8 @@ export default {
ConfirmPassGetSmartOTP: 'Xác nhận mật khẩu lấy Smart OTP ', ConfirmPassGetSmartOTP: 'Xác nhận mật khẩu lấy Smart OTP ',
ConfirmSmartOTP: 'Xác nhận Smart OTP ', ConfirmSmartOTP: 'Xác nhận Smart OTP ',
PopupSettingSmartOTP: 'Bạn có muốn cài đặt Smart OTP?', PopupSettingSmartOTP: 'Bạn có muốn cài đặt Smart OTP?',
ResetSmartOTP: 'Để đả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: ', ResetSmartOTP:
'Để đả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',
}; };
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