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';
import {useNavigation} from '@react-navigation/native';
import {showLoading, hideLoading} from '../../../actions/loadingAction';
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 I18n from '../../../helper/i18/i18n';
import {getOTPApi} from '../../../apis/Functions/users';
......@@ -66,7 +69,7 @@ const WalletWithdraw = (props) => {
}, [navigate]);
const getData = async () => {
props.showLoading()
props.showLoading();
const res = await getListWidthDraw({
platform: Platform.OS,
});
......@@ -84,10 +87,11 @@ const WalletWithdraw = (props) => {
} else {
showAlert(TYPE.ERROR, I18n.t('Notification'), I18n.t('Can_not_get_data'));
}
props.hideLoading()
props.hideLoading();
};
const onPressWithdraw = async () => {
console.log();
const titles = [
I18n.t('BeneficiaryAccount'),
I18n.t('AmountOfMoney').toLowerCase(),
......@@ -97,9 +101,26 @@ const WalletWithdraw = (props) => {
if (index === true) {
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, {
onGoToSmartOTP: (pinCode, otp) => onGoToSmartOTP(pinCode, otp)
onGoToSmartOTP: (pinCode, otp) => onGoToSmartOTP(pinCode, otp),
});
}
} else {
showAlert(
TYPE.WARN,
......@@ -117,7 +138,7 @@ const WalletWithdraw = (props) => {
};
const onGoToSmartOTP = (pinCode, otp) => {
navigate.goBack()
navigate.goBack();
navigate.navigate(SMARTOTP, {
type: 'WITHDRAW',
src,
......@@ -127,7 +148,7 @@ const WalletWithdraw = (props) => {
pinCode,
otp,
});
}
};
return (
<KeyboardAvoidingView
......
......@@ -20,6 +20,8 @@ import {connect} from 'react-redux';
const SmartOTPConfig = (props) => {
const navigation = useNavigation();
console.log(props.user);
return (
<View style={{flex: 1}}>
<HeaderBack title={'SettingOTP'} />
......
......@@ -291,10 +291,12 @@ export default {
LoginSessionEnd: 'Login session end, please login again',
noteWithdrawMoney: 'Infor CQG account',
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',
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:',
SmartOTPUsingForFirst: '• Withdrawal request',
SmartOTPUsingForSecond: '• Request an internal transfer',
......@@ -319,7 +321,9 @@ export default {
ConfirmSmartOTP: 'Confirm 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.',
ForgotSmartOTP: 'Forgot Smart OTP',
WarnMaxReqestWithdraw: 'Invalid withdrawal amount',
};
......@@ -288,6 +288,7 @@ export default {
_Sell: 'Bán',
FirstEscrow: 'Ký quỹ ban đầu (VNĐ) ',
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',
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',
......@@ -318,8 +319,8 @@ export default {
ConfirmPassGetSmartOTP: 'Xác nhận mật khẩu lấy Smart OTP ',
ConfirmSmartOTP: 'Xác nhận 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.',
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