Only store recipient if there were changes

This commit is contained in:
AsamK 2021-11-19 17:17:13 +01:00
parent c9dffe47f6
commit 415b65d208
8 changed files with 107 additions and 8 deletions

View file

@ -17,6 +17,7 @@ import org.slf4j.LoggerFactory;
import java.util.Base64;
import java.util.List;
import java.util.UUID;
import java.util.stream.Collectors;
public class ListIdentitiesCommand implements JsonRpcLocalCommand {
@ -67,7 +68,7 @@ public class ListIdentitiesCommand implements JsonRpcLocalCommand {
var safetyNumber = Util.formatSafetyNumber(id.safetyNumber());
var scannableSafetyNumber = id.scannableSafetyNumber();
return new JsonIdentity(address.getNumber().orElse(null),
address.getUuid().toString(),
address.getUuid().map(UUID::toString).orElse(null),
Hex.toString(id.getFingerprint()),
safetyNumber,
scannableSafetyNumber == null