transaction tree label tweaks

This commit is contained in:
Craig Raw 2024-01-18 09:00:39 +02:00
parent 4d587cf776
commit 1d2081d2a6
2 changed files with 5 additions and 1 deletions

View file

@ -73,6 +73,10 @@ public class InputForm extends IndexedTransactionForm {
} }
public String toString() { public String toString() {
if(getTransactionInput().isCoinBase()) {
return "Coinbase";
}
TransactionOutPoint outPoint = getTransactionInput().getOutpoint(); TransactionOutPoint outPoint = getTransactionInput().getOutpoint();
return outPoint.getHash().toString().substring(0, 8) + "..:" + outPoint.getIndex(); return outPoint.getHash().toString().substring(0, 8) + "..:" + outPoint.getIndex();
} }

View file

@ -83,7 +83,7 @@ public class OutputForm extends IndexedTransactionForm {
return new Label(payment.getLabel() != null && payment.getType() != Payment.Type.FAKE_MIX && payment.getType() != Payment.Type.MIX ? payment.getLabel() : payment.getAddress().toString(), return new Label(payment.getLabel() != null && payment.getType() != Payment.Type.FAKE_MIX && payment.getType() != Payment.Type.MIX ? payment.getLabel() : payment.getAddress().toString(),
GlyphUtils.getOutputGlyph(getWalletTransaction(), payment)); GlyphUtils.getOutputGlyph(getWalletTransaction(), payment));
} else if(output instanceof WalletTransaction.ChangeOutput changeOutput) { } else if(output instanceof WalletTransaction.ChangeOutput changeOutput) {
return new Label(changeOutput.getWalletNode().getAddress().toString(), GlyphUtils.getChangeGlyph()); return new Label("Change", GlyphUtils.getChangeGlyph());
} }
} }
} }