mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2024-12-24 12:46:45 +00:00
use address node map to optimize transaction diagram and privacy analysis
This commit is contained in:
parent
e42fc9a033
commit
486027f153
2 changed files with 2 additions and 2 deletions
|
@ -659,7 +659,7 @@ public class TransactionDiagram extends GridPane {
|
|||
recipientLabel.getStyleClass().add("output-label");
|
||||
recipientLabel.getStyleClass().add(labelledPayment ? "payment-label" : "recipient-label");
|
||||
Wallet toWallet = getToWallet(payment);
|
||||
WalletNode toNode = walletTx.getWallet() != null && !walletTx.getWallet().isBip47() ? walletTx.getWallet().getWalletAddresses().get(payment.getAddress()) : null;
|
||||
WalletNode toNode = walletTx.getWallet() != null && !walletTx.getWallet().isBip47() ? walletTx.getAddressNodeMap(walletTx.getWallet()).get(payment.getAddress()) : null;
|
||||
Wallet toBip47Wallet = getBip47SendWallet(payment);
|
||||
Tooltip recipientTooltip = new Tooltip((toWallet == null ? (toNode != null ? "Consolidate " : "Pay ") : "Receive ")
|
||||
+ getSatsValue(payment.getAmount()) + " sats to "
|
||||
|
|
|
@ -1639,7 +1639,7 @@ public class SendController extends WalletFormController implements Initializabl
|
|||
public PrivacyAnalysisTooltip(WalletTransaction walletTransaction) {
|
||||
List<Payment> payments = walletTransaction.getPayments();
|
||||
List<Payment> userPayments = payments.stream().filter(payment -> payment.getType() != Payment.Type.FAKE_MIX).collect(Collectors.toList());
|
||||
Map<Address, WalletNode> walletAddresses = getWalletForm().getWallet().getWalletAddresses();
|
||||
Map<Address, WalletNode> walletAddresses = walletTransaction.getAddressNodeMap(walletTransaction.getWallet());
|
||||
OptimizationStrategy optimizationStrategy = getPreferredOptimizationStrategy();
|
||||
boolean payNymPresent = isPayNymMixOnlyPayment(payments);
|
||||
boolean fakeMixPresent = payments.stream().anyMatch(payment -> payment.getType() == Payment.Type.FAKE_MIX);
|
||||
|
|
Loading…
Reference in a new issue