From a63bbdd1c36ec49b2d7bd9821a6fa48de45b751a Mon Sep 17 00:00:00 2001 From: Shreerang Kale Date: Thu, 8 Aug 2024 15:31:14 +0530 Subject: [PATCH] Convert subscriber uuid to bytes --- src/pages/Email.tsx | 2 +- src/pages/Thanks.tsx | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/pages/Email.tsx b/src/pages/Email.tsx index 039b74c..630145d 100644 --- a/src/pages/Email.tsx +++ b/src/pages/Email.tsx @@ -21,7 +21,7 @@ const Email = () => { > - Thank you for registering! + Thank you for registering! {REDIRECT_EMAIL_MSG} diff --git a/src/pages/Thanks.tsx b/src/pages/Thanks.tsx index f8f6c3e..c8a18f0 100644 --- a/src/pages/Thanks.tsx +++ b/src/pages/Thanks.tsx @@ -38,9 +38,8 @@ const Thanks: React.FC = () => { throw new Error("Token has expired"); } - const uuidBuffer = Buffer.from(decoded.subscriber_id.replace(/-/g, ''), 'hex'); - - const subscriberIdHash = ethers.utils.sha256(uuidBuffer); + const subscriberIdBytes = ethers.utils.toUtf8Bytes(decoded.subscriber_id) + const subscriberIdHash = ethers.utils.sha256(subscriberIdBytes); navigate('/connect-wallet', { state:{