From a90d553f1ee386d33358934627df4d94d3fe565e Mon Sep 17 00:00:00 2001 From: Craig Raw Date: Mon, 18 Nov 2024 13:05:13 +0200 Subject: [PATCH] fix psbtv2 output amount serialization --- src/main/java/com/sparrowwallet/drongo/psbt/PSBTOutput.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/sparrowwallet/drongo/psbt/PSBTOutput.java b/src/main/java/com/sparrowwallet/drongo/psbt/PSBTOutput.java index d98ae7f..f0e07df 100644 --- a/src/main/java/com/sparrowwallet/drongo/psbt/PSBTOutput.java +++ b/src/main/java/com/sparrowwallet/drongo/psbt/PSBTOutput.java @@ -142,7 +142,7 @@ public class PSBTOutput { if(psbtVersion >= 2) { if(amount != null) { - byte[] amountBytes = new byte[64]; + byte[] amountBytes = new byte[8]; Utils.int64ToByteArrayLE(amount, amountBytes, 0); entries.add(populateEntry(PSBT_OUT_AMOUNT, null, amountBytes)); }