feat : implement the quick pay screen
This commit is contained in:
10
src/app/OTPGenerator.ts
Normal file
10
src/app/OTPGenerator.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
export function generateOTP(length: number) {
|
||||
const digits = '0123456789';
|
||||
let otp = '';
|
||||
otp += digits[Math.floor(Math.random() * 9)+1]; //first digit cannot be zero
|
||||
for (let i = 1; i < length; i++) {
|
||||
otp += digits[Math.floor(Math.random() * digits.length)];
|
||||
}
|
||||
// console.log("OTP generate :",otp);
|
||||
return otp;
|
||||
}
|
Reference in New Issue
Block a user