Convert subscriber uuid to bytes

This commit is contained in:
Shreerang Kale 2024-08-08 15:31:14 +05:30
parent 04b2eeb77a
commit a63bbdd1c3
2 changed files with 3 additions and 4 deletions

View File

@ -38,9 +38,8 @@ const Thanks: React.FC = () => {
throw new Error("Token has expired"); throw new Error("Token has expired");
} }
const uuidBuffer = Buffer.from(decoded.subscriber_id.replace(/-/g, ''), 'hex'); const subscriberIdBytes = ethers.utils.toUtf8Bytes(decoded.subscriber_id)
const subscriberIdHash = ethers.utils.sha256(subscriberIdBytes);
const subscriberIdHash = ethers.utils.sha256(uuidBuffer);
navigate('/connect-wallet', { navigate('/connect-wallet', {
state:{ state:{