mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-24 15:10:44 +01:00
Rename ProposalCollectionsService to ProposalService
This commit is contained in:
parent
124199d0aa
commit
05b120fd03
7 changed files with 31 additions and 31 deletions
|
@ -49,7 +49,7 @@ import bisq.core.btc.wallet.WalletsManager;
|
|||
import bisq.core.btc.wallet.WalletsSetup;
|
||||
import bisq.core.dao.DaoManager;
|
||||
import bisq.core.dao.vote.blindvote.BlindVoteService;
|
||||
import bisq.core.dao.vote.proposal.ProposalCollectionsService;
|
||||
import bisq.core.dao.vote.proposal.ProposalService;
|
||||
import bisq.core.filter.FilterManager;
|
||||
import bisq.core.locale.CurrencyUtil;
|
||||
import bisq.core.locale.Res;
|
||||
|
@ -229,7 +229,7 @@ public class BisqApp extends Application {
|
|||
persistedDataHosts.add(injector.getInstance(FailedTradesManager.class));
|
||||
persistedDataHosts.add(injector.getInstance(DisputeManager.class));
|
||||
persistedDataHosts.add(injector.getInstance(P2PService.class));
|
||||
persistedDataHosts.add(injector.getInstance(ProposalCollectionsService.class));
|
||||
persistedDataHosts.add(injector.getInstance(ProposalService.class));
|
||||
persistedDataHosts.add(injector.getInstance(BlindVoteService.class));
|
||||
|
||||
// we apply at startup the reading of persisted data but don't want to get it triggered in the constructor
|
||||
|
|
|
@ -31,8 +31,8 @@ import bisq.core.dao.blockchain.ReadableBsqBlockChain;
|
|||
import bisq.core.dao.blockchain.vo.BsqBlock;
|
||||
import bisq.core.dao.vote.DaoPeriodService;
|
||||
import bisq.core.dao.vote.proposal.Proposal;
|
||||
import bisq.core.dao.vote.proposal.ProposalCollectionsService;
|
||||
import bisq.core.dao.vote.proposal.ProposalPayload;
|
||||
import bisq.core.dao.vote.proposal.ProposalService;
|
||||
import bisq.core.locale.Res;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
@ -69,7 +69,7 @@ import java.util.stream.Collectors;
|
|||
@FxmlView
|
||||
public abstract class BaseProposalView extends ActivatableView<GridPane, Void> implements BsqBlockChain.Listener {
|
||||
|
||||
protected final ProposalCollectionsService proposalCollectionsService;
|
||||
protected final ProposalService proposalService;
|
||||
protected final ReadableBsqBlockChain readableBsqBlockChain;
|
||||
protected final BsqWalletService bsqWalletService;
|
||||
protected final BsqFormatter bsqFormatter;
|
||||
|
@ -96,12 +96,12 @@ public abstract class BaseProposalView extends ActivatableView<GridPane, Void> i
|
|||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@Inject
|
||||
protected BaseProposalView(ProposalCollectionsService proposalCollectionsService,
|
||||
protected BaseProposalView(ProposalService proposalService,
|
||||
BsqWalletService bsqWalletService,
|
||||
ReadableBsqBlockChain readableBsqBlockChain,
|
||||
DaoPeriodService daoPeriodService,
|
||||
BsqFormatter bsqFormatter) {
|
||||
this.proposalCollectionsService = proposalCollectionsService;
|
||||
this.proposalService = proposalService;
|
||||
this.bsqWalletService = bsqWalletService;
|
||||
this.readableBsqBlockChain = readableBsqBlockChain;
|
||||
this.daoPeriodService = daoPeriodService;
|
||||
|
@ -126,7 +126,7 @@ public abstract class BaseProposalView extends ActivatableView<GridPane, Void> i
|
|||
|
||||
daoPeriodService.getPhaseProperty().addListener(phaseChangeListener);
|
||||
readableBsqBlockChain.addListener(this);
|
||||
proposalCollectionsService.getAllProposals().addListener(proposalListChangeListener);
|
||||
proposalService.getAllProposals().addListener(proposalListChangeListener);
|
||||
|
||||
onPhaseChanged(daoPeriodService.getPhaseProperty().get());
|
||||
|
||||
|
@ -142,7 +142,7 @@ public abstract class BaseProposalView extends ActivatableView<GridPane, Void> i
|
|||
|
||||
daoPeriodService.getPhaseProperty().removeListener(phaseChangeListener);
|
||||
readableBsqBlockChain.removeListener(this);
|
||||
proposalCollectionsService.getAllProposals().removeListener(proposalListChangeListener);
|
||||
proposalService.getAllProposals().removeListener(proposalListChangeListener);
|
||||
|
||||
sortedList.comparatorProperty().unbind();
|
||||
|
||||
|
@ -253,7 +253,7 @@ public abstract class BaseProposalView extends ActivatableView<GridPane, Void> i
|
|||
|
||||
proposalListItems.setAll(list.stream()
|
||||
.map(proposal -> new ProposalListItem(proposal,
|
||||
proposalCollectionsService,
|
||||
proposalService,
|
||||
daoPeriodService,
|
||||
bsqWalletService,
|
||||
readableBsqBlockChain,
|
||||
|
|
|
@ -31,7 +31,7 @@ import bisq.core.dao.vote.BooleanVoteResult;
|
|||
import bisq.core.dao.vote.DaoPeriodService;
|
||||
import bisq.core.dao.vote.VoteResult;
|
||||
import bisq.core.dao.vote.proposal.Proposal;
|
||||
import bisq.core.dao.vote.proposal.ProposalCollectionsService;
|
||||
import bisq.core.dao.vote.proposal.ProposalService;
|
||||
import bisq.core.locale.Res;
|
||||
|
||||
import org.bitcoinj.core.Transaction;
|
||||
|
@ -57,7 +57,7 @@ import lombok.extern.slf4j.Slf4j;
|
|||
public class ProposalListItem implements BsqBlockChain.Listener {
|
||||
@Getter
|
||||
private final Proposal proposal;
|
||||
private final ProposalCollectionsService proposalCollectionsService;
|
||||
private final ProposalService proposalService;
|
||||
private final DaoPeriodService daoPeriodService;
|
||||
private final BsqWalletService bsqWalletService;
|
||||
private final ReadableBsqBlockChain readableBsqBlockChain;
|
||||
|
@ -80,13 +80,13 @@ public class ProposalListItem implements BsqBlockChain.Listener {
|
|||
private Node actionNode;
|
||||
|
||||
ProposalListItem(Proposal proposal,
|
||||
ProposalCollectionsService proposalCollectionsService,
|
||||
ProposalService proposalService,
|
||||
DaoPeriodService daoPeriodService,
|
||||
BsqWalletService bsqWalletService,
|
||||
ReadableBsqBlockChain readableBsqBlockChain,
|
||||
BsqFormatter bsqFormatter) {
|
||||
this.proposal = proposal;
|
||||
this.proposalCollectionsService = proposalCollectionsService;
|
||||
this.proposalService = proposalService;
|
||||
this.daoPeriodService = daoPeriodService;
|
||||
this.bsqWalletService = bsqWalletService;
|
||||
this.readableBsqBlockChain = readableBsqBlockChain;
|
||||
|
@ -131,7 +131,7 @@ public class ProposalListItem implements BsqBlockChain.Listener {
|
|||
case UNDEFINED:
|
||||
break;
|
||||
case PROPOSAL:
|
||||
if (proposalCollectionsService.isMine(proposal)) {
|
||||
if (proposalService.isMine(proposal)) {
|
||||
actionButton.setVisible(!isTxInPastCycle);
|
||||
actionButtonIconView.setVisible(actionButton.isVisible());
|
||||
actionButton.setText(Res.get("shared.remove"));
|
||||
|
|
|
@ -36,7 +36,7 @@ import bisq.core.dao.vote.BooleanVoteResult;
|
|||
import bisq.core.dao.vote.DaoPeriodService;
|
||||
import bisq.core.dao.vote.blindvote.BlindVoteService;
|
||||
import bisq.core.dao.vote.proposal.Proposal;
|
||||
import bisq.core.dao.vote.proposal.ProposalCollectionsService;
|
||||
import bisq.core.dao.vote.proposal.ProposalService;
|
||||
import bisq.core.locale.Res;
|
||||
|
||||
import bisq.common.crypto.CryptoException;
|
||||
|
@ -94,7 +94,7 @@ public class ActiveProposalsView extends BaseProposalView implements BsqBalanceL
|
|||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@Inject
|
||||
private ActiveProposalsView(ProposalCollectionsService voteRequestManger,
|
||||
private ActiveProposalsView(ProposalService voteRequestManger,
|
||||
DaoPeriodService daoPeriodService,
|
||||
BlindVoteService blindVoteService,
|
||||
BsqWalletService bsqWalletService,
|
||||
|
@ -267,7 +267,7 @@ public class ActiveProposalsView extends BaseProposalView implements BsqBalanceL
|
|||
final Proposal proposal = selectedProposalListItem.getProposal();
|
||||
switch (phase) {
|
||||
case PROPOSAL:
|
||||
if (proposalCollectionsService.isMine(proposal)) {
|
||||
if (proposalService.isMine(proposal)) {
|
||||
if (removeButton == null) {
|
||||
removeButton = addButtonAfterGroup(detailsGridPane, proposalDisplay.incrementAndGetGridRow(), Res.get("dao.proposal.active.remove"));
|
||||
removeButton.setOnAction(event -> onRemove());
|
||||
|
@ -326,12 +326,12 @@ public class ActiveProposalsView extends BaseProposalView implements BsqBalanceL
|
|||
|
||||
@Override
|
||||
protected void updateProposalList() {
|
||||
doUpdateProposalList(proposalCollectionsService.getActiveProposals());
|
||||
doUpdateProposalList(proposalService.getActiveProposals());
|
||||
}
|
||||
|
||||
private void updateStateAfterVote() {
|
||||
hideProposalDisplay();
|
||||
proposalCollectionsService.persist();
|
||||
proposalService.persist();
|
||||
proposalTableView.getSelectionModel().clearSelection();
|
||||
}
|
||||
|
||||
|
@ -343,7 +343,7 @@ public class ActiveProposalsView extends BaseProposalView implements BsqBalanceL
|
|||
}
|
||||
|
||||
private void onRemove() {
|
||||
if (proposalCollectionsService.removeProposal(selectedProposalListItem.getProposal()))
|
||||
if (proposalService.removeProposal(selectedProposalListItem.getProposal()))
|
||||
hideProposalDisplay();
|
||||
else
|
||||
new Popup<>().warning(Res.get("dao.proposal.active.remove.failed")).show();
|
||||
|
|
|
@ -24,7 +24,7 @@ import bisq.desktop.util.BsqFormatter;
|
|||
import bisq.core.btc.wallet.BsqWalletService;
|
||||
import bisq.core.dao.blockchain.ReadableBsqBlockChain;
|
||||
import bisq.core.dao.vote.DaoPeriodService;
|
||||
import bisq.core.dao.vote.proposal.ProposalCollectionsService;
|
||||
import bisq.core.dao.vote.proposal.ProposalService;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
|
@ -36,12 +36,12 @@ public class ClosedProposalsView extends BaseProposalView {
|
|||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@Inject
|
||||
private ClosedProposalsView(ProposalCollectionsService proposalCollectionsService,
|
||||
private ClosedProposalsView(ProposalService proposalService,
|
||||
DaoPeriodService daoPeriodService,
|
||||
BsqWalletService bsqWalletService,
|
||||
ReadableBsqBlockChain readableBsqBlockChain,
|
||||
BsqFormatter bsqFormatter) {
|
||||
super(proposalCollectionsService, bsqWalletService, readableBsqBlockChain, daoPeriodService, bsqFormatter);
|
||||
super(proposalService, bsqWalletService, readableBsqBlockChain, daoPeriodService, bsqFormatter);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -64,7 +64,7 @@ public class ClosedProposalsView extends BaseProposalView {
|
|||
|
||||
@Override
|
||||
protected void updateProposalList() {
|
||||
doUpdateProposalList(proposalCollectionsService.getClosedProposals());
|
||||
doUpdateProposalList(proposalService.getClosedProposals());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -33,8 +33,8 @@ import bisq.core.btc.wallet.InsufficientBsqException;
|
|||
import bisq.core.btc.wallet.WalletsSetup;
|
||||
import bisq.core.dao.blockchain.ReadableBsqBlockChain;
|
||||
import bisq.core.dao.vote.proposal.Proposal;
|
||||
import bisq.core.dao.vote.proposal.ProposalCollectionsService;
|
||||
import bisq.core.dao.vote.proposal.ProposalConsensus;
|
||||
import bisq.core.dao.vote.proposal.ProposalService;
|
||||
import bisq.core.dao.vote.proposal.ProposalType;
|
||||
import bisq.core.dao.vote.proposal.ValidationException;
|
||||
import bisq.core.dao.vote.proposal.compensation.CompensationRequestPayload;
|
||||
|
@ -91,7 +91,7 @@ public class MakeProposalView extends ActivatableView<GridPane, Void> {
|
|||
private final WalletsSetup walletsSetup;
|
||||
private final P2PService p2PService;
|
||||
private final FeeService feeService;
|
||||
private final ProposalCollectionsService proposalCollectionsService;
|
||||
private final ProposalService proposalService;
|
||||
private final CompensationRequestService compensationRequestService;
|
||||
private final GenericProposalService genericProposalService;
|
||||
private final ReadableBsqBlockChain readableBsqBlockChain;
|
||||
|
@ -111,7 +111,7 @@ public class MakeProposalView extends ActivatableView<GridPane, Void> {
|
|||
WalletsSetup walletsSetup,
|
||||
P2PService p2PService,
|
||||
FeeService feeService,
|
||||
ProposalCollectionsService proposalCollectionsService,
|
||||
ProposalService proposalService,
|
||||
CompensationRequestService compensationRequestService,
|
||||
GenericProposalService genericProposalService,
|
||||
ReadableBsqBlockChain readableBsqBlockChain,
|
||||
|
@ -121,7 +121,7 @@ public class MakeProposalView extends ActivatableView<GridPane, Void> {
|
|||
this.walletsSetup = walletsSetup;
|
||||
this.p2PService = p2PService;
|
||||
this.feeService = feeService;
|
||||
this.proposalCollectionsService = proposalCollectionsService;
|
||||
this.proposalService = proposalService;
|
||||
this.compensationRequestService = compensationRequestService;
|
||||
this.genericProposalService = genericProposalService;
|
||||
this.readableBsqBlockChain = readableBsqBlockChain;
|
||||
|
@ -185,7 +185,7 @@ public class MakeProposalView extends ActivatableView<GridPane, Void> {
|
|||
txSize / 1000d))
|
||||
.actionButtonText(Res.get("shared.yes"))
|
||||
.onAction(() -> {
|
||||
proposalCollectionsService.publishProposal(proposal,
|
||||
proposalService.publishProposal(proposal,
|
||||
new FutureCallback<Transaction>() {
|
||||
@Override
|
||||
public void onSuccess(@Nullable Transaction transaction) {
|
||||
|
|
|
@ -34,8 +34,8 @@ import bisq.core.dao.vote.BooleanVoteResult;
|
|||
import bisq.core.dao.vote.DaoPeriodService;
|
||||
import bisq.core.dao.vote.VoteResult;
|
||||
import bisq.core.dao.vote.blindvote.BlindVoteService;
|
||||
import bisq.core.dao.vote.proposal.ProposalCollectionsService;
|
||||
import bisq.core.dao.vote.proposal.ProposalList;
|
||||
import bisq.core.dao.vote.proposal.ProposalService;
|
||||
import bisq.core.locale.Res;
|
||||
import bisq.core.user.Preferences;
|
||||
|
||||
|
@ -87,7 +87,7 @@ public class MyVotesView extends BaseProposalView {
|
|||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@Inject
|
||||
private MyVotesView(ProposalCollectionsService voteRequestManger,
|
||||
private MyVotesView(ProposalService voteRequestManger,
|
||||
DaoPeriodService daoPeriodService,
|
||||
BlindVoteService blindVoteService,
|
||||
BsqWalletService bsqWalletService,
|
||||
|
|
Loading…
Add table
Reference in a new issue