remove the surplus signatures progress bar segments a finalized multisig transaction discards

This commit is contained in:
Craig Raw
2026-09-22 11:27:13 +02:00
parent f7f36d00ca
commit 40f7720635
2 changed files with 9 additions and 1 deletions
+1 -1
Submodule drongo updated: e1c26413e4...d212f4a59e
@@ -49,6 +49,11 @@ public class SignaturesProgressBar extends SegmentedBar<SignaturesProgressBar.Si
int newNumSegments = Math.max(threshold, newSignedKeystores.size());
double newSegmentSize = 100d / newNumSegments;
//Remove any surplus signatures, which a finalized transaction discards once the threshold is met
while(getSegments().size() > newNumSegments) {
getSegments().remove(getSegments().size() - 1);
}
for(int i = 0; i < newNumSegments; i++) {
SignatureProgressSegment segment = null;
if(i < getSegments().size()) {
@@ -144,6 +149,9 @@ public class SignaturesProgressBar extends SegmentedBar<SignaturesProgressBar.Si
);
timeline.setCycleCount(1);
timeline.play();
} else if(newValue == null) {
//A signature discarded on finalization or superseded by a lesser signed input leaves the segment empty
progressBar.setProgress(0.0);
}
});
}