fix npe accessing funding address entry from api
Some checks failed
Codacy Coverage Reporter / Publish coverage (push) Has been cancelled
CodeQL / Analyze (push) Has been cancelled
CI / build (macos-13) (push) Has been cancelled
CI / build (ubuntu-22.04) (push) Has been cancelled
CI / build (windows-latest) (push) Has been cancelled

This commit is contained in:
woodser 2024-12-27 11:57:47 -05:00
parent cccd9cf094
commit fc1388d2f4

View file

@ -124,6 +124,7 @@ public class MakerReserveOfferFunds extends Task<PlaceOfferModel> {
offer.getOfferPayload().setReserveTxKeyImages(reservedKeyImages);
// reset offer funding address entry if unused
if (fundingEntry != null) {
List<MoneroOutputWallet> inputs = model.getXmrWalletService().getOutputs(reservedKeyImages);
boolean usesFundingEntry = false;
for (MoneroOutputWallet input : inputs) {
@ -134,6 +135,7 @@ public class MakerReserveOfferFunds extends Task<PlaceOfferModel> {
}
if (!usesFundingEntry) model.getXmrWalletService().swapAddressEntryToAvailable(offer.getId(), XmrAddressEntry.Context.OFFER_FUNDING);
}
}
complete();
} catch (Throwable t) {
offer.setErrorMessage("An error occurred.\n" +