Search in sources :

Example 1 with FeeOptionWindow

use of bisq.desktop.main.overlays.windows.FeeOptionWindow in project bisq-desktop by bisq-network.

the class CreateOfferView method showFeeOption.

private void showFeeOption() {
    Coin makerFee = model.dataModel.getMakerFee(false);
    String missingBsq = null;
    if (makerFee != null) {
        missingBsq = Res.get("popup.warning.insufficientBsqFundsForBtcFeePayment", bsqFormatter.formatCoinWithCode(makerFee.subtract(model.dataModel.getBsqBalance())));
    } else if (model.dataModel.getBsqBalance().isZero())
        missingBsq = Res.get("popup.warning.noBsqFundsForBtcFeePayment");
    new FeeOptionWindow(model.makerFeeWithCode, model.dataModel.isCurrencyForMakerFeeBtc(), model.dataModel.isBsqForFeeAvailable(), missingBsq, navigation, this::onShowPayFundsScreen).onSelectionChangedHandler(model::setIsCurrencyForMakerFeeBtc).onAction(this::onShowPayFundsScreen).hideCloseButton().show();
}
Also used : Coin(org.bitcoinj.core.Coin) FeeOptionWindow(bisq.desktop.main.overlays.windows.FeeOptionWindow)

Example 2 with FeeOptionWindow

use of bisq.desktop.main.overlays.windows.FeeOptionWindow in project bisq-desktop by bisq-network.

the class TakeOfferView method showFeeOption.

private void showFeeOption() {
    Coin makerFee = model.dataModel.getTakerFee(false);
    String missingBsq = null;
    if (makerFee != null) {
        missingBsq = Res.get("popup.warning.insufficientBsqFundsForBtcFeePayment", bsqFormatter.formatCoinWithCode(makerFee.subtract(model.dataModel.getBsqBalance())));
    } else if (model.dataModel.getBsqBalance().isZero())
        missingBsq = Res.get("popup.warning.noBsqFundsForBtcFeePayment");
    new FeeOptionWindow(model.takerFeeWithCode, model.dataModel.isCurrencyForTakerFeeBtc(), model.dataModel.isBsqForFeeAvailable(), missingBsq, navigation, this::onShowPayFundsScreen).onSelectionChangedHandler(model::setIsCurrencyForTakerFeeBtc).onAction(this::onShowPayFundsScreen).hideCloseButton().show();
}
Also used : Coin(org.bitcoinj.core.Coin) FeeOptionWindow(bisq.desktop.main.overlays.windows.FeeOptionWindow)

Aggregations

FeeOptionWindow (bisq.desktop.main.overlays.windows.FeeOptionWindow)2 Coin (org.bitcoinj.core.Coin)2