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 {
// handle sufficient balance
// sign and post offer if enough funds
boolean hasFundsReserved = openOffer.getReserveTxHash() != null;
boolean hasSufficientBalance = xmrWalletService.getAvailableBalance().compareTo(amountNeeded) >= 0;
if (hasSufficientBalance) {
if (hasFundsReserved || hasSufficientBalance) {
signAndPostOffer(openOffer, true, resultHandler, errorMessageHandler);
return;
} else if (openOffer.getScheduledTxHashes() == null) {