apply hide amounts to the transaction hex on the input and output views in the light theme, and to unselected output values when an output is selected
What changed, and why it matters
This commit is a UI polish fix for the 'hide amounts' privacy feature in Sparrow Wallet. It makes sure that when a user has chosen to hide transaction amounts, those amounts stay hidden in the transaction hex view and for unselected outputs. There is no security vulnerability here—just a consistency fix for on-screen display.
No security action needed. Treat as a normal UI bugfix.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The change extends CSS styling classes so that .output-other-value is treated the same as .output-value when the .hide-amounts class is active. It also adds a new overloaded helper method in TransactionHexArea.java to allow selecting a custom ‘other’ style class instead of the hardcoded ‘other’ string. The affected files are all JavaFX CSS and one small controller change. No cryptographic, network, or storage behavior is modified.
Changed components
Transaction hex display UIInput/output view stylingLight/dark theme CSSHide amounts featureInspect captured patch +11 / −5
### src/main/java/com/sparrowwallet/sparrow/control/TransactionHexArea.java
@@ -148,7 +148,7 @@ public List<TransactionSegment> getTransactionSegments(Transaction transaction,
//Outputs
for(int i = 0; i < transaction.getOutputs().size(); i++) {
TransactionOutput output = transaction.getOutputs().get(i);
- cursor = addSegment(segments, cursor, 8 * 2, i, "output-" + getIndexedStyleClass(i, selectedOutputIndex, "value"));
+ cursor = addSegment(segments, cursor, 8 * 2, i, "output-" + getIndexedStyleClass(i, selectedOutputIndex, "value", "other-value"));
VarInt scriptLen = new VarInt(output.getScriptBytes().length);
cursor = addSegment(segments, cursor, scriptLen.getSizeInBytes() * 2, i, "output-" + getIndexedStyleClass(i, selectedOutputIndex, "pubkeyscript-length"));
cursor = addSegment(segments, cursor, (int) scriptLen.value * 2, i, "output-" + getIndexedStyleClass(i, selectedOutputIndex, "pubkeyscript"));
@@ -196,11 +196,15 @@ private int addSegment(List<TransactionSegment> segments, int start, int length,
}
private String getIndexedStyleClass(int iterableIndex, int selectedIndex, String styleClass) {
+ return getIndexedStyleClass(iterableIndex, selectedIndex, styleClass, "other");
+ }
+
+ private String getIndexedStyleClass(int iterableIndex, int selectedIndex, String styleClass, String otherStyleClass) {
if (selectedIndex == -1 || selectedIndex == iterableIndex) {
return styleClass;
}
- return "other";
+ return otherStyleClass;
}
private boolean isSignature(byte[] data) {
### src/main/resources/com/sparrowwallet/sparrow/darktheme.css
@@ -225,7 +225,7 @@ HorizontalHeaderColumn > TableColumnHeader.column-header.table-column{
.root .script-pubkey { -fx-fill: #c678dd }
.root .script-redeem, .root .script-controlblock { -fx-fill: derive(#e06c75, 20%) }
.root .script-other { -fx-fill: #c8ccd4 }
-.root .hide-amounts .output-value { -fx-fill: derive(-fx-control-inner-background, -50%) }
+.root .hide-amounts .output-value, .root .hide-amounts .output-other-value { -fx-fill: derive(-fx-control-inner-background, -50%) }
.root #txhex {
-fx-background-color: derive(-fx-control-inner-background, -50%);
### src/main/resources/com/sparrowwallet/sparrow/transaction/headers.css
@@ -11,7 +11,6 @@
.num-outputs { -fx-fill: color-0 }
.output-value { -fx-fill: color-3 }
-.hide-amounts .output-value { -fx-fill: -fx-control-inner-background }
.output-pubkeyscript-length { -fx-fill: color-3 }
.output-pubkeyscript { -fx-fill: color-3 }
### src/main/resources/com/sparrowwallet/sparrow/transaction/output.css
@@ -11,6 +11,7 @@
.num-outputs { -fx-fill: color-grey }
.output-other { -fx-fill: color-grey }
+.output-other-value { -fx-fill: color-grey }
.output-value { -fx-fill: color-8 }
.output-pubkeyscript-length { -fx-fill: color-6 }
### src/main/resources/com/sparrowwallet/sparrow/transaction/transaction.css
@@ -34,4 +34,6 @@
.change-warning-icon, .payment-warning-icon {
-fx-text-fill: rgb(238, 210, 2);
-}
\ No newline at end of file
+}
+
+.hide-amounts .output-value, .hide-amounts .output-other-value { -fx-fill: -fx-control-inner-background }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.