feat : OTP verified all page
This commit is contained in:
@@ -41,16 +41,6 @@ export default function QuickPay() {
|
||||
const [countdown, setCountdown] = useState(180);
|
||||
const [timerActive, setTimerActive] = useState(false);
|
||||
const [otp, setOtp] = useState("");
|
||||
const [generateOtp, setGenerateOtp] = useState("");
|
||||
|
||||
// async function handleGenerateOtp() {
|
||||
// // const value = await generateOTP(6);
|
||||
// const value = "123456";
|
||||
// setGenerateOtp(value);
|
||||
// setCountdown(180);
|
||||
// setTimerActive(true);
|
||||
// return value;
|
||||
// }
|
||||
|
||||
async function handleSendOtp() {
|
||||
const mobileNumber = localStorage.getItem('remitter_mobile_no');
|
||||
@@ -63,7 +53,7 @@ export default function QuickPay() {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
await sendOtp({ type: 'BENEFICIARY_DELETE' });
|
||||
await sendOtp({ type: 'IMPS' });
|
||||
setShowOtpField(true);
|
||||
setCountdown(180);
|
||||
setTimerActive(true);
|
||||
@@ -86,10 +76,6 @@ export default function QuickPay() {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
const selectedAccount = accountData.find((acc) => acc.stAccountNo === selectedAccNo);
|
||||
const getFullMaskedAccount = (acc: string) => { return "X".repeat(acc.length); };
|
||||
|
||||
@@ -251,7 +237,16 @@ export default function QuickPay() {
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (otp !== generateOtp) {
|
||||
// if (otp !== generateOtp) {
|
||||
// notifications.show({
|
||||
// title: "Invalid OTP",
|
||||
// message: "The OTP entered does not match",
|
||||
// color: "red",
|
||||
// });
|
||||
// return;
|
||||
// }
|
||||
const verified = await handleVerifyOtp();
|
||||
if (!verified) {
|
||||
notifications.show({
|
||||
title: "Invalid OTP",
|
||||
message: "The OTP entered does not match",
|
||||
|
||||
Reference in New Issue
Block a user