Skip to content

Commit 3764ab5

Browse files
Merge pull request #827 from OpenSignLabs/resolve_main
fix: conflict resolve
2 parents e073e83 + 2f7a1d6 commit 3764ab5

File tree

1 file changed

+15
-4
lines changed

1 file changed

+15
-4
lines changed

apps/OpenSign/src/pages/PdfRequestFiles.js

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -170,18 +170,26 @@ function PdfRequestFiles() {
170170
const handleResend = async (e) => {
171171
e.preventDefault();
172172
setOtpLoader(true);
173-
await handleSendOTP(Parse.User.current().getEmail());
173+
const localuser = localStorage.getItem(
174+
`Parse/${appInfo.appId}/currentUser`
175+
);
176+
const currentUser = JSON.parse(JSON.stringify(localuser));
177+
await handleSendOTP(currentUser?.email);
174178
setOtpLoader(false);
175179
alert("OTP sent on you email");
176180
};
177181
//`handleVerifyEmail` function is used to verify email with otp
178182
const handleVerifyEmail = async (e) => {
179183
e.preventDefault();
180184
setOtpLoader(true);
185+
const localuser = localStorage.getItem(
186+
`Parse/${appInfo.appId}/currentUser`
187+
);
188+
const currentUser = JSON.parse(JSON.stringify(localuser));
181189
try {
182190
const resEmail = await Parse.Cloud.run("verifyemail", {
183191
otp: otp,
184-
email: Parse.User.current().getEmail()
192+
email: currentUser?.email
185193
});
186194
if (resEmail?.message === "Email is verified.") {
187195
setIsEmailVerified(true);
@@ -202,7 +210,11 @@ function PdfRequestFiles() {
202210
//`handleVerifyBtn` function is used to send otp on user mail
203211
const handleVerifyBtn = async () => {
204212
setIsVerifyModal(true);
205-
await handleSendOTP(Parse.User.current().getEmail());
213+
const localuser = localStorage.getItem(
214+
`Parse/${appInfo.appId}/currentUser`
215+
);
216+
const currentUser = JSON.parse(JSON.stringify(localuser));
217+
await handleSendOTP(currentUser?.email);
206218
};
207219
async function checkIsSubscribed(extUserId, contactId) {
208220
const isGuestSign = location.pathname.includes("/load/") || false;
@@ -497,7 +509,6 @@ function PdfRequestFiles() {
497509
const objectId = res[0].objectId;
498510
setSignerUserId(objectId);
499511
const tourData = res[0].TourStatus && res[0].TourStatus;
500-
501512
if (tourData && tourData.length > 0) {
502513
setTourStatus(tourData);
503514
setRequestSignTour(tourData[0]?.requestSign || false);

0 commit comments

Comments
 (0)