From 2de68c61d01bf97caa9aa332cf111b0c242e6c3c Mon Sep 17 00:00:00 2001 From: metalurgical <97008724+metalurgical@users.noreply.github.com> Date: Tue, 26 Mar 2024 11:54:24 +0200 Subject: [PATCH] fix: ensure nodeIndexes are sorted --- .../java/com/web3auth/tkey/ThresholdKey/Modules/TSSModule.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tkey/src/main/java/com/web3auth/tkey/ThresholdKey/Modules/TSSModule.java b/tkey/src/main/java/com/web3auth/tkey/ThresholdKey/Modules/TSSModule.java index c14944b..14a23c1 100644 --- a/tkey/src/main/java/com/web3auth/tkey/ThresholdKey/Modules/TSSModule.java +++ b/tkey/src/main/java/com/web3auth/tkey/ThresholdKey/Modules/TSSModule.java @@ -679,7 +679,7 @@ public static TSSPubKeyResult getDkgPubKey(ThresholdKey thresholdKey, String tss String x = result.getFinalKeyData().getX(); String y = result.getFinalKeyData().getY(); List nodeIndexes = result.getNodesData().getNodeIndexes(); - List nodeIndexList = nodeIndexes.stream() + List nodeIndexList = nodeIndexes.stream().sorted() .map(BigInteger::intValue) .collect(Collectors.toList());