mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-24 07:07:43 +01:00
Show recommended miner fee in popup when ask user for funding offer
This commit is contained in:
parent
c190d7f1df
commit
065a57606a
5 changed files with 100 additions and 93 deletions
|
@ -18,7 +18,7 @@ public class DevEnv {
|
|||
// If set to true we ignore several UI behavior like confirmation popups as well dummy accounts are created and
|
||||
// offers are filled with default values. Intended to make dev testing faster.
|
||||
@SuppressWarnings("PointlessBooleanExpression")
|
||||
public static final boolean DEV_MODE = STRESS_TEST_MODE || true;
|
||||
public static final boolean DEV_MODE = STRESS_TEST_MODE || false;
|
||||
|
||||
public static final boolean DAO_PHASE2_ACTIVATED = false;
|
||||
}
|
||||
|
|
|
@ -336,7 +336,7 @@ offerbook.warning.tradeLimitNotMatching=Your payment account has been created {0
|
|||
createOffer.amount.prompt=Enter amount in BTC
|
||||
createOffer.price.prompt=Enter price
|
||||
createOffer.volume.prompt=Enter amount in {0}
|
||||
createOffer.amountPriceBox.amountDescription=Amount of bitcoin to {0}
|
||||
createOffer.amountPriceBox.amountDescription=Amount of BTC to {0}
|
||||
createOffer.amountPriceBox.priceDescriptionFiat=Fixed price per {0}
|
||||
createOffer.amountPriceBox.buy.volumeDescription=Amount in {0} to spend
|
||||
createOffer.amountPriceBox.sell.volumeDescription=Amount in {0} to receive
|
||||
|
@ -390,8 +390,8 @@ createOffer.setDeposit=Set buyer's security deposit
|
|||
####################################################################
|
||||
|
||||
takeOffer.amount.prompt=Enter amount in BTC
|
||||
takeOffer.amountPriceBox.buy.amountDescription=Amount of bitcoin to sell
|
||||
takeOffer.amountPriceBox.sell.amountDescription=Amount of bitcoin to buy
|
||||
takeOffer.amountPriceBox.buy.amountDescription=Amount of BTC to sell
|
||||
takeOffer.amountPriceBox.sell.amountDescription=Amount of BTC to buy
|
||||
takeOffer.amountPriceBox.priceDescription=Price per bitcoin in {0}
|
||||
takeOffer.amountPriceBox.amountRangeDescription=Possible amount range
|
||||
takeOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places.
|
||||
|
@ -1307,9 +1307,8 @@ systemTray.tooltip=Bisq: The decentralized exchange network
|
|||
####################################################################
|
||||
|
||||
guiUtil.miningFeeInfo=Please be sure that the mining fee used at your external wallet is \
|
||||
sufficiently high so that the funding transaction will be accepted by the miners.\n\
|
||||
Otherwise the trade transactions cannot be confirmed and a trade would end up in a dispute.\n\n\
|
||||
You can check out the currently recommended fees at: https://bitcoinfees.21.co
|
||||
at least {0} Satoshi/Byte. Otherwise the trade transactions cannot be confirmed and a trade would end up in a dispute.
|
||||
|
||||
guiUtil.accountExport.savedToPath=Trading accounts saved to path:\n{0}
|
||||
guiUtil.accountExport.noAccountSetup=You don't have trading accounts set up for exporting.
|
||||
guiUtil.accountExport.selectPath=Select path to {0}
|
||||
|
|
|
@ -77,6 +77,7 @@ import io.bisq.gui.main.overlays.windows.TacWindow;
|
|||
import io.bisq.gui.main.overlays.windows.WalletPasswordWindow;
|
||||
import io.bisq.gui.main.overlays.windows.downloadupdate.DisplayUpdateDownloadWindow;
|
||||
import io.bisq.gui.util.BSFormatter;
|
||||
import io.bisq.gui.util.GUIUtil;
|
||||
import io.bisq.network.crypto.DecryptedDataTuple;
|
||||
import io.bisq.network.crypto.EncryptionService;
|
||||
import io.bisq.network.p2p.BootstrapListener;
|
||||
|
@ -640,6 +641,7 @@ public class MainViewModel implements ViewModel {
|
|||
p2PService.onAllServicesInitialized();
|
||||
|
||||
feeService.onAllServicesInitialized();
|
||||
GUIUtil.setFeeService(feeService);
|
||||
|
||||
daoManager.onAllServicesInitialized(errorMessage -> new Popup<>().error(errorMessage).show());
|
||||
|
||||
|
|
|
@ -34,6 +34,7 @@ import io.bisq.common.util.Utilities;
|
|||
import io.bisq.core.app.BisqEnvironment;
|
||||
import io.bisq.core.payment.PaymentAccount;
|
||||
import io.bisq.core.payment.PaymentAccountList;
|
||||
import io.bisq.core.provider.fee.FeeService;
|
||||
import io.bisq.core.user.DontShowAgainLookup;
|
||||
import io.bisq.core.user.Preferences;
|
||||
import io.bisq.core.user.User;
|
||||
|
@ -74,6 +75,11 @@ import java.util.stream.Collectors;
|
|||
public class GUIUtil {
|
||||
public final static String SHOW_ALL_FLAG = "SHOW_ALL_FLAG";
|
||||
public final static String EDIT_FLAG = "EDIT_FLAG";
|
||||
private static FeeService feeService;
|
||||
|
||||
public static void setFeeService(FeeService feeService) {
|
||||
GUIUtil.feeService = feeService;
|
||||
}
|
||||
|
||||
public static double getScrollbarWidth(Node scrollablePane) {
|
||||
Node node = scrollablePane.lookup(".scroll-bar");
|
||||
|
@ -91,7 +97,7 @@ public class GUIUtil {
|
|||
String key = "miningFeeInfo";
|
||||
//noinspection ConstantConditions,ConstantConditions
|
||||
if (!DevEnv.DEV_MODE && DontShowAgainLookup.showAgain(key) && BisqEnvironment.getBaseCurrencyNetwork().isBitcoin()) {
|
||||
new Popup<>().information(Res.get("guiUtil.miningFeeInfo"))
|
||||
new Popup<>().attention(Res.get("guiUtil.miningFeeInfo", String.valueOf(GUIUtil.feeService.getTxFeePerByte().value)))
|
||||
.onClose(runnable::run)
|
||||
.useIUnderstandButton()
|
||||
.show();
|
||||
|
|
Loading…
Add table
Reference in a new issue