fix legacy app freeze if insufficient funds to schedule offer

This commit is contained in:
woodser 2022-07-23 12:52:39 -04:00
parent a8c99ddad9
commit 3f25a756ea

View file

@ -692,7 +692,7 @@ public class OpenOfferManager implements PeerManager.Listener, DecryptedDirectMe
}
if (scheduledAmount.compareTo(offerReserveAmount) >= 0) break;
}
if (scheduledAmount.compareTo(offerReserveAmount) < 0) throw new Error("Not enough funds to schedule offer");
if (scheduledAmount.compareTo(offerReserveAmount) < 0) throw new RuntimeException("Not enough funds to schedule offer");
// schedule txs
openOffer.setScheduledTxHashes(scheduledTxHashes);