mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2026-10-05 19:18:26 +00:00
remove the surplus signatures progress bar segments a finalized multisig transaction discards
This commit is contained in:
+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);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user