mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-12-15 07:52:58 -05:00
Cleanups, better logging
This commit is contained in:
parent
348dfb47b3
commit
23b1adbe7e
6 changed files with 15 additions and 51 deletions
|
|
@ -216,7 +216,7 @@ public final class Offer implements PubKeyProtectedExpirablePayload {
|
|||
availabilityProtocol.cancel();
|
||||
log.error(errorMessage);
|
||||
});
|
||||
availabilityProtocol.checkOfferAvailability();
|
||||
availabilityProtocol.sendOfferAvailabilityRequest();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -38,4 +38,12 @@ public abstract class OfferMessage implements MailMessage {
|
|||
public int networkId() {
|
||||
return networkId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "OfferMessage{" +
|
||||
"networkId=" + networkId +
|
||||
", offerId='" + offerId + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,45 +0,0 @@
|
|||
/*
|
||||
* This file is part of Bitsquare.
|
||||
*
|
||||
* Bitsquare is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* Bitsquare is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with Bitsquare. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package io.bitsquare.trade.protocol.availability.tasks;
|
||||
|
||||
import io.bitsquare.common.taskrunner.Task;
|
||||
import io.bitsquare.common.taskrunner.TaskRunner;
|
||||
import io.bitsquare.trade.protocol.availability.OfferAvailabilityModel;
|
||||
|
||||
public class GetPeerAddress extends Task<OfferAvailabilityModel> {
|
||||
|
||||
public GetPeerAddress(TaskRunner taskHandler, OfferAvailabilityModel model) {
|
||||
super(taskHandler, model);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void run() {
|
||||
try {
|
||||
runInterceptHook();
|
||||
model.setPeerAddress(model.offer.getOffererAddress());
|
||||
complete();
|
||||
} catch (Throwable t) {
|
||||
model.offer.setErrorMessage("An error occurred.\n" +
|
||||
"Error message:\n"
|
||||
+ t.getMessage());
|
||||
|
||||
failed(t);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue