mirror of
https://github.com/bisq-network/bisq.git
synced 2024-11-19 01:41:11 +01:00
Remove redundant OpenOffer intial state constructor
The inital state is always OpenOffer.State.AVAILABLE.
This commit is contained in:
parent
a127cde9ac
commit
ecb667c85d
@ -91,13 +91,6 @@ public final class OpenOffer implements Tradable {
|
||||
this(offer, 0);
|
||||
}
|
||||
|
||||
public OpenOffer(Offer offer, State state) {
|
||||
this.offer = offer;
|
||||
this.triggerPrice = 0;
|
||||
this.state = state;
|
||||
arbitratorNodeAddress = null;
|
||||
}
|
||||
|
||||
public OpenOffer(Offer offer, long triggerPrice) {
|
||||
this.offer = offer;
|
||||
this.triggerPrice = triggerPrice;
|
||||
|
@ -367,7 +367,7 @@ public class OpenBsqSwapOfferService {
|
||||
|
||||
checkArgument(!openOffer.isDeactivated(),
|
||||
"We must not get called at redoProofOrWorkAndRepublish if offer was deactivated");
|
||||
OpenOffer newOpenOffer = new OpenOffer(newOffer, OpenOffer.State.AVAILABLE);
|
||||
OpenOffer newOpenOffer = new OpenOffer(newOffer);
|
||||
if (!newOpenOffer.isDeactivated()) {
|
||||
openOfferManager.maybeRepublishOffer(newOpenOffer);
|
||||
}
|
||||
|
@ -35,12 +35,6 @@ public class FeeValidationTests {
|
||||
assertThat(openOffer.getFeeValidationStatus(), is(equalTo(FeeValidationStatus.NOT_CHECKED_YET)));
|
||||
}
|
||||
|
||||
@Test
|
||||
void createOpenBsqOfferWithSecondConstructor() {
|
||||
var openOffer = new OpenOffer(mock(Offer.class), OpenOffer.State.AVAILABLE);
|
||||
assertThat(openOffer.getFeeValidationStatus(), is(equalTo(FeeValidationStatus.NOT_CHECKED_YET)));
|
||||
}
|
||||
|
||||
@Test
|
||||
void createOpenOfferWithTriggerPrice() {
|
||||
var openOffer = new OpenOffer(mock(Offer.class), 42_000);
|
||||
|
Loading…
Reference in New Issue
Block a user