diff --git a/components/Navbar.js b/components/Navbar.js index ea35c5e..bfe5a3d 100644 --- a/components/Navbar.js +++ b/components/Navbar.js @@ -198,9 +198,16 @@ const Navbar = ({ isHome }) => { }); console.log("sign", signature, "full message", fullMessage); + let signaturewallet = signature; + + if(signaturewallet.length === 128) + { + signaturewallet = `0x${signaturewallet}`; + } + const authenticationData = { flowId: nonce, - signature: `0x${signature}`, + signature: `${signature}`, pubKey: publicKey, }; diff --git a/components/connectwallet.ts b/components/connectwallet.ts index 92420b1..c29df02 100644 --- a/components/connectwallet.ts +++ b/components/connectwallet.ts @@ -43,9 +43,16 @@ const connectWallet = async () => { }); console.log("sign", signature, "full message", fullMessage); + let signaturewallet = signature; + + if(signaturewallet.length === 128) + { + signaturewallet = `0x${signaturewallet}`; + } + const authenticationData = { flowId: nonce, - signature: `0x${signature}`, + signature: `${signature}`, pubKey: publicKey, }; diff --git a/pages/mint.js b/pages/mint.js index df33747..e4c21c4 100644 --- a/pages/mint.js +++ b/pages/mint.js @@ -99,9 +99,16 @@ const Mint = () => { }); console.log("sign", signature, "full message", fullMessage); + let signaturewallet = signature; + + if(signaturewallet.length === 128) + { + signaturewallet = `0x${signaturewallet}`; + } + const authenticationData = { flowId: nonce, - signature: `0x${signature}`, + signature: `${signature}`, pubKey: publicKey, }; diff --git a/pages/subscription.tsx b/pages/subscription.tsx index 96a7062..5e75ef4 100644 --- a/pages/subscription.tsx +++ b/pages/subscription.tsx @@ -447,11 +447,18 @@ const Subscription = () => { }); console.log("sign", signature, "full message", fullMessage); - const authenticationData = { - flowId: nonce, - signature: `0x${signature}`, - pubKey: publicKey, - }; + let signaturewallet = signature; + + if(signaturewallet.length === 128) + { + signaturewallet = `0x${signaturewallet}`; + } + + const authenticationData = { + flowId: nonce, + signature: `${signature}`, + pubKey: publicKey, + }; const authenticateApiUrl = `${REACT_APP_GATEWAY_URL}api/v1.0/authenticate`;