Verify failed signature


I use the isValidSignatureNow function in the smart contract to check the signature.
image
This is function hash message and sign message

This is function for test but result always false. I need support .
This is account from hardhat node i use.

There is currently more than $2800 worth of ETH in that account:
image

And someone's gonna use your private key to steal them before you know it!

1 Like

Oh, hang on, that's just the current price of 1 ETH, and you only have $0.03 worth of ETH in there.
In either case, you should avoid revealing your private key in public (it's called private for a reason).

1 Like

Thanks for your suggestions, I will learn from the experience for next time

So,

You create a random wallet when signing seems a bit odd,

Because the contract function you wrote to verify the signature uses the msg.sender, and as you are not setting it the call is made with the default caller