mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-28 17:15:14 +01:00
fix: make getShortId return first chunk if a separator is present
and the chunk is <= 8 characters long
This commit is contained in:
parent
f079e26e09
commit
e242ae4a4e
1 changed files with 1 additions and 1 deletions
|
@ -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()));
|
||||
|
|
Loading…
Add table
Reference in a new issue