Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xdr, keypair: Add helpers to create CAP-40 decorated signatures #4302

Merged
merged 8 commits into from
Mar 23, 2022
Prev Previous commit
Next Next commit
Avoid magic constants
Co-authored-by: Leigh McCulloch <[email protected]>
  • Loading branch information
Shaptic and leighmcculloch committed Mar 23, 2022
commit 0498dc686f6fe50c6b51478c3c252236bc98efd6
2 changes: 1 addition & 1 deletion xdr/decorated_signature.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func NewDecoratedSignatureForPayload(
hint := [4]byte{}
// copy the last four bytes of the payload into the hint
if len(payload) >= len(hint) {
copy(hint[:], payload[len(payload)-4:])
copy(hint[:], payload[len(payload)-len(hint):])
} else {
copy(hint[:], payload[:])
}
Expand Down