Skip to content

Commit

Permalink
Revert non-changes
Browse files Browse the repository at this point in the history
  • Loading branch information
freimair committed Sep 6, 2019
1 parent 5d4f9af commit 69d70f3
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 43 deletions.
12 changes: 3 additions & 9 deletions core/src/main/java/bisq/core/offer/OfferUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,7 @@ public static Coin getMakerFee(boolean isCurrencyForMakerFeeBtc, @Nullable Coin
* @param amount
* @return
*/
public static boolean isCurrencyForMakerFeeBtc(Preferences preferences,
BsqWalletService bsqWalletService,
Coin amount) {
public static boolean isCurrencyForMakerFeeBtc(Preferences preferences, BsqWalletService bsqWalletService, Coin amount) {
boolean payFeeInBtc = preferences.getPayFeeInBtc();
boolean bsqForFeeAvailable = isBsqForMakerFeeAvailable(bsqWalletService, amount);
return payFeeInBtc || !bsqForFeeAvailable;
Expand Down Expand Up @@ -154,9 +152,7 @@ public static Coin getTakerFee(boolean isCurrencyForTakerFeeBtc, @Nullable Coin
}
}

public static boolean isCurrencyForTakerFeeBtc(Preferences preferences,
BsqWalletService bsqWalletService,
Coin amount) {
public static boolean isCurrencyForTakerFeeBtc(Preferences preferences, BsqWalletService bsqWalletService, Coin amount) {
boolean payFeeInBtc = preferences.getPayFeeInBtc();
boolean bsqForFeeAvailable = isBsqForTakerFeeAvailable(bsqWalletService, amount);
return payFeeInBtc || !bsqForFeeAvailable;
Expand Down Expand Up @@ -321,9 +317,7 @@ public static Optional<Volume> getFeeInUserFiatCurrency(Coin makerFee, boolean i
}
}

public static String getFeeWithFiatAmount(Coin makerFeeAsCoin,
Optional<Volume> optionalFeeInFiat,
BSFormatter formatter) {
public static String getFeeWithFiatAmount(Coin makerFeeAsCoin, Optional<Volume> optionalFeeInFiat, BSFormatter formatter) {
String fee = makerFeeAsCoin != null ? formatter.formatCoinWithCode(makerFeeAsCoin) : Res.get("shared.na");
String feeInFiatAsString;
if (optionalFeeInFiat != null && optionalFeeInFiat.isPresent()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ public class BsqDashboardView extends ActivatableView<GridPane, Void> implements
private Label marketPriceLabel;

private Coin availableAmount;
private int gridRow = 0;

private int gridRow = 0;

///////////////////////////////////////////////////////////////////////////////////////////
// Constructor, lifecycle
Expand All @@ -128,6 +128,7 @@ private BsqDashboardView(DaoFacade daoFacade,

@Override
public void initialize() {

ADJUSTERS.put(DAY, TemporalAdjusters.ofDateAdjuster(d -> d));

createKPIs();
Expand All @@ -140,6 +141,7 @@ public void initialize() {
}

private void createKPIs() {

Tuple3<Label, Label, VBox> marketPriceBox = addLabelWithSubText(root, gridRow++, "0.004000 BSQ/BTC", "Latest BSQ/BTC trade price (in Bisq)");
marketPriceLabel = marketPriceBox.first;
marketPriceLabel.getStyleClass().add("dao-kpi-big");
Expand All @@ -157,8 +159,10 @@ private void createKPIs() {

availableAmountTextField = FormBuilder.addTopLabelReadOnlyTextField(root, gridRow, 1,
Res.get("dao.factsAndFigures.dashboard.availableAmount")).second;

}


@Override
protected void activate() {
daoFacade.addBsqStateListener(this);
Expand All @@ -170,13 +174,13 @@ protected void activate() {
updateAverageAndMedianPrice();
}


@Override
protected void deactivate() {
daoFacade.removeBsqStateListener(this);
priceFeedService.updateCounterProperty().removeListener(priceChangeListener);
}


///////////////////////////////////////////////////////////////////////////////////////////
// DaoStateListener
///////////////////////////////////////////////////////////////////////////////////////////
Expand Down
42 changes: 10 additions & 32 deletions desktop/src/main/java/bisq/desktop/util/GUIUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -195,12 +195,8 @@ public static void showFeeInfoBeforeExecute(Runnable runnable) {
}
}

public static void exportAccounts(ArrayList<PaymentAccount> accounts,
String fileName,
Preferences preferences,
Stage stage,
PersistenceProtoResolver persistenceProtoResolver,
CorruptedDatabaseFilesHandler corruptedDatabaseFilesHandler) {
public static void exportAccounts(ArrayList<PaymentAccount> accounts, String fileName,
Preferences preferences, Stage stage, PersistenceProtoResolver persistenceProtoResolver, CorruptedDatabaseFilesHandler corruptedDatabaseFilesHandler) {
if (!accounts.isEmpty()) {
String directory = getDirectoryFromChooser(preferences, stage);
if (directory != null && !directory.isEmpty()) {
Expand All @@ -214,12 +210,8 @@ public static void exportAccounts(ArrayList<PaymentAccount> accounts,
}
}

public static void importAccounts(User user,
String fileName,
Preferences preferences,
Stage stage,
PersistenceProtoResolver persistenceProtoResolver,
CorruptedDatabaseFilesHandler corruptedDatabaseFilesHandler) {
public static void importAccounts(User user, String fileName, Preferences preferences, Stage stage,
PersistenceProtoResolver persistenceProtoResolver, CorruptedDatabaseFilesHandler corruptedDatabaseFilesHandler) {
FileChooser fileChooser = new FileChooser();
File initDir = new File(preferences.getDirectoryChooserPath());
if (initDir.isDirectory()) {
Expand Down Expand Up @@ -365,8 +357,7 @@ protected void updateItem(CurrencyListItem item, boolean empty) {
};
}

public static Callback<ListView<CurrencyListItem>, ListCell<CurrencyListItem>> getCurrencyListItemCellFactory(String postFixSingle,
String postFixMulti,
public static Callback<ListView<CurrencyListItem>, ListCell<CurrencyListItem>> getCurrencyListItemCellFactory(String postFixSingle, String postFixMulti,
Preferences preferences) {
return p -> new ListCell<>() {
@Override
Expand Down Expand Up @@ -598,9 +589,7 @@ protected void updateItem(PaymentMethod method, boolean empty) {
};
}

public static void updateConfidence(TransactionConfidence confidence,
Tooltip tooltip,
TxConfidenceIndicator txConfidenceIndicator) {
public static void updateConfidence(TransactionConfidence confidence, Tooltip tooltip, TxConfidenceIndicator txConfidenceIndicator) {
if (confidence != null) {
switch (confidence.getConfidenceType()) {
case UNKNOWN:
Expand Down Expand Up @@ -872,13 +861,8 @@ public static void removeChildrenFromGridPaneRows(GridPane gridPane, int start,
}
}

public static void showBsqFeeInfoPopup(Coin fee,
Coin miningFee,
Coin btcForIssuance,
int txSize,
BsqFormatter bsqFormatter,
BSFormatter btcFormatter,
String type,
public static void showBsqFeeInfoPopup(Coin fee, Coin miningFee, Coin btcForIssuance, int txSize, BsqFormatter bsqFormatter,
BSFormatter btcFormatter, String type,
Runnable actionHandler) {
String confirmationMessage;

Expand Down Expand Up @@ -915,11 +899,7 @@ public static void showBsqFeeInfoPopup(Coin fee, Coin miningFee, int txSize, Bsq
showBsqFeeInfoPopup(fee, miningFee, null, txSize, bsqFormatter, btcFormatter, type, actionHandler);
}

public static void setFitToRowsForTableView(TableView tableView,
int rowHeight,
int headerHeight,
int minNumRows,
int maxNumRows) {
public static void setFitToRowsForTableView(TableView tableView, int rowHeight, int headerHeight, int minNumRows, int maxNumRows) {
int size = tableView.getItems().size();
int minHeight = rowHeight * minNumRows + headerHeight;
int maxHeight = rowHeight * maxNumRows + headerHeight;
Expand Down Expand Up @@ -1025,9 +1005,7 @@ public static <T> ListCell<T> getComboBoxButtonCell(String title, ComboBox<T> co
}

@NotNull
public static <T> ListCell<T> getComboBoxButtonCell(String title,
ComboBox<T> comboBox,
Boolean hideOriginalPrompt) {
public static <T> ListCell<T> getComboBoxButtonCell(String title, ComboBox<T> comboBox, Boolean hideOriginalPrompt) {
return new ListCell<>() {
@Override
protected void updateItem(T item, boolean empty) {
Expand Down

0 comments on commit 69d70f3

Please sign in to comment.