followup to display address for watch-only wallets
What changed, and why it matters
This is a small UI follow-up fix that changes when the 'Display Address' button is shown for watch-only wallets. Previously, the button only appeared if all keystores were watch-only software wallets. Now it appears if any keystore is watch-only or a hardware USB device. There is no security issue visible in the change.
No security action needed. Review as normal UI/UX follow-up if desired.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit simplifies a conditional in ReceiveController.java that controls visibility of the displayAddress button. The old logic required all keystores to be SW_WATCH (software watch-only) for the fallback path; the new logic uses anyMatch with an OR for HW_USB or SW_WATCH. This is a follow-up to enable address display for watch-only wallets and appears to be a functional/UI correction rather than a security patch.
Changed components
src/main/java/com/sparrowwallet/sparrow/wallet/ReceiveController.javaInspect captured patch +1 / −2
diff --git a/src/main/java/com/sparrowwallet/sparrow/wallet/ReceiveController.java b/src/main/java/com/sparrowwallet/sparrow/wallet/ReceiveController.java
index 691c5d1..0d15bb0 100644
--- a/src/main/java/com/sparrowwallet/sparrow/wallet/ReceiveController.java
+++ b/src/main/java/com/sparrowwallet/sparrow/wallet/ReceiveController.java
@@ -164,8 +164,7 @@ public class ReceiveController extends WalletFormController implements Initializ
displayAddress.setUserData(addressDevices);
return;
- } else if(currentEntry != null && (wallet.getKeystores().stream().anyMatch(keystore -> keystore.getSource().equals(KeystoreSource.HW_USB))
- || wallet.getKeystores().stream().allMatch(keystore -> keystore.getSource().equals(KeystoreSource.SW_WATCH)))) {
+ } else if(currentEntry != null && wallet.getKeystores().stream().anyMatch(keystore -> keystore.getSource().equals(KeystoreSource.HW_USB) || keystore.getSource().equals(KeystoreSource.SW_WATCH))) {
displayAddress.setVisible(true);
displayAddress.setUserData(null);
return;
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.