Skip to content

Commit

Permalink
Merge pull request #123 from IntersectMBO/feat/1810-use-stake-key-for…
Browse files Browse the repository at this point in the history
…-identifier

feat(#1810): add stake key for validation instead of wallet address
  • Loading branch information
Nemanzh authored Aug 23, 2024
2 parents ecf07d6 + 95c827a commit 18fc337
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@intersect.mbo/pdf-ui",
"version": "0.3.6",
"version": "0.3.7",
"description": "Proposal discussion ui",
"main": "./src/index.js",
"exports": {
Expand Down Expand Up @@ -67,4 +67,4 @@
"jsxSingleQuote": true,
"bracketSpacing": true
}
}
}
6 changes: 3 additions & 3 deletions src/lib/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,17 @@ export const loginUserToApp = async ({
}
} else {
if (trigerSignData) {
const changeAddrHex = await wallet?.address;
const stakeKeyHash = await wallet?.stakeKey;
const messageUtf = `To proceed, please sign this data to verify your identity. This ensures that the action is secure and confirms your identity.`;
const messageHex = utf8ToHex(messageUtf);

const signedData = await wallet.signData(
changeAddrHex,
stakeKeyHash,
messageHex
);

const userResponse = await loginUser({
identifier: changeAddrHex,
identifier: stakeKeyHash,
signedData: signedData,
});

Expand Down

0 comments on commit 18fc337

Please sign in to comment.