mirror of
https://github.com/roleypoly/roleypoly.git
synced 2025-04-24 19:39:11 +00:00
simplify interactions verify
This commit is contained in:
parent
6583471f40
commit
0d5bc60c92
1 changed files with 6 additions and 12 deletions
|
@ -21,16 +21,10 @@ export const verifyRequest = async (
|
|||
['verify']
|
||||
);
|
||||
|
||||
if (
|
||||
!(await crypto.subtle.verify(
|
||||
'NODE-ED25519',
|
||||
key,
|
||||
Buffer.from(signature, 'hex'),
|
||||
Buffer.from(timestamp + JSON.stringify(interaction))
|
||||
))
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
return crypto.subtle.verify(
|
||||
'NODE-ED25519',
|
||||
key,
|
||||
Buffer.from(signature, 'hex'),
|
||||
Buffer.from(timestamp + JSON.stringify(interaction))
|
||||
);
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue