Hello everyone I tried several times to sign a message but I end up with this error Fail with error 'ECDSA: invalid signature length'
within the transaction on the BSC Scan (https://testnet.bscscan.com/tx/0xfda2c59841fdf3401499cf304bcb8d158fb4e08c58369fdbd5f0781b5a1e88e5). Here is the code I use to sign the transaction:
private static async Task<byte[]> signMessage(string ethAddress, int nonce, int finalScore)
{
try
{
string message = ethAddress + nonce + finalScore;
string signature = await WalletConnect.ActiveSession.EthPersonalSign(ethAddress, message);
return Encoding.UTF8.GetBytes(signature);
}
catch (Exception e)
{
// await WalletConnect.ActiveSession.Disconnect();
throw new Exception(e.Message);
}
}
Discussion, suggestions and corrections are all welcomed.