Commit 5768ebe3 by Nguyễn Thị Thúy

merge func_smart_otp

parent 06185bad
1 merge request!21Func smart otp
......@@ -43,12 +43,10 @@ const EnterPasswordSmartOTP = (props) => {
});
if (res.data.code == 200) {
navigation.navigate(CHANGESMARTOTP, {old_password: pinCode});
clearPIN()
} else {
showAlert(TYPE.ERROR, I18n.t('Notification'), res.data.message);
setFirstNumber(null);
setSecondsNumber(null);
setThirdNumber(null);
setFourNumber(null);
clearPIN()
}
} else {
const res = await getOTPApiSmartOTP({
......@@ -65,14 +63,17 @@ const EnterPasswordSmartOTP = (props) => {
props.route.params.onGoToSmartOTP(pinCode, res.data.data.otp);
} else {
showAlert(TYPE.ERROR, I18n.t('Notification'), res.data.message);
setFirstNumber(null);
setSecondsNumber(null);
setThirdNumber(null);
setFourNumber(null);
clearPIN()
}
}
props.hideLoading();
};
const clearPIN = () => {
setFirstNumber(null);
setSecondsNumber(null);
setThirdNumber(null);
setFourNumber(null);
}
const onDeletePress = () => {
if (fourNumber) {
setFourNumber(null);
......
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