Add CreateOfferService class

This commit is contained in:
chimp1984 2019-11-14 21:31:01 -05:00
parent f6b097235f
commit 838113f986
No known key found for this signature in database
GPG key ID: 9801B4EC591F90E3
2 changed files with 49 additions and 1 deletions

View file

@ -0,0 +1,44 @@
/*
* This file is part of Bisq.
*
* Bisq 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.
*
* Bisq 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 Bisq. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.core.offer;
import javax.inject.Inject;
import javax.inject.Singleton;
import lombok.extern.slf4j.Slf4j;
@Slf4j
@Singleton
public class CreateOfferService {
///////////////////////////////////////////////////////////////////////////////////////////
// Constructor, Initialization
///////////////////////////////////////////////////////////////////////////////////////////
@Inject
public CreateOfferService() {
}
///////////////////////////////////////////////////////////////////////////////////////////
// API
///////////////////////////////////////////////////////////////////////////////////////////
}

View file

@ -35,6 +35,7 @@ import bisq.core.locale.Res;
import bisq.core.locale.TradeCurrency;
import bisq.core.monetary.Price;
import bisq.core.monetary.Volume;
import bisq.core.offer.CreateOfferService;
import bisq.core.offer.Offer;
import bisq.core.offer.OfferPayload;
import bisq.core.offer.OfferUtil;
@ -95,6 +96,7 @@ import javax.annotation.Nullable;
import static com.google.common.base.Preconditions.checkNotNull;
public abstract class MutableOfferDataModel extends OfferDataModel implements BsqBalanceListener {
private final CreateOfferService createOfferService;
protected final OpenOfferManager openOfferManager;
private final BsqWalletService bsqWalletService;
private final Preferences preferences;
@ -149,7 +151,8 @@ public abstract class MutableOfferDataModel extends OfferDataModel implements Bs
///////////////////////////////////////////////////////////////////////////////////////////
@Inject
public MutableOfferDataModel(OpenOfferManager openOfferManager,
public MutableOfferDataModel(CreateOfferService createOfferService,
OpenOfferManager openOfferManager,
BtcWalletService btcWalletService,
BsqWalletService bsqWalletService,
Preferences preferences,
@ -166,6 +169,7 @@ public abstract class MutableOfferDataModel extends OfferDataModel implements Bs
MakerFeeProvider makerFeeProvider,
Navigation navigation) {
super(btcWalletService);
this.createOfferService = createOfferService;
this.openOfferManager = openOfferManager;
this.bsqWalletService = bsqWalletService;