From e242ae4a4e0ed8f8cfb30d65eb5d302a19114716 Mon Sep 17 00:00:00 2001 From: thecockatiel Date: Sun, 5 Jan 2025 13:47:51 +0330 Subject: [PATCH] fix: make getShortId return first chunk if a separator is present and the chunk is <= 8 characters long --- common/src/main/java/bisq/common/util/Utilities.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/src/main/java/bisq/common/util/Utilities.java b/common/src/main/java/bisq/common/util/Utilities.java index 87125850fe..a92c16b105 100644 --- a/common/src/main/java/bisq/common/util/Utilities.java +++ b/common/src/main/java/bisq/common/util/Utilities.java @@ -485,7 +485,7 @@ public class Utilities { @SuppressWarnings("SameParameterValue") public static String getShortId(String id, String sep) { String[] chunks = id.split(sep); - if (chunks.length > 0) + if (chunks.length > 1 && chunks[0].length() <= 8) return chunks[0]; else return id.substring(0, Math.min(8, id.length()));