Commit c5d2122a by Giang Tran

edit moment

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