From 40e06b96a95d45327b52097a36ce9f0816554b77 Mon Sep 17 00:00:00 2001 From: Craig Raw Date: Thu, 16 Dec 2021 12:54:11 +0200 Subject: [PATCH] only follow paynym if bip47 wallet is loaded --- .../sparrowwallet/sparrow/soroban/CounterpartyController.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/sparrowwallet/sparrow/soroban/CounterpartyController.java b/src/main/java/com/sparrowwallet/sparrow/soroban/CounterpartyController.java index 46d76d15..0ed6d0b6 100644 --- a/src/main/java/com/sparrowwallet/sparrow/soroban/CounterpartyController.java +++ b/src/main/java/com/sparrowwallet/sparrow/soroban/CounterpartyController.java @@ -333,7 +333,7 @@ public class CounterpartyController extends SorobanController { } private void followPaymentCode(Soroban soroban, PaymentCode paymentCodeInitiator) { - if(Config.get().isUsePayNym()) { + if(Config.get().isUsePayNym() && soroban.getHdWallet() != null) { soroban.getAuthToken(new HashMap<>()).subscribe(authToken -> { String signature = soroban.getSignature(authToken); soroban.followPaymentCode(paymentCodeInitiator, authToken, signature).subscribe(followMap -> { @@ -341,6 +341,8 @@ public class CounterpartyController extends SorobanController { }, error -> { log.warn("Could not follow payment code", error); }); + }, error -> { + log.warn("Could not follow payment code", error); }); } }