Merge pull request #1634 from ManfredKarrer/mk_master

Change link to F2F docs page
This commit is contained in:
Manfred Karrer 2018-08-20 14:17:09 +02:00 committed by GitHub
commit f573284754
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 11 additions and 10 deletions

View file

@ -250,7 +250,7 @@ public class FiatAccountsView extends ActivatableViewAndModel<GridPane, FiatAcco
new Popup<>().information(Res.get("payment.f2f.info"))
.width(700)
.closeButtonText(Res.get("payment.f2f.info.openURL"))
.onClose(() -> GUIUtil.openWebPage("https://docs.bisq.network/#f2f"))
.onClose(() -> GUIUtil.openWebPage("https://docs.bisq.network/trading-rules.html#f2f-trading"))
.actionButtonText(Res.get("shared.iUnderstand"))
.onAction(() -> doSaveNewAccount(paymentAccount))
.show();

View file

@ -243,8 +243,8 @@ public class VoteResultView extends ActivatableView<GridPane, Void> implements B
cycleListItemList.clear();
bsqStateService.getCycles().forEach(cycle -> {
List<Proposal> proposalsForCycle = proposalService.getProposalPayloads().stream()
.filter(proposalPayload -> cycleService.isTxInCycle(cycle, proposalPayload.getProposal().getTxId()))
.map(ProposalPayload::getProposal)
.filter(proposal -> cycleService.isTxInCycle(cycle, proposal.getTxId()))
.collect(Collectors.toList());
List<EvaluatedProposal> evaluatedProposalsForCycle = voteResultService.getAllEvaluatedProposals().stream()

View file

@ -673,7 +673,7 @@ public abstract class MutableOfferDataModel extends OfferDataModel implements Bs
if (isHalCashAccount())
volumeByAmount = OfferUtil.getAdjustedVolumeForHalCash(volumeByAmount);
else if (CurrencyUtil.isFiatCurrency(tradeCurrencyCode.get()))
volumeByAmount = OfferUtil.getRoundedFiatVolume(volumeByAmount, tradeCurrencyCode.get());
volumeByAmount = OfferUtil.getRoundedFiatVolume(volumeByAmount);
volume.set(volumeByAmount);
} catch (Throwable t) {
@ -695,7 +695,7 @@ public abstract class MutableOfferDataModel extends OfferDataModel implements Bs
if (isHalCashAccount())
value = OfferUtil.getAdjustedAmountForHalCash(value, price.get(), getMaxTradeLimit());
else if (CurrencyUtil.isFiatCurrency(tradeCurrencyCode.get()))
value = OfferUtil.getRoundedFiatAmount(value, price.get(), tradeCurrencyCode.get(), getMaxTradeLimit());
value = OfferUtil.getRoundedFiatAmount(value, price.get(), getMaxTradeLimit());
calculateVolume();

View file

@ -764,7 +764,7 @@ public abstract class MutableOfferViewModel<M extends MutableOfferDataModel> ext
if (dataModel.isHalCashAccount())
volume = OfferUtil.getAdjustedVolumeForHalCash(volume);
else if (CurrencyUtil.isFiatCurrency(tradeCurrencyCode.get()))
volume = OfferUtil.getRoundedFiatVolume(volume, tradeCurrencyCode.get());
volume = OfferUtil.getRoundedFiatVolume(volume);
this.volume.set(btcFormatter.formatVolume(volume));
}
@ -979,7 +979,7 @@ public abstract class MutableOfferViewModel<M extends MutableOfferDataModel> ext
if (dataModel.isHalCashAccount())
amount = OfferUtil.getAdjustedAmountForHalCash(amount, price, maxTradeLimit);
else if (CurrencyUtil.isFiatCurrency(tradeCurrencyCode.get()))
amount = OfferUtil.getRoundedFiatAmount(amount, price, tradeCurrencyCode.get(), maxTradeLimit);
amount = OfferUtil.getRoundedFiatAmount(amount, price, maxTradeLimit);
}
dataModel.setAmount(amount);
if (syncMinAmountWithAmount ||
@ -1003,7 +1003,7 @@ public abstract class MutableOfferViewModel<M extends MutableOfferDataModel> ext
if (dataModel.isHalCashAccount())
minAmount = OfferUtil.getAdjustedAmountForHalCash(minAmount, price, maxTradeLimit);
else if (CurrencyUtil.isFiatCurrency(tradeCurrencyCode.get()))
minAmount = OfferUtil.getRoundedFiatAmount(minAmount, price, tradeCurrencyCode.get(), maxTradeLimit);
minAmount = OfferUtil.getRoundedFiatAmount(minAmount, price, maxTradeLimit);
}
dataModel.setMinAmount(minAmount);

View file

@ -496,7 +496,7 @@ class TakeOfferDataModel extends OfferDataModel {
if (offer.getPaymentMethod().getId().equals(PaymentMethod.HAL_CASH_ID))
volumeByAmount = OfferUtil.getAdjustedVolumeForHalCash(volumeByAmount);
else if (CurrencyUtil.isFiatCurrency(getCurrencyCode()))
volumeByAmount = OfferUtil.getRoundedFiatVolume(volumeByAmount, getCurrencyCode());
volumeByAmount = OfferUtil.getRoundedFiatVolume(volumeByAmount);
volume.set(volumeByAmount);

View file

@ -296,7 +296,7 @@ class TakeOfferViewModel extends ActivatableWithDataModel<TakeOfferDataModel> im
// We only apply the rounding if the amount is variable (minAmount is lower as amount).
// Otherwise we could get an amount lower then the minAmount set by rounding
Coin roundedAmount = OfferUtil.getRoundedFiatAmount(dataModel.getAmount().get(), tradePrice,
dataModel.getCurrencyCode(), maxTradeLimit);
maxTradeLimit);
dataModel.applyAmount(roundedAmount);
}
amount.set(btcFormatter.formatCoin(dataModel.getAmount().get()));
@ -566,7 +566,7 @@ class TakeOfferViewModel extends ActivatableWithDataModel<TakeOfferDataModel> im
} else if (CurrencyUtil.isFiatCurrency(dataModel.getCurrencyCode()) && !isAmountEqualMinAmount(amount)) {
// We only apply the rounding if the amount is variable (minAmount is lower as amount).
// Otherwise we could get an amount lower then the minAmount set by rounding
amount = OfferUtil.getRoundedFiatAmount(amount, price, dataModel.getCurrencyCode(), maxTradeLimit);
amount = OfferUtil.getRoundedFiatAmount(amount, price, maxTradeLimit);
}
}
dataModel.applyAmount(amount);
@ -577,6 +577,7 @@ class TakeOfferViewModel extends ActivatableWithDataModel<TakeOfferDataModel> im
return amount.value == offer.getMinAmount().value;
}
///////////////////////////////////////////////////////////////////////////////////////////
// Getters
///////////////////////////////////////////////////////////////////////////////////////////