diff --git a/security/src/main/java/bisq/security/KeyPairService.java b/security/src/main/java/bisq/security/KeyPairService.java index 9cb35be62e..b8f02249c8 100644 --- a/security/src/main/java/bisq/security/KeyPairService.java +++ b/security/src/main/java/bisq/security/KeyPairService.java @@ -84,7 +84,7 @@ public void persistKeyPair(String keyId, KeyPair keyPair) { synchronized (persistableStore) { persistableStore.put(keyId, keyPair); } - persist(); + persist().join(); } public CompletableFuture getOrCreateKeyPairAsync(String keyId) { @@ -95,7 +95,7 @@ public CompletableFuture getOrCreateKeyPairAsync(String keyId) { synchronized (persistableStore) { persistableStore.put(keyId, keyPair); } - persist(); + persist().join(); return keyPair; } catch (GeneralSecurityException e) { e.printStackTrace();