From 1c27092c6112ba27c91a413738f4a83c7a5dda24 Mon Sep 17 00:00:00 2001 From: saratnt Date: Mon, 29 Jun 2026 11:39:47 +0200 Subject: [PATCH] Fix in signature for downloading report --- wallet/app/authority_client.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wallet/app/authority_client.go b/wallet/app/authority_client.go index 196f0e4..6060165 100644 --- a/wallet/app/authority_client.go +++ b/wallet/app/authority_client.go @@ -88,7 +88,8 @@ func (c *AuthorityClient) FetchReport(ctx context.Context, reportIDHex string, n } msg := authorityapi.BuildMessage(c.ChainID, c.AppID, reportID, nonceBytes) - hash := ethCrypto.Keccak256Hash(msg) + prefix := fmt.Sprintf("\x19Ethereum Signed Message:\n%d", len(msg)) + hash := ethCrypto.Keccak256Hash([]byte(prefix), msg) sig, err := ethCrypto.Sign(hash.Bytes(), c.KeySecp.PrivateKey) if err != nil {