mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2024-12-24 12:46:45 +00:00
set transaction label on soroban collaborative transactions
This commit is contained in:
parent
e438389953
commit
cbfb7230a8
1 changed files with 6 additions and 0 deletions
|
@ -1634,6 +1634,12 @@ public class SendController extends WalletFormController implements Initializabl
|
|||
}
|
||||
Optional<Transaction> optTransaction = initiatorDialog.showAndWait();
|
||||
if(optTransaction.isPresent()) {
|
||||
BlockTransaction blockTransaction = walletForm.getWallet().getWalletTransaction(optTransaction.get().getTxId());
|
||||
if(blockTransaction != null && blockTransaction.getLabel() == null && walletTransactionProperty.get() != null) {
|
||||
blockTransaction.setLabel(walletTransactionProperty.get().getPayments().stream().map(Payment::getLabel).findFirst().orElse(null));
|
||||
TransactionEntry transactionEntry = new TransactionEntry(walletForm.getWallet(), blockTransaction, Collections.emptyMap(), Collections.emptyMap());
|
||||
EventManager.get().post(new WalletEntryLabelsChangedEvent(walletForm.getWallet(), List.of(transactionEntry)));
|
||||
}
|
||||
clear(null);
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue