mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2024-12-24 12:46:45 +00:00
cpfp follow up
This commit is contained in:
parent
4567f62ef8
commit
23c802bb5f
1 changed files with 8 additions and 1 deletions
|
@ -650,7 +650,6 @@ public class SendController extends WalletFormController implements Initializabl
|
||||||
List<BlockTransaction> unconfirmedUtxoTxs = walletTransaction.getSelectedUtxos().keySet().stream().filter(ref -> ref.getHeight() <= 0)
|
List<BlockTransaction> unconfirmedUtxoTxs = walletTransaction.getSelectedUtxos().keySet().stream().filter(ref -> ref.getHeight() <= 0)
|
||||||
.map(ref -> getWalletForm().getWallet().getTransactions().get(ref.getHash())).filter(Objects::nonNull).distinct().collect(Collectors.toList());
|
.map(ref -> getWalletForm().getWallet().getTransactions().get(ref.getHash())).filter(Objects::nonNull).distinct().collect(Collectors.toList());
|
||||||
if(!unconfirmedUtxoTxs.isEmpty()) {
|
if(!unconfirmedUtxoTxs.isEmpty()) {
|
||||||
cpfpFeeRate.setVisible(true);
|
|
||||||
long utxoTxFee = unconfirmedUtxoTxs.stream().mapToLong(BlockTransaction::getFee).sum();
|
long utxoTxFee = unconfirmedUtxoTxs.stream().mapToLong(BlockTransaction::getFee).sum();
|
||||||
double utxoTxSize = unconfirmedUtxoTxs.stream().mapToDouble(blkTx -> blkTx.getTransaction().getVirtualSize()).sum();
|
double utxoTxSize = unconfirmedUtxoTxs.stream().mapToDouble(blkTx -> blkTx.getTransaction().getVirtualSize()).sum();
|
||||||
long thisFee = walletTransaction.getFee();
|
long thisFee = walletTransaction.getFee();
|
||||||
|
@ -808,6 +807,7 @@ public class SendController extends WalletFormController implements Initializabl
|
||||||
fee.setText("");
|
fee.setText("");
|
||||||
fee.textProperty().addListener(feeListener);
|
fee.textProperty().addListener(feeListener);
|
||||||
|
|
||||||
|
cpfpFeeRate.setVisible(false);
|
||||||
fiatFeeAmount.setText("");
|
fiatFeeAmount.setText("");
|
||||||
|
|
||||||
userFeeSet.set(false);
|
userFeeSet.set(false);
|
||||||
|
@ -1062,4 +1062,11 @@ public class SendController extends WalletFormController implements Initializabl
|
||||||
public void includeMempoolOutputsChangedEvent(IncludeMempoolOutputsChangedEvent event) {
|
public void includeMempoolOutputsChangedEvent(IncludeMempoolOutputsChangedEvent event) {
|
||||||
updateTransaction();
|
updateTransaction();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Subscribe
|
||||||
|
public void newBlock(NewBlockEvent event) {
|
||||||
|
if(cpfpFeeRate.isVisible()) {
|
||||||
|
updateTransaction();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue