fix re-signing offers with inexact amount reserved

This commit is contained in:
woodser 2024-08-01 10:13:39 -04:00
parent 2e57e6197d
commit 9004c7f32a

View file

@ -962,9 +962,10 @@ public class OpenOfferManager implements PeerManager.Listener, DecryptedDirectMe
} }
} else { } else {
// handle sufficient balance // sign and post offer if enough funds
boolean hasFundsReserved = openOffer.getReserveTxHash() != null;
boolean hasSufficientBalance = xmrWalletService.getAvailableBalance().compareTo(amountNeeded) >= 0; boolean hasSufficientBalance = xmrWalletService.getAvailableBalance().compareTo(amountNeeded) >= 0;
if (hasSufficientBalance) { if (hasFundsReserved || hasSufficientBalance) {
signAndPostOffer(openOffer, true, resultHandler, errorMessageHandler); signAndPostOffer(openOffer, true, resultHandler, errorMessageHandler);
return; return;
} else if (openOffer.getScheduledTxHashes() == null) { } else if (openOffer.getScheduledTxHashes() == null) {