mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-08-21 12:48:35 -04:00
support reserving exact offer amount by splitting output
This commit is contained in:
parent
0bbb8a4183
commit
722b02f4c9
31 changed files with 424 additions and 173 deletions
|
@ -95,7 +95,7 @@ class DepositListItem {
|
|||
}
|
||||
|
||||
private void updateUsage(int subaddressIndex, List<MoneroTxWallet> cachedTxs) {
|
||||
numTxsWithOutputs = XmrWalletService.getTxsWithIncomingOutputs(addressEntry.getSubaddressIndex(), cachedTxs).size();
|
||||
numTxsWithOutputs = xmrWalletService.getTxsWithIncomingOutputs(addressEntry.getSubaddressIndex(), cachedTxs).size();
|
||||
usage = subaddressIndex == 0 ? "Base address" : numTxsWithOutputs == 0 ? Res.get("funds.deposit.unused") : Res.get("funds.deposit.usedInTx", numTxsWithOutputs);
|
||||
}
|
||||
|
||||
|
@ -143,7 +143,7 @@ class DepositListItem {
|
|||
private MoneroTxWallet getTxWithFewestConfirmations(List<MoneroTxWallet> allIncomingTxs) {
|
||||
|
||||
// get txs with incoming outputs to subaddress index
|
||||
List<MoneroTxWallet> txs = XmrWalletService.getTxsWithIncomingOutputs(addressEntry.getSubaddressIndex(), allIncomingTxs);
|
||||
List<MoneroTxWallet> txs = xmrWalletService.getTxsWithIncomingOutputs(addressEntry.getSubaddressIndex(), allIncomingTxs);
|
||||
|
||||
// get tx with fewest confirmations
|
||||
MoneroTxWallet highestTx = null;
|
||||
|
|
|
@ -312,9 +312,7 @@ public class DepositView extends ActivatableView<VBox, Void> {
|
|||
txsWithIncomingOutputs = xmrWalletService.getTxsWithIncomingOutputs();
|
||||
|
||||
// add available address entries and base address
|
||||
xmrWalletService.getAvailableAddressEntries()
|
||||
.forEach(e -> observableList.add(new DepositListItem(e, xmrWalletService, formatter, txsWithIncomingOutputs)));
|
||||
xmrWalletService.getAddressEntries(XmrAddressEntry.Context.BASE_ADDRESS)
|
||||
xmrWalletService.getAddressEntries()
|
||||
.forEach(e -> observableList.add(new DepositListItem(e, xmrWalletService, formatter, txsWithIncomingOutputs)));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue