mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2025-01-26 02:11:10 +00:00
show input label in input tooltip on transaction diagram if present
This commit is contained in:
parent
ea23bb51d9
commit
e92d0f9b58
1 changed files with 8 additions and 2 deletions
|
@ -432,8 +432,14 @@ public class TransactionDiagram extends GridPane {
|
||||||
if(walletNode != null) {
|
if(walletNode != null) {
|
||||||
inputValue = input.getValue();
|
inputValue = input.getValue();
|
||||||
Wallet nodeWallet = walletNode.getWallet();
|
Wallet nodeWallet = walletNode.getWallet();
|
||||||
tooltip.setText("Spending " + getSatsValue(inputValue) + " sats from " + (isFinal() ? nodeWallet.getFullDisplayName() : (nodeWallet.isNested() ? nodeWallet.getDisplayName() : "")) + " " + walletNode + "\n" +
|
StringJoiner joiner = new StringJoiner("\n");
|
||||||
input.getHashAsString() + ":" + input.getIndex() + "\n" + walletNode.getAddress());
|
joiner.add("Spending " + getSatsValue(inputValue) + " sats from " + (isFinal() ? nodeWallet.getFullDisplayName() : (nodeWallet.isNested() ? nodeWallet.getDisplayName() : "")) + " " + walletNode);
|
||||||
|
joiner.add(input.getHashAsString() + ":" + input.getIndex());
|
||||||
|
joiner.add(walletNode.getAddress().toString());
|
||||||
|
if(input.getLabel() != null) {
|
||||||
|
joiner.add(input.getLabel());
|
||||||
|
}
|
||||||
|
tooltip.setText(joiner.toString());
|
||||||
tooltip.getStyleClass().add("input-label");
|
tooltip.getStyleClass().add("input-label");
|
||||||
|
|
||||||
if(input.getLabel() == null || input.getLabel().isEmpty()) {
|
if(input.getLabel() == null || input.getLabel().isEmpty()) {
|
||||||
|
|
Loading…
Reference in a new issue