-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
wallet signature issue #16
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I am working on verifying wallet signatures in our backend. Signatures signed using Android Venom wallet are not getting verified with everscale-inpage-provider on backend. The same code base works when using Chrome extension for venom wallet. Any help. Is this a known issue with Venom wallet?
here's is my code for frontend:
const submitWallet = async () => {
console.log(new Address(address));
const providerState = await venomProvider?.getProviderState?.();
console.log(providerState?.permissions);
const publicKey = providerState?.permissions.accountInteraction?.publicKey;
console.log(publicKey);
try {
const base64 = btoa(
JSON.stringify({
walletAddress: address,
}),
);
const sign = await venomProvider.signDataRaw({ data: base64, publicKey });
dispatch(SubmitWallet({ publicKey, base64, signature: sign.signature }));
} catch (errr) {
console.log(errr);
}
};
and my backend code:
const { publicKey, base64, signature } = req.body;
const verificaiton = await ever.verifySignature({
publicKey,
dataHash: base64,
signature: signature,
});
if (!verificaiton.isValid) {
return res.status(403).json({
error: "Signature is not valid",
});
}
The text was updated successfully, but these errors were encountered: