Renaming, cleanup, small fixes

This commit is contained in:
Manfred Karrer 2018-06-28 12:42:14 +02:00
parent c9b65fcc19
commit 60e58f7bcb
No known key found for this signature in database
GPG key ID: 401250966A6B2C46
5 changed files with 6 additions and 14 deletions

View file

@ -73,7 +73,6 @@ public class DaoView extends ActivatableViewAndModel<TabPane, Activatable> {
bondingTab = new Tab(Res.get("dao.tab.bonding"));
proposalsTab.setClosable(false);
votingTab.setClosable(false);
//TODO
root.getTabs().addAll(proposalsTab, votingTab, bondingTab);
if (!BisqEnvironment.isDAOActivatedAndBaseCurrencySupportingBsq() || !DevEnv.isDaoPhase2Activated()) {

View file

@ -28,24 +28,19 @@ import bisq.desktop.main.funds.deposit.DepositView;
import bisq.desktop.main.overlays.popups.Popup;
import bisq.desktop.util.GUIUtil;
import bisq.desktop.util.Layout;
import bisq.desktop.util.validation.BsqAddressValidator;
import bisq.desktop.util.validation.BsqValidator;
import bisq.core.btc.Restrictions;
import bisq.core.btc.wallet.BsqBalanceListener;
import bisq.core.btc.wallet.BsqWalletService;
import bisq.core.btc.wallet.BtcWalletService;
import bisq.core.btc.wallet.WalletsManager;
import bisq.core.btc.wallet.WalletsSetup;
import bisq.core.dao.DaoFacade;
import bisq.core.dao.voting.proposal.param.Param;
import bisq.core.locale.Res;
import bisq.core.util.BSFormatter;
import bisq.core.util.BsqFormatter;
import bisq.network.p2p.P2PService;
import org.bitcoinj.core.Address;
import org.bitcoinj.core.Coin;
import org.bitcoinj.core.InsufficientMoneyException;
@ -84,16 +79,12 @@ public class LockupBSQView extends ActivatableView<GridPane, Void> implements Bs
@Inject
private LockupBSQView(BsqWalletService bsqWalletService,
BtcWalletService btcWalletService,
WalletsManager walletsManager,
WalletsSetup walletsSetup,
P2PService p2PService,
BsqFormatter bsqFormatter,
BSFormatter btcFormatter,
Navigation navigation,
BsqBalanceUtil bsqBalanceUtil,
BsqValidator bsqValidator,
BsqAddressValidator bsqAddressValidator,
DaoFacade daoFacade) {
this.bsqWalletService = bsqWalletService;
this.walletsSetup = walletsSetup;
@ -118,7 +109,7 @@ public class LockupBSQView extends ActivatableView<GridPane, Void> implements Bs
amountInputTextField.setValidator(bsqValidator);
timeInputTextField = addLabelInputTextField(root, ++gridRow, Res.get("dao.bonding.lock.time"), Layout.GRID_GAP).second;
timeInputTextField.setPromptText(Res.get("dao.bonding.lock.setTime",
Param.LOCKTIME_MIN.getDefaultValue(), Param.LOCKTIME_MAX.getDefaultValue()));
Param.LOCK_TIME_MIN.getDefaultValue(), Param.LOCK_TIME_MAX.getDefaultValue()));
// TODO: add some int validator
// timeInputTextField.setValidator(bsqValidator);

View file

@ -124,7 +124,7 @@ class LockedBsqTxListItem {
}
public boolean isLockedAndUnspent() {
return !isSpent() && getTxType() == TxType.LOCK_UP;
return !isSpent() && getTxType() == TxType.LOCKUP;
}
public void cleanup() {

View file

@ -101,7 +101,7 @@ public class UnlockBSQView extends ActivatableView<GridPane, Void> implements Bs
private final Navigation navigation;
private int gridRow = 0;
private boolean synched;
private boolean synced;
private LockedBsqTxListItem selectedItem;
private final ObservableList<LockedBsqTxListItem> observableList = FXCollections.observableArrayList();
@ -403,7 +403,7 @@ public class UnlockBSQView extends ActivatableView<GridPane, Void> implements Bs
final int bsqBlockChainHeight = daoFacade.getChainHeight();
final int bsqWalletChainHeight = bsqWalletService.getBestChainHeight();
if (bsqWalletChainHeight > 0) {
synched = bsqWalletChainHeight == bsqBlockChainHeight;
synced = bsqWalletChainHeight == bsqBlockChainHeight;
}
updateList();
}

View file

@ -77,6 +77,8 @@ public class BsqBalanceUtil implements BsqBalanceListener {
lockedInBondsBalanceTextField.setMaxWidth(confirmedBalanceTextField.getMaxWidth());
lockedInBondsBalanceTextField.setAlignment(Pos.CENTER_RIGHT);
// TODO add unlockinBondsBalanceTextField
totalBalanceTextField = addLabelTextField(gridPane, ++gridRow, Res.getWithCol("shared.totalBsqBalance")).second;
totalBalanceTextField.setMouseTransparent(false);
totalBalanceTextField.setMaxWidth(confirmedBalanceTextField.getMaxWidth());