Commit c5d2122a by Giang Tran

edit moment

parent b5fdfba6
...@@ -11,6 +11,7 @@ import {useNavigation} from '@react-navigation/native'; ...@@ -11,6 +11,7 @@ import {useNavigation} from '@react-navigation/native';
import {saveUserToRedux} from '../../../actions/users'; import {saveUserToRedux} from '../../../actions/users';
import {getDetailUser} from '../../../apis/Functions/users'; import {getDetailUser} from '../../../apis/Functions/users';
import AppText from '../../../components/AppText'; import AppText from '../../../components/AppText';
import {showLoading, hideLoading} from '../../../actions/loadingAction';
const MethodPayView = (props) => { const MethodPayView = (props) => {
const [data, setData] = useState([]); const [data, setData] = useState([]);
...@@ -41,9 +42,11 @@ const MethodPayView = (props) => { ...@@ -41,9 +42,11 @@ const MethodPayView = (props) => {
}; };
const getData = async () => { const getData = async () => {
props.showLoading();
const res = await getListMethod({ const res = await getListMethod({
platform: Platform.OS, platform: Platform.OS,
}); });
props.hideLoading();
if (res.data.code == 200 && res.data.data) { if (res.data.code == 200 && res.data.data) {
setData(res.data.data); setData(res.data.data);
} else { } else {
...@@ -90,4 +93,8 @@ const mapStateToProps = (state) => { ...@@ -90,4 +93,8 @@ const mapStateToProps = (state) => {
user: state.userReducer, user: state.userReducer,
}; };
}; };
export default connect(mapStateToProps, {saveUserToRedux})(MethodPayView); export default connect(mapStateToProps, {
saveUserToRedux,
showLoading,
hideLoading,
})(MethodPayView);
...@@ -53,6 +53,7 @@ const EnterPasswordSmartOTP = (props) => { ...@@ -53,6 +53,7 @@ const EnterPasswordSmartOTP = (props) => {
clearPIN(); clearPIN();
} }
} else { } else {
props.showLoading();
const res = await getOTPApiSmartOTP({ const res = await getOTPApiSmartOTP({
platform: Platform.OS, platform: Platform.OS,
otp_by: props.user.email, otp_by: props.user.email,
...@@ -62,6 +63,7 @@ const EnterPasswordSmartOTP = (props) => { ...@@ -62,6 +63,7 @@ const EnterPasswordSmartOTP = (props) => {
? OTP_TYPE.CUSTOMER_REQUEST_DEPOSIT ? OTP_TYPE.CUSTOMER_REQUEST_DEPOSIT
: OTP_TYPE.REQUEST_WITHDRAW, : OTP_TYPE.REQUEST_WITHDRAW,
}); });
props.hideLoading();
if (res.data.code == 200) { if (res.data.code == 200) {
props.route.params.onGoToSmartOTP( props.route.params.onGoToSmartOTP(
......
...@@ -48,6 +48,7 @@ const SmartOTP = (props) => { ...@@ -48,6 +48,7 @@ const SmartOTP = (props) => {
platform: Platform.OS, platform: Platform.OS,
notes, notes,
fee: 0, fee: 0,
otp: encryptRSAString(value),
}); });
} else { } else {
const {src, receiving_account, amount, notes} = props.route.params; const {src, receiving_account, amount, notes} = props.route.params;
...@@ -58,6 +59,7 @@ const SmartOTP = (props) => { ...@@ -58,6 +59,7 @@ const SmartOTP = (props) => {
platform: Platform.OS, platform: Platform.OS,
notes, notes,
fee: 0, fee: 0,
otp: encryptRSAString(value),
}); });
} }
......
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