fix(tss-party): include recovery ID in signature output for EVM transactions
The signature was 64 bytes (r + s) but EVM transactions need 65 bytes (r + s + v). Now the recovery ID is appended to the signature so the frontend can correctly parse and broadcast the transaction. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
b5512d421c
commit
d18733deb1
|
|
@ -484,9 +484,15 @@ func sendResult(publicKey, encryptedShare []byte, partyIndex int) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func sendSignResult(signature []byte, recoveryID int, partyIndex int) {
|
func sendSignResult(signature []byte, recoveryID int, partyIndex int) {
|
||||||
|
// Append recovery ID to signature (r + s + v = 64 + 1 = 65 bytes)
|
||||||
|
// This is needed for EVM transaction signing
|
||||||
|
signatureWithV := make([]byte, len(signature)+1)
|
||||||
|
copy(signatureWithV, signature)
|
||||||
|
signatureWithV[len(signature)] = byte(recoveryID)
|
||||||
|
|
||||||
msg := Message{
|
msg := Message{
|
||||||
Type: "result",
|
Type: "result",
|
||||||
Payload: base64.StdEncoding.EncodeToString(signature),
|
Payload: base64.StdEncoding.EncodeToString(signatureWithV),
|
||||||
PartyIndex: partyIndex,
|
PartyIndex: partyIndex,
|
||||||
}
|
}
|
||||||
data, _ := json.Marshal(msg)
|
data, _ := json.Marshal(msg)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue