mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-01-20 17:54:39 +00:00
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
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:
parent
cccd9cf094
commit
fc1388d2f4
1 changed files with 9 additions and 7 deletions
|
@ -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" +
|
||||
|
|
Loading…
Reference in a new issue