mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2024-11-04 21:36:45 +00:00
fix adding new payment tabs, update last used label on connection
This commit is contained in:
parent
11189bc605
commit
65e13d7b50
2 changed files with 9 additions and 4 deletions
|
@ -304,4 +304,9 @@ public class ReceiveController extends WalletFormController implements Initializ
|
|||
public void usbDevicesFound(UsbDeviceEvent event) {
|
||||
updateDisplayAddress(event.getDevices());
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
public void connection(ConnectionEvent event) {
|
||||
updateLastUsed();
|
||||
}
|
||||
}
|
|
@ -478,6 +478,10 @@ public class SendController extends WalletFormController implements Initializabl
|
|||
}
|
||||
|
||||
public void updateTransaction(List<Payment> transactionPayments) {
|
||||
if(walletTransactionService != null && walletTransactionService.isRunning()) {
|
||||
walletTransactionService.cancel();
|
||||
}
|
||||
|
||||
try {
|
||||
List<Payment> payments = transactionPayments != null ? transactionPayments : getPayments();
|
||||
if(!userFeeSet.get() || (getFeeValueSats() != null && getFeeValueSats() > 0)) {
|
||||
|
@ -489,10 +493,6 @@ public class SendController extends WalletFormController implements Initializabl
|
|||
boolean includeMempoolOutputs = Config.get().isIncludeMempoolOutputs();
|
||||
boolean includeSpentMempoolOutputs = includeSpentMempoolOutputsProperty.get();
|
||||
|
||||
if(walletTransactionService != null && walletTransactionService.isRunning()) {
|
||||
walletTransactionService.cancel();
|
||||
}
|
||||
|
||||
walletTransactionService = new WalletTransactionService(wallet, getUtxoSelectors(), getUtxoFilters(), payments, feeRate, getMinimumFeeRate(), userFee, currentBlockHeight, groupByAddress, includeMempoolOutputs, includeSpentMempoolOutputs);
|
||||
walletTransactionService.setOnSucceeded(event -> {
|
||||
walletTransactionProperty.setValue(walletTransactionService.getValue());
|
||||
|
|
Loading…
Reference in a new issue