Closed starker-xp closed 10 months ago
It seems like the error has expected
and received
mixed up, but your issue is that the signature is incorrect. Are you sure the signature hardcoded in should use recoverSignature method with object
is the one returned by should use createSignature method with object
?
I've just edited the signature hardcoded with the correct value. Sorry
The sign
function already encodes the message into the EIP-151 format https://web3js.readthedocs.io/en/v1.2.11/web3-eth-accounts.html#sign. If you remove your encodeDefunct
function it will work.
I'm trying to integrate Siwe into my signature system. I want to be able to do a server signature using siwe even if it's not very useful. But now I've been stalling for a week, what haven't I understood?
Thanks in advance Here is my code :
My unit test give me : ● SiweService › should use recoverSignature method with object