mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-24 07:07:43 +01:00
Add CreateOfferService class
This commit is contained in:
parent
f6b097235f
commit
838113f986
2 changed files with 49 additions and 1 deletions
44
core/src/main/java/bisq/core/offer/CreateOfferService.java
Normal file
44
core/src/main/java/bisq/core/offer/CreateOfferService.java
Normal 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
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
}
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue