Skip to content

Commit

Permalink
changes login
Browse files Browse the repository at this point in the history
  • Loading branch information
devsisingh committed Jan 27, 2024
1 parent 4f898f5 commit 581bc21
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 25 deletions.
19 changes: 13 additions & 6 deletions components/Navbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ const Navbar = ({ isHome }) => {

const authenticationData = {
flowId: nonce,
signature: `${signature}`,
signature: `${signaturewallet}`,
pubKey: publicKey,
};

Expand Down Expand Up @@ -265,12 +265,19 @@ const Navbar = ({ isHome }) => {
};
const response = await signMessage(payload);
console.log(response);

let signaturewallet = response.signature;

if(signaturewallet.length === 128)
{
signaturewallet = `0x${signaturewallet}`;
}

const authenticationData = {
"flowId": nonce,
"signature": `0x${response.signature}`,
"pubKey": publicKey,
};
const authenticationData = {
"flowId": nonce,
"signature": `${signaturewallet}`,
"pubKey": publicKey,
};

const authenticateApiUrl = `${REACT_APP_GATEWAY_URL}api/v1.0/authenticate`;

Expand Down
2 changes: 1 addition & 1 deletion components/connectwallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const connectWallet = async () => {

const authenticationData = {
flowId: nonce,
signature: `${signature}`,
signature: `${signaturewallet}`,
pubKey: publicKey,
};

Expand Down
19 changes: 13 additions & 6 deletions components/transactionFlow/SingleSigner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,19 @@ export default function SingleSignerTransaction({
};
const response = await signMessage(payload);
console.log(response);

const authenticationData = {
"flowId": nonce,
"signature": `0x${response.signature}`,
"pubKey": publicKey,
};

let signaturewallet = response.signature;

if(signaturewallet.length === 128)
{
signaturewallet = `0x${signaturewallet}`;
}

const authenticationData = {
"flowId": nonce,
"signature": `${signaturewallet}`,
"pubKey": publicKey,
};

const authenticateApiUrl = `${REACT_APP_GATEWAY_URL}api/v1.0/authenticate`;

Expand Down
21 changes: 15 additions & 6 deletions pages/mint.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ const Mint = () => {
});
console.log("sign", signature, "full message", fullMessage);

// console.log(signature);

let signaturewallet = signature;

if(signaturewallet.length === 128)
Expand All @@ -108,7 +110,7 @@ const Mint = () => {

const authenticationData = {
flowId: nonce,
signature: `${signature}`,
signature: `${signaturewallet}`,
pubKey: publicKey,
};

Expand Down Expand Up @@ -196,11 +198,18 @@ const Mint = () => {
const response = await signMessage(payload);
console.log(response);

const authenticationData = {
"flowId": nonce,
"signature": `0x${response.signature}`,
"pubKey": publicKey,
};
let signaturewallet = response.signature;

if(signaturewallet.length === 128)
{
signaturewallet = `0x${signaturewallet}`;
}

const authenticationData = {
"flowId": nonce,
"signature": `${signaturewallet}`,
"pubKey": publicKey,
};

const authenticateApiUrl = `${REACT_APP_GATEWAY_URL}api/v1.0/authenticate`;

Expand Down
19 changes: 13 additions & 6 deletions pages/subscription.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ const Subscription = () => {

const authenticationData = {
flowId: nonce,
signature: `${signature}`,
signature: `${signaturewallet}`,
pubKey: publicKey,
};

Expand Down Expand Up @@ -513,11 +513,18 @@ const Subscription = () => {
const response = await signMessage(payload);
console.log(response);

const authenticationData = {
"flowId": nonce,
"signature": `0x${response.signature}`,
"pubKey": publicKey,
};
let signaturewallet = response.signature;

if(signaturewallet.length === 128)
{
signaturewallet = `0x${signaturewallet}`;
}

const authenticationData = {
"flowId": nonce,
"signature": `${signaturewallet}`,
"pubKey": publicKey,
};

const authenticateApiUrl = `${REACT_APP_GATEWAY_URL}api/v1.0/authenticate`;

Expand Down

0 comments on commit 581bc21

Please sign in to comment.