mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-24 15:10:44 +01:00
Merge pull request #3634 from bodymindarts/coin-formatter-interface
Coin formatter interface
This commit is contained in:
commit
8025cc10a1
167 changed files with 635 additions and 508 deletions
|
@ -30,6 +30,9 @@ import bisq.core.proto.network.CoreNetworkProtoResolver;
|
||||||
import bisq.core.proto.persistable.CorePersistenceProtoResolver;
|
import bisq.core.proto.persistable.CorePersistenceProtoResolver;
|
||||||
import bisq.core.trade.TradeModule;
|
import bisq.core.trade.TradeModule;
|
||||||
import bisq.core.user.Preferences;
|
import bisq.core.user.Preferences;
|
||||||
|
import bisq.core.util.FormattingUtils;
|
||||||
|
import bisq.core.util.coin.CoinFormatter;
|
||||||
|
import bisq.core.util.coin.ImmutableCoinFormatter;
|
||||||
|
|
||||||
import bisq.network.crypto.EncryptionServiceModule;
|
import bisq.network.crypto.EncryptionServiceModule;
|
||||||
import bisq.network.p2p.P2PModule;
|
import bisq.network.p2p.P2PModule;
|
||||||
|
@ -70,6 +73,9 @@ public class CoreModule extends AppModule {
|
||||||
File storageDir = new File(environment.getRequiredProperty(Storage.STORAGE_DIR));
|
File storageDir = new File(environment.getRequiredProperty(Storage.STORAGE_DIR));
|
||||||
bind(File.class).annotatedWith(named(Storage.STORAGE_DIR)).toInstance(storageDir);
|
bind(File.class).annotatedWith(named(Storage.STORAGE_DIR)).toInstance(storageDir);
|
||||||
|
|
||||||
|
CoinFormatter btcFormatter = new ImmutableCoinFormatter(BisqEnvironment.getParameters().getMonetaryFormat());
|
||||||
|
bind(CoinFormatter.class).annotatedWith(named(FormattingUtils.BTC_FORMATTER_KEY)).toInstance(btcFormatter);
|
||||||
|
|
||||||
File keyStorageDir = new File(environment.getRequiredProperty(KeyStorage.KEY_STORAGE_DIR));
|
File keyStorageDir = new File(environment.getRequiredProperty(KeyStorage.KEY_STORAGE_DIR));
|
||||||
bind(File.class).annotatedWith(named(KeyStorage.KEY_STORAGE_DIR)).toInstance(keyStorageDir);
|
bind(File.class).annotatedWith(named(KeyStorage.KEY_STORAGE_DIR)).toInstance(keyStorageDir);
|
||||||
|
|
||||||
|
|
|
@ -60,7 +60,8 @@ import bisq.core.trade.statistics.AssetTradeActivityCheck;
|
||||||
import bisq.core.trade.statistics.TradeStatisticsManager;
|
import bisq.core.trade.statistics.TradeStatisticsManager;
|
||||||
import bisq.core.user.Preferences;
|
import bisq.core.user.Preferences;
|
||||||
import bisq.core.user.User;
|
import bisq.core.user.User;
|
||||||
import bisq.core.util.BSFormatter;
|
import bisq.core.util.FormattingUtils;
|
||||||
|
import bisq.core.util.coin.CoinFormatter;
|
||||||
|
|
||||||
import bisq.network.crypto.DecryptedDataTuple;
|
import bisq.network.crypto.DecryptedDataTuple;
|
||||||
import bisq.network.crypto.EncryptionService;
|
import bisq.network.crypto.EncryptionService;
|
||||||
|
@ -82,6 +83,7 @@ import bisq.common.util.Utilities;
|
||||||
import org.bitcoinj.core.Coin;
|
import org.bitcoinj.core.Coin;
|
||||||
|
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
import javax.inject.Named;
|
||||||
import javax.inject.Singleton;
|
import javax.inject.Singleton;
|
||||||
|
|
||||||
import com.google.common.net.InetAddresses;
|
import com.google.common.net.InetAddresses;
|
||||||
|
@ -184,7 +186,7 @@ public class BisqSetup {
|
||||||
private final AssetService assetService;
|
private final AssetService assetService;
|
||||||
private final TorSetup torSetup;
|
private final TorSetup torSetup;
|
||||||
private final TradeLimits tradeLimits;
|
private final TradeLimits tradeLimits;
|
||||||
private final BSFormatter formatter;
|
private final CoinFormatter formatter;
|
||||||
@Setter
|
@Setter
|
||||||
@Nullable
|
@Nullable
|
||||||
private Consumer<Runnable> displayTacHandler;
|
private Consumer<Runnable> displayTacHandler;
|
||||||
|
@ -270,7 +272,7 @@ public class BisqSetup {
|
||||||
AssetService assetService,
|
AssetService assetService,
|
||||||
TorSetup torSetup,
|
TorSetup torSetup,
|
||||||
TradeLimits tradeLimits,
|
TradeLimits tradeLimits,
|
||||||
BSFormatter formatter) {
|
@Named(FormattingUtils.BTC_FORMATTER_KEY) CoinFormatter formatter) {
|
||||||
|
|
||||||
|
|
||||||
this.p2PNetworkSetup = p2PNetworkSetup;
|
this.p2PNetworkSetup = p2PNetworkSetup;
|
||||||
|
|
|
@ -22,14 +22,15 @@ import bisq.core.btc.setup.WalletsSetup;
|
||||||
import bisq.core.btc.wallet.WalletsManager;
|
import bisq.core.btc.wallet.WalletsManager;
|
||||||
import bisq.core.locale.Res;
|
import bisq.core.locale.Res;
|
||||||
import bisq.core.user.Preferences;
|
import bisq.core.user.Preferences;
|
||||||
import bisq.core.util.BSFormatter;
|
|
||||||
import bisq.core.util.FormattingUtils;
|
import bisq.core.util.FormattingUtils;
|
||||||
|
import bisq.core.util.coin.CoinFormatter;
|
||||||
|
|
||||||
import org.bitcoinj.core.VersionMessage;
|
import org.bitcoinj.core.VersionMessage;
|
||||||
import org.bitcoinj.store.BlockStoreException;
|
import org.bitcoinj.store.BlockStoreException;
|
||||||
import org.bitcoinj.store.ChainFileLockedException;
|
import org.bitcoinj.store.ChainFileLockedException;
|
||||||
|
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
import javax.inject.Named;
|
||||||
import javax.inject.Singleton;
|
import javax.inject.Singleton;
|
||||||
|
|
||||||
import org.fxmisc.easybind.EasyBind;
|
import org.fxmisc.easybind.EasyBind;
|
||||||
|
@ -59,7 +60,7 @@ public class WalletAppSetup {
|
||||||
private final WalletsSetup walletsSetup;
|
private final WalletsSetup walletsSetup;
|
||||||
private final BisqEnvironment bisqEnvironment;
|
private final BisqEnvironment bisqEnvironment;
|
||||||
private final Preferences preferences;
|
private final Preferences preferences;
|
||||||
private final BSFormatter formatter;
|
private final CoinFormatter formatter;
|
||||||
|
|
||||||
@SuppressWarnings("FieldCanBeLocal")
|
@SuppressWarnings("FieldCanBeLocal")
|
||||||
private MonadicBinding<String> btcInfoBinding;
|
private MonadicBinding<String> btcInfoBinding;
|
||||||
|
@ -84,7 +85,7 @@ public class WalletAppSetup {
|
||||||
WalletsSetup walletsSetup,
|
WalletsSetup walletsSetup,
|
||||||
BisqEnvironment bisqEnvironment,
|
BisqEnvironment bisqEnvironment,
|
||||||
Preferences preferences,
|
Preferences preferences,
|
||||||
BSFormatter formatter) {
|
@Named(FormattingUtils.BTC_FORMATTER_KEY) CoinFormatter formatter) {
|
||||||
this.walletsManager = walletsManager;
|
this.walletsManager = walletsManager;
|
||||||
this.walletsSetup = walletsSetup;
|
this.walletsSetup = walletsSetup;
|
||||||
this.bisqEnvironment = bisqEnvironment;
|
this.bisqEnvironment = bisqEnvironment;
|
||||||
|
|
|
@ -38,7 +38,7 @@ import bisq.core.dao.state.model.governance.RemoveAssetProposal;
|
||||||
import bisq.core.locale.CurrencyUtil;
|
import bisq.core.locale.CurrencyUtil;
|
||||||
import bisq.core.trade.statistics.TradeStatistics2;
|
import bisq.core.trade.statistics.TradeStatistics2;
|
||||||
import bisq.core.trade.statistics.TradeStatisticsManager;
|
import bisq.core.trade.statistics.TradeStatisticsManager;
|
||||||
import bisq.core.util.BsqFormatter;
|
import bisq.core.util.coin.BsqFormatter;
|
||||||
|
|
||||||
import bisq.common.Timer;
|
import bisq.common.Timer;
|
||||||
import bisq.common.UserThread;
|
import bisq.common.UserThread;
|
||||||
|
|
|
@ -28,7 +28,7 @@ import bisq.core.dao.state.DaoStateService;
|
||||||
import bisq.core.dao.state.model.governance.ChangeParamProposal;
|
import bisq.core.dao.state.model.governance.ChangeParamProposal;
|
||||||
import bisq.core.dao.state.model.governance.Proposal;
|
import bisq.core.dao.state.model.governance.Proposal;
|
||||||
import bisq.core.locale.Res;
|
import bisq.core.locale.Res;
|
||||||
import bisq.core.util.BsqFormatter;
|
import bisq.core.util.coin.BsqFormatter;
|
||||||
import bisq.core.util.validation.BtcAddressValidator;
|
import bisq.core.util.validation.BtcAddressValidator;
|
||||||
import bisq.core.util.validation.InputValidator;
|
import bisq.core.util.validation.InputValidator;
|
||||||
|
|
||||||
|
|
|
@ -20,8 +20,8 @@ package bisq.core.dao.presentation;
|
||||||
import bisq.core.dao.DaoFacade;
|
import bisq.core.dao.DaoFacade;
|
||||||
import bisq.core.dao.state.model.governance.DaoPhase;
|
import bisq.core.dao.state.model.governance.DaoPhase;
|
||||||
import bisq.core.locale.Res;
|
import bisq.core.locale.Res;
|
||||||
import bisq.core.util.BSFormatter;
|
|
||||||
import bisq.core.util.FormattingUtils;
|
import bisq.core.util.FormattingUtils;
|
||||||
|
import bisq.core.util.coin.CoinFormatter;
|
||||||
|
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
|
|
||||||
|
@ -33,7 +33,7 @@ import java.util.Locale;
|
||||||
*/
|
*/
|
||||||
public class DaoUtil {
|
public class DaoUtil {
|
||||||
|
|
||||||
public static String getNextPhaseDuration(int height, DaoPhase.Phase phase, DaoFacade daoFacade, BSFormatter formatter) {
|
public static String getNextPhaseDuration(int height, DaoPhase.Phase phase, DaoFacade daoFacade, CoinFormatter formatter) {
|
||||||
final int currentCycleDuration = daoFacade.getCurrentCycleDuration();
|
final int currentCycleDuration = daoFacade.getCurrentCycleDuration();
|
||||||
long start = daoFacade.getFirstBlockOfPhaseForDisplay(height, phase) + currentCycleDuration;
|
long start = daoFacade.getFirstBlockOfPhaseForDisplay(height, phase) + currentCycleDuration;
|
||||||
long end = daoFacade.getLastBlockOfPhaseForDisplay(height, phase) + currentCycleDuration;
|
long end = daoFacade.getLastBlockOfPhaseForDisplay(height, phase) + currentCycleDuration;
|
||||||
|
@ -47,7 +47,7 @@ public class DaoUtil {
|
||||||
return Res.get("dao.cycle.phaseDurationWithoutBlocks", start, end, startDateTime, endDateTime);
|
return Res.get("dao.cycle.phaseDurationWithoutBlocks", start, end, startDateTime, endDateTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getPhaseDuration(int height, DaoPhase.Phase phase, DaoFacade daoFacade, BSFormatter formatter) {
|
public static String getPhaseDuration(int height, DaoPhase.Phase phase, DaoFacade daoFacade, CoinFormatter formatter) {
|
||||||
long start = daoFacade.getFirstBlockOfPhaseForDisplay(height, phase);
|
long start = daoFacade.getFirstBlockOfPhaseForDisplay(height, phase);
|
||||||
long end = daoFacade.getLastBlockOfPhaseForDisplay(height, phase);
|
long end = daoFacade.getLastBlockOfPhaseForDisplay(height, phase);
|
||||||
long duration = daoFacade.getDurationForPhaseForDisplay(phase);
|
long duration = daoFacade.getDurationForPhaseForDisplay(phase);
|
||||||
|
|
|
@ -35,7 +35,7 @@ import bisq.core.dao.state.model.governance.EvaluatedProposal;
|
||||||
import bisq.core.dao.state.model.governance.Issuance;
|
import bisq.core.dao.state.model.governance.Issuance;
|
||||||
import bisq.core.dao.state.model.governance.IssuanceType;
|
import bisq.core.dao.state.model.governance.IssuanceType;
|
||||||
import bisq.core.dao.state.model.governance.ParamChange;
|
import bisq.core.dao.state.model.governance.ParamChange;
|
||||||
import bisq.core.util.BsqFormatter;
|
import bisq.core.util.coin.BsqFormatter;
|
||||||
import bisq.core.util.ParsingUtils;
|
import bisq.core.util.ParsingUtils;
|
||||||
|
|
||||||
import org.bitcoinj.core.Coin;
|
import org.bitcoinj.core.Coin;
|
||||||
|
|
|
@ -30,8 +30,8 @@ import bisq.core.offer.OfferPayload;
|
||||||
import bisq.core.provider.price.MarketPrice;
|
import bisq.core.provider.price.MarketPrice;
|
||||||
import bisq.core.provider.price.PriceFeedService;
|
import bisq.core.provider.price.PriceFeedService;
|
||||||
import bisq.core.user.User;
|
import bisq.core.user.User;
|
||||||
import bisq.core.util.BSFormatter;
|
|
||||||
import bisq.core.util.FormattingUtils;
|
import bisq.core.util.FormattingUtils;
|
||||||
|
import bisq.core.util.coin.CoinFormatter;
|
||||||
|
|
||||||
import bisq.common.crypto.KeyRing;
|
import bisq.common.crypto.KeyRing;
|
||||||
import bisq.common.util.MathUtils;
|
import bisq.common.util.MathUtils;
|
||||||
|
@ -39,6 +39,7 @@ import bisq.common.util.MathUtils;
|
||||||
import org.bitcoinj.utils.Fiat;
|
import org.bitcoinj.utils.Fiat;
|
||||||
|
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
import javax.inject.Named;
|
||||||
import javax.inject.Singleton;
|
import javax.inject.Singleton;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -54,11 +55,11 @@ public class MarketAlerts {
|
||||||
private final User user;
|
private final User user;
|
||||||
private final PriceFeedService priceFeedService;
|
private final PriceFeedService priceFeedService;
|
||||||
private final KeyRing keyRing;
|
private final KeyRing keyRing;
|
||||||
private final BSFormatter formatter;
|
private final CoinFormatter formatter;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
public MarketAlerts(OfferBookService offerBookService, MobileNotificationService mobileNotificationService,
|
public MarketAlerts(OfferBookService offerBookService, MobileNotificationService mobileNotificationService,
|
||||||
User user, PriceFeedService priceFeedService, KeyRing keyRing, BSFormatter formatter) {
|
User user, PriceFeedService priceFeedService, KeyRing keyRing, @Named(FormattingUtils.BTC_FORMATTER_KEY) CoinFormatter formatter) {
|
||||||
this.offerBookService = offerBookService;
|
this.offerBookService = offerBookService;
|
||||||
this.mobileNotificationService = mobileNotificationService;
|
this.mobileNotificationService = mobileNotificationService;
|
||||||
this.user = user;
|
this.user = user;
|
||||||
|
|
|
@ -26,7 +26,6 @@ import bisq.core.notifications.MobileNotificationService;
|
||||||
import bisq.core.provider.price.MarketPrice;
|
import bisq.core.provider.price.MarketPrice;
|
||||||
import bisq.core.provider.price.PriceFeedService;
|
import bisq.core.provider.price.PriceFeedService;
|
||||||
import bisq.core.user.User;
|
import bisq.core.user.User;
|
||||||
import bisq.core.util.BSFormatter;
|
|
||||||
import bisq.core.util.FormattingUtils;
|
import bisq.core.util.FormattingUtils;
|
||||||
|
|
||||||
import bisq.common.util.MathUtils;
|
import bisq.common.util.MathUtils;
|
||||||
|
@ -44,14 +43,12 @@ public class PriceAlert {
|
||||||
private final PriceFeedService priceFeedService;
|
private final PriceFeedService priceFeedService;
|
||||||
private final MobileNotificationService mobileNotificationService;
|
private final MobileNotificationService mobileNotificationService;
|
||||||
private final User user;
|
private final User user;
|
||||||
private final BSFormatter formatter;
|
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
public PriceAlert(PriceFeedService priceFeedService, MobileNotificationService mobileNotificationService, User user, BSFormatter formatter) {
|
public PriceAlert(PriceFeedService priceFeedService, MobileNotificationService mobileNotificationService, User user) {
|
||||||
this.priceFeedService = priceFeedService;
|
this.priceFeedService = priceFeedService;
|
||||||
this.user = user;
|
this.user = user;
|
||||||
this.mobileNotificationService = mobileNotificationService;
|
this.mobileNotificationService = mobileNotificationService;
|
||||||
this.formatter = formatter;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onAllServicesInitialized() {
|
public void onAllServicesInitialized() {
|
||||||
|
|
|
@ -34,7 +34,7 @@ import bisq.core.provider.price.PriceFeedService;
|
||||||
import bisq.core.trade.statistics.ReferralIdService;
|
import bisq.core.trade.statistics.ReferralIdService;
|
||||||
import bisq.core.user.Preferences;
|
import bisq.core.user.Preferences;
|
||||||
import bisq.core.user.User;
|
import bisq.core.user.User;
|
||||||
import bisq.core.util.CoinUtil;
|
import bisq.core.util.coin.CoinUtil;
|
||||||
|
|
||||||
import bisq.network.p2p.NodeAddress;
|
import bisq.network.p2p.NodeAddress;
|
||||||
import bisq.network.p2p.P2PService;
|
import bisq.network.p2p.P2PService;
|
||||||
|
|
|
@ -32,8 +32,8 @@ import bisq.core.provider.price.MarketPrice;
|
||||||
import bisq.core.provider.price.PriceFeedService;
|
import bisq.core.provider.price.PriceFeedService;
|
||||||
import bisq.core.trade.statistics.ReferralIdService;
|
import bisq.core.trade.statistics.ReferralIdService;
|
||||||
import bisq.core.user.Preferences;
|
import bisq.core.user.Preferences;
|
||||||
import bisq.core.util.BsqFormatter;
|
import bisq.core.util.coin.CoinFormatter;
|
||||||
import bisq.core.util.CoinUtil;
|
import bisq.core.util.coin.CoinUtil;
|
||||||
|
|
||||||
import bisq.network.p2p.P2PService;
|
import bisq.network.p2p.P2PService;
|
||||||
|
|
||||||
|
@ -281,7 +281,7 @@ public class OfferUtil {
|
||||||
|
|
||||||
public static Optional<Volume> getFeeInUserFiatCurrency(Coin makerFee, boolean isCurrencyForMakerFeeBtc,
|
public static Optional<Volume> getFeeInUserFiatCurrency(Coin makerFee, boolean isCurrencyForMakerFeeBtc,
|
||||||
Preferences preferences, PriceFeedService priceFeedService,
|
Preferences preferences, PriceFeedService priceFeedService,
|
||||||
BsqFormatter bsqFormatter) {
|
CoinFormatter bsqFormatter) {
|
||||||
String countryCode = preferences.getUserCountry().code;
|
String countryCode = preferences.getUserCountry().code;
|
||||||
String userCurrencyCode = CurrencyUtil.getCurrencyByCountryCode(countryCode).getCode();
|
String userCurrencyCode = CurrencyUtil.getCurrencyByCountryCode(countryCode).getCode();
|
||||||
return getFeeInUserFiatCurrency(makerFee,
|
return getFeeInUserFiatCurrency(makerFee,
|
||||||
|
@ -293,7 +293,7 @@ public class OfferUtil {
|
||||||
|
|
||||||
public static Optional<Volume> getFeeInUserFiatCurrency(Coin makerFee, boolean isCurrencyForMakerFeeBtc,
|
public static Optional<Volume> getFeeInUserFiatCurrency(Coin makerFee, boolean isCurrencyForMakerFeeBtc,
|
||||||
String userCurrencyCode, PriceFeedService priceFeedService,
|
String userCurrencyCode, PriceFeedService priceFeedService,
|
||||||
BsqFormatter bsqFormatter) {
|
CoinFormatter bsqFormatter) {
|
||||||
// We use the users currency derived from his selected country.
|
// We use the users currency derived from his selected country.
|
||||||
// We don't use the preferredTradeCurrency from preferences as that can be also set to an altcoin.
|
// We don't use the preferredTradeCurrency from preferences as that can be also set to an altcoin.
|
||||||
|
|
||||||
|
|
|
@ -18,9 +18,11 @@
|
||||||
package bisq.core.presentation;
|
package bisq.core.presentation;
|
||||||
|
|
||||||
import bisq.core.btc.Balances;
|
import bisq.core.btc.Balances;
|
||||||
import bisq.core.util.BSFormatter;
|
import bisq.core.util.FormattingUtils;
|
||||||
|
import bisq.core.util.coin.CoinFormatter;
|
||||||
|
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
import javax.inject.Named;
|
||||||
|
|
||||||
import javafx.beans.property.SimpleStringProperty;
|
import javafx.beans.property.SimpleStringProperty;
|
||||||
import javafx.beans.property.StringProperty;
|
import javafx.beans.property.StringProperty;
|
||||||
|
@ -38,7 +40,7 @@ public class BalancePresentation {
|
||||||
private final StringProperty lockedBalance = new SimpleStringProperty();
|
private final StringProperty lockedBalance = new SimpleStringProperty();
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
public BalancePresentation(Balances balances, BSFormatter formatter) {
|
public BalancePresentation(Balances balances, @Named(FormattingUtils.BTC_FORMATTER_KEY) CoinFormatter formatter) {
|
||||||
balances.getAvailableBalance().addListener((observable, oldValue, newValue) -> {
|
balances.getAvailableBalance().addListener((observable, oldValue, newValue) -> {
|
||||||
String value = formatter.formatCoinWithCode(newValue);
|
String value = formatter.formatCoinWithCode(newValue);
|
||||||
// If we get full precision the BTC postfix breaks layout so we omit it
|
// If we get full precision the BTC postfix breaks layout so we omit it
|
||||||
|
|
|
@ -31,6 +31,8 @@ import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class FormattingUtils {
|
public class FormattingUtils {
|
||||||
|
public static final String BTC_FORMATTER_KEY = "BTC";
|
||||||
|
|
||||||
public final static String RANGE_SEPARATOR = " - ";
|
public final static String RANGE_SEPARATOR = " - ";
|
||||||
|
|
||||||
private static final MonetaryFormat fiatPriceFormat = new MonetaryFormat().shift(0).minDecimals(4).repeatOptionalDecimals(0, 0);
|
private static final MonetaryFormat fiatPriceFormat = new MonetaryFormat().shift(0).minDecimals(4).repeatOptionalDecimals(0, 0);
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package bisq.core.util;
|
package bisq.core.util;
|
||||||
|
|
||||||
import bisq.core.monetary.Price;
|
import bisq.core.monetary.Price;
|
||||||
|
import bisq.core.util.coin.CoinFormatter;
|
||||||
|
|
||||||
import bisq.common.util.MathUtils;
|
import bisq.common.util.MathUtils;
|
||||||
|
|
||||||
|
@ -13,8 +14,8 @@ import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class ParsingUtils {
|
public class ParsingUtils {
|
||||||
public static Coin parseToCoin(String input, BSFormatter bsFormatter) {
|
public static Coin parseToCoin(String input, CoinFormatter coinFormatter) {
|
||||||
return parseToCoin(input, bsFormatter.getMonetaryFormat());
|
return parseToCoin(input, coinFormatter.getMonetaryFormat());
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Coin parseToCoin(String input, MonetaryFormat coinFormat) {
|
public static Coin parseToCoin(String input, MonetaryFormat coinFormat) {
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
|
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package bisq.core.util;
|
package bisq.core.util.coin;
|
||||||
|
|
||||||
import bisq.core.app.BisqEnvironment;
|
import bisq.core.app.BisqEnvironment;
|
||||||
import bisq.core.dao.governance.param.Param;
|
import bisq.core.dao.governance.param.Param;
|
||||||
|
@ -23,6 +23,8 @@ import bisq.core.dao.governance.proposal.ProposalValidationException;
|
||||||
import bisq.core.locale.GlobalSettings;
|
import bisq.core.locale.GlobalSettings;
|
||||||
import bisq.core.locale.Res;
|
import bisq.core.locale.Res;
|
||||||
import bisq.core.provider.price.MarketPrice;
|
import bisq.core.provider.price.MarketPrice;
|
||||||
|
import bisq.core.util.FormattingUtils;
|
||||||
|
import bisq.core.util.ParsingUtils;
|
||||||
import bisq.core.util.validation.BtcAddressValidator;
|
import bisq.core.util.validation.BtcAddressValidator;
|
||||||
import bisq.core.util.validation.InputValidator;
|
import bisq.core.util.validation.InputValidator;
|
||||||
|
|
||||||
|
@ -42,11 +44,25 @@ import java.text.NumberFormat;
|
||||||
|
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
|
|
||||||
|
import lombok.Getter;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@Singleton
|
@Singleton
|
||||||
public class BsqFormatter extends BSFormatter {
|
public class BsqFormatter implements CoinFormatter {
|
||||||
|
private final ImmutableCoinFormatter immutableCoinFormatter;
|
||||||
|
|
||||||
|
// We don't support localized formatting. Format is always using "." as decimal mark and no grouping separator.
|
||||||
|
// Input of "," as decimal mark (like in german locale) will be replaced with ".".
|
||||||
|
// Input of a group separator (1,123,45) lead to an validation error.
|
||||||
|
// Note: BtcFormat was intended to be used, but it lead to many problems (automatic format to mBit,
|
||||||
|
// no way to remove grouping separator). It seems to be not optimal for user input formatting.
|
||||||
|
@Getter
|
||||||
|
private MonetaryFormat monetaryFormat;
|
||||||
|
|
||||||
|
|
||||||
@SuppressWarnings("PointlessBooleanExpression")
|
@SuppressWarnings("PointlessBooleanExpression")
|
||||||
private static final boolean useBsqAddressFormat = true || !DevEnv.isDevMode();
|
private static final boolean useBsqAddressFormat = true || !DevEnv.isDevMode();
|
||||||
private final String prefix = "B";
|
private final String prefix = "B";
|
||||||
|
@ -56,12 +72,13 @@ public class BsqFormatter extends BSFormatter {
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
public BsqFormatter() {
|
public BsqFormatter() {
|
||||||
super();
|
this.monetaryFormat = BisqEnvironment.getParameters().getMonetaryFormat();
|
||||||
|
this.immutableCoinFormatter = new ImmutableCoinFormatter(BisqEnvironment.getParameters().getMonetaryFormat());
|
||||||
|
|
||||||
GlobalSettings.localeProperty().addListener((observable, oldValue, newValue) -> setFormatter(newValue));
|
GlobalSettings.localeProperty().addListener((observable, oldValue, newValue) -> switchLocale(newValue));
|
||||||
setFormatter(GlobalSettings.getLocale());
|
switchLocale(GlobalSettings.getLocale());
|
||||||
|
|
||||||
btcCoinFormat = super.monetaryFormat;
|
btcCoinFormat = monetaryFormat;
|
||||||
|
|
||||||
final String baseCurrencyCode = BisqEnvironment.getBaseCurrencyNetwork().getCurrencyCode();
|
final String baseCurrencyCode = BisqEnvironment.getBaseCurrencyNetwork().getCurrencyCode();
|
||||||
switch (baseCurrencyCode) {
|
switch (baseCurrencyCode) {
|
||||||
|
@ -75,7 +92,7 @@ public class BsqFormatter extends BSFormatter {
|
||||||
amountFormat.setMinimumFractionDigits(2);
|
amountFormat.setMinimumFractionDigits(2);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setFormatter(Locale locale) {
|
private void switchLocale(Locale locale) {
|
||||||
amountFormat = (DecimalFormat) NumberFormat.getNumberInstance(locale);
|
amountFormat = (DecimalFormat) NumberFormat.getNumberInstance(locale);
|
||||||
amountFormat.setMinimumFractionDigits(2);
|
amountFormat.setMinimumFractionDigits(2);
|
||||||
amountFormat.setMaximumFractionDigits(2);
|
amountFormat.setMaximumFractionDigits(2);
|
||||||
|
@ -142,7 +159,7 @@ public class BsqFormatter extends BSFormatter {
|
||||||
return FormattingUtils.formatCoinWithCode(coin, btcCoinFormat);
|
return FormattingUtils.formatCoinWithCode(coin, btcCoinFormat);
|
||||||
}
|
}
|
||||||
|
|
||||||
public String formatBTC(Coin coin) {
|
private String formatBTC(Coin coin) {
|
||||||
return FormattingUtils.formatCoin(coin.value, btcCoinFormat);
|
return FormattingUtils.formatCoin(coin.value, btcCoinFormat);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -150,22 +167,6 @@ public class BsqFormatter extends BSFormatter {
|
||||||
return ParsingUtils.parseToCoin(input, btcCoinFormat);
|
return ParsingUtils.parseToCoin(input, btcCoinFormat);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void validateBtcInput(String input) throws ProposalValidationException {
|
|
||||||
validateCoinInput(input, btcCoinFormat);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void validateBsqInput(String input) throws ProposalValidationException {
|
|
||||||
validateCoinInput(input, this.monetaryFormat);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void validateCoinInput(String input, MonetaryFormat coinFormat) throws ProposalValidationException {
|
|
||||||
try {
|
|
||||||
coinFormat.parse(ParsingUtils.cleanDoubleInput(input));
|
|
||||||
} catch (Throwable t) {
|
|
||||||
throw new ProposalValidationException("Invalid format for a " + coinFormat.code() + " value");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public String formatParamValue(Param param, String value) {
|
public String formatParamValue(Param param, String value) {
|
||||||
switch (param.getParamType()) {
|
switch (param.getParamType()) {
|
||||||
case UNDEFINED:
|
case UNDEFINED:
|
||||||
|
@ -198,7 +199,7 @@ public class BsqFormatter extends BSFormatter {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public int parseParamValueToBlocks(Param param, String inputValue) {
|
private int parseParamValueToBlocks(Param param, String inputValue) {
|
||||||
switch (param.getParamType()) {
|
switch (param.getParamType()) {
|
||||||
case BLOCK:
|
case BLOCK:
|
||||||
return Integer.parseInt(inputValue);
|
return Integer.parseInt(inputValue);
|
||||||
|
@ -230,4 +231,28 @@ public class BsqFormatter extends BSFormatter {
|
||||||
return Res.get("shared.na");
|
return Res.get("shared.na");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String formatCoin(Coin coin) {
|
||||||
|
return immutableCoinFormatter.formatCoin(coin);
|
||||||
|
}
|
||||||
|
|
||||||
|
@NotNull
|
||||||
|
public String formatCoin(Coin coin, int decimalPlaces) {
|
||||||
|
return immutableCoinFormatter.formatCoin(coin, decimalPlaces);
|
||||||
|
}
|
||||||
|
|
||||||
|
public String formatCoin(Coin coin,
|
||||||
|
int decimalPlaces,
|
||||||
|
boolean decimalAligned,
|
||||||
|
int maxNumberOfDigits) {
|
||||||
|
return immutableCoinFormatter.formatCoin(coin, decimalPlaces, decimalAligned, maxNumberOfDigits);
|
||||||
|
}
|
||||||
|
|
||||||
|
public String formatCoinWithCode(Coin coin) {
|
||||||
|
return immutableCoinFormatter.formatCoinWithCode(coin);
|
||||||
|
}
|
||||||
|
|
||||||
|
public String formatCoinWithCode(long value) {
|
||||||
|
return immutableCoinFormatter.formatCoinWithCode(value);
|
||||||
|
}
|
||||||
}
|
}
|
20
core/src/main/java/bisq/core/util/coin/CoinFormatter.java
Normal file
20
core/src/main/java/bisq/core/util/coin/CoinFormatter.java
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
package bisq.core.util.coin;
|
||||||
|
|
||||||
|
import org.bitcoinj.core.Coin;
|
||||||
|
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
|
public interface CoinFormatter {
|
||||||
|
String formatCoin(Coin coin);
|
||||||
|
|
||||||
|
@NotNull
|
||||||
|
String formatCoin(Coin coin, int decimalPlaces);
|
||||||
|
|
||||||
|
String formatCoin(Coin coin, int decimalPlaces, boolean decimalAligned, int maxNumberOfDigits);
|
||||||
|
|
||||||
|
String formatCoinWithCode(Coin coin);
|
||||||
|
|
||||||
|
String formatCoinWithCode(long value);
|
||||||
|
|
||||||
|
org.bitcoinj.utils.MonetaryFormat getMonetaryFormat();
|
||||||
|
}
|
|
@ -15,7 +15,7 @@
|
||||||
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
|
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package bisq.core.util;
|
package bisq.core.util.coin;
|
||||||
|
|
||||||
import bisq.common.util.MathUtils;
|
import bisq.common.util.MathUtils;
|
||||||
|
|
|
@ -15,52 +15,25 @@
|
||||||
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
|
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package bisq.core.util;
|
package bisq.core.util.coin;
|
||||||
|
|
||||||
import bisq.core.app.BisqEnvironment;
|
import bisq.core.app.BisqEnvironment;
|
||||||
import bisq.core.locale.CurrencyUtil;
|
import bisq.core.util.FormattingUtils;
|
||||||
import bisq.core.locale.GlobalSettings;
|
import bisq.core.util.coin.CoinFormatter;
|
||||||
import bisq.core.locale.Res;
|
|
||||||
import bisq.core.monetary.Altcoin;
|
|
||||||
import bisq.core.monetary.Price;
|
|
||||||
import bisq.core.offer.OfferPayload;
|
|
||||||
|
|
||||||
import bisq.network.p2p.NodeAddress;
|
|
||||||
|
|
||||||
import bisq.common.util.MathUtils;
|
|
||||||
|
|
||||||
import org.bitcoinj.core.Coin;
|
import org.bitcoinj.core.Coin;
|
||||||
import org.bitcoinj.core.Monetary;
|
|
||||||
import org.bitcoinj.utils.Fiat;
|
|
||||||
import org.bitcoinj.utils.MonetaryFormat;
|
import org.bitcoinj.utils.MonetaryFormat;
|
||||||
|
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
import javax.inject.Singleton;
|
import javax.inject.Singleton;
|
||||||
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
|
||||||
import org.apache.commons.lang3.time.DateUtils;
|
|
||||||
import org.apache.commons.lang3.time.DurationFormatUtils;
|
|
||||||
|
|
||||||
import java.text.DateFormat;
|
|
||||||
import java.text.DecimalFormat;
|
|
||||||
import java.text.SimpleDateFormat;
|
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
|
|
||||||
import java.util.Date;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Locale;
|
|
||||||
import java.util.TimeZone;
|
|
||||||
import java.util.stream.Collectors;
|
|
||||||
|
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@Singleton
|
public class ImmutableCoinFormatter implements CoinFormatter {
|
||||||
public class BSFormatter {
|
|
||||||
|
|
||||||
// We don't support localized formatting. Format is always using "." as decimal mark and no grouping separator.
|
// We don't support localized formatting. Format is always using "." as decimal mark and no grouping separator.
|
||||||
// Input of "," as decimal mark (like in german locale) will be replaced with ".".
|
// Input of "," as decimal mark (like in german locale) will be replaced with ".".
|
||||||
|
@ -68,14 +41,11 @@ public class BSFormatter {
|
||||||
// Note: BtcFormat was intended to be used, but it lead to many problems (automatic format to mBit,
|
// Note: BtcFormat was intended to be used, but it lead to many problems (automatic format to mBit,
|
||||||
// no way to remove grouping separator). It seems to be not optimal for user input formatting.
|
// no way to remove grouping separator). It seems to be not optimal for user input formatting.
|
||||||
@Getter
|
@Getter
|
||||||
protected MonetaryFormat monetaryFormat;
|
private MonetaryFormat monetaryFormat;
|
||||||
|
|
||||||
// protected String currencyCode = CurrencyUtil.getDefaultFiatCurrencyAsCode();
|
|
||||||
|
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
public BSFormatter() {
|
public ImmutableCoinFormatter(MonetaryFormat monetaryFormat) {
|
||||||
monetaryFormat = BisqEnvironment.getParameters().getMonetaryFormat();
|
this.monetaryFormat = monetaryFormat;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -83,31 +53,29 @@ public class BSFormatter {
|
||||||
// BTC
|
// BTC
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
@Override
|
||||||
public String formatCoin(Coin coin) {
|
public String formatCoin(Coin coin) {
|
||||||
return formatCoin(coin, -1);
|
return formatCoin(coin, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
@NotNull
|
@NotNull
|
||||||
public String formatCoin(Coin coin, int decimalPlaces) {
|
public String formatCoin(Coin coin, int decimalPlaces) {
|
||||||
return formatCoin(coin, decimalPlaces, false, 0);
|
return formatCoin(coin, decimalPlaces, false, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String formatCoin(Coin coin, int decimalPlaces, boolean decimalAligned, int maxNumberOfDigits) {
|
public String formatCoin(Coin coin, int decimalPlaces, boolean decimalAligned, int maxNumberOfDigits) {
|
||||||
return FormattingUtils.formatCoin(coin, decimalPlaces, decimalAligned, maxNumberOfDigits, monetaryFormat);
|
return FormattingUtils.formatCoin(coin, decimalPlaces, decimalAligned, maxNumberOfDigits, monetaryFormat);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String formatCoinWithCode(Coin coin) {
|
public String formatCoinWithCode(Coin coin) {
|
||||||
return FormattingUtils.formatCoinWithCode(coin, monetaryFormat);
|
return FormattingUtils.formatCoinWithCode(coin, monetaryFormat);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String formatCoinWithCode(long value) {
|
public String formatCoinWithCode(long value) {
|
||||||
return FormattingUtils.formatCoinWithCode(Coin.valueOf(value), monetaryFormat);
|
return FormattingUtils.formatCoinWithCode(Coin.valueOf(value), monetaryFormat);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getDateFromBlockHeight(long blockHeight) {
|
|
||||||
long now = new Date().getTime();
|
|
||||||
SimpleDateFormat dateFormatter = new SimpleDateFormat("dd MMM", Locale.getDefault());
|
|
||||||
SimpleDateFormat timeFormatter = new SimpleDateFormat("HH:mm", Locale.getDefault());
|
|
||||||
return FormattingUtils.formatDateTime(new Date(now + blockHeight * 10 * 60 * 1000L), dateFormatter, timeFormatter);
|
|
||||||
}
|
|
||||||
}
|
}
|
|
@ -19,7 +19,7 @@ package bisq.core.dao.governance.proposal.param;
|
||||||
|
|
||||||
import bisq.core.dao.governance.param.Param;
|
import bisq.core.dao.governance.param.Param;
|
||||||
import bisq.core.locale.Res;
|
import bisq.core.locale.Res;
|
||||||
import bisq.core.util.BsqFormatter;
|
import bisq.core.util.coin.BsqFormatter;
|
||||||
|
|
||||||
import org.junit.Assert;
|
import org.junit.Assert;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
|
|
|
@ -19,7 +19,7 @@ package bisq.core.dao.state;
|
||||||
|
|
||||||
import bisq.core.dao.state.model.DaoState;
|
import bisq.core.dao.state.model.DaoState;
|
||||||
import bisq.core.dao.state.model.blockchain.Block;
|
import bisq.core.dao.state.model.blockchain.Block;
|
||||||
import bisq.core.util.BsqFormatter;
|
import bisq.core.util.coin.BsqFormatter;
|
||||||
|
|
||||||
import org.bitcoinj.core.Coin;
|
import org.bitcoinj.core.Coin;
|
||||||
|
|
||||||
|
|
|
@ -17,6 +17,8 @@
|
||||||
|
|
||||||
package bisq.core.util;
|
package bisq.core.util;
|
||||||
|
|
||||||
|
import bisq.core.util.coin.CoinUtil;
|
||||||
|
|
||||||
import org.bitcoinj.core.Coin;
|
import org.bitcoinj.core.Coin;
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
|
|
||||||
package bisq.desktop.components;
|
package bisq.desktop.components;
|
||||||
|
|
||||||
import bisq.core.util.BSFormatter;
|
import bisq.core.util.coin.CoinFormatter;
|
||||||
|
|
||||||
import org.bitcoinj.core.Coin;
|
import org.bitcoinj.core.Coin;
|
||||||
|
|
||||||
|
@ -37,7 +37,7 @@ public class BalanceTextField extends AnchorPane {
|
||||||
private final JFXTextField textField;
|
private final JFXTextField textField;
|
||||||
private final Effect fundedEffect = new DropShadow(BlurType.THREE_PASS_BOX, Color.GREEN, 4, 0.0, 0, 0);
|
private final Effect fundedEffect = new DropShadow(BlurType.THREE_PASS_BOX, Color.GREEN, 4, 0.0, 0, 0);
|
||||||
private final Effect notFundedEffect = new DropShadow(BlurType.THREE_PASS_BOX, Color.ORANGERED, 4, 0.0, 0, 0);
|
private final Effect notFundedEffect = new DropShadow(BlurType.THREE_PASS_BOX, Color.ORANGERED, 4, 0.0, 0, 0);
|
||||||
private BSFormatter formatter;
|
private CoinFormatter formatter;
|
||||||
@Nullable
|
@Nullable
|
||||||
private Coin balance;
|
private Coin balance;
|
||||||
|
|
||||||
|
@ -60,7 +60,7 @@ public class BalanceTextField extends AnchorPane {
|
||||||
getChildren().addAll(textField);
|
getChildren().addAll(textField);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setFormatter(BSFormatter formatter) {
|
public void setFormatter(CoinFormatter formatter) {
|
||||||
this.formatter = formatter;
|
this.formatter = formatter;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@ import bisq.desktop.util.GUIUtil;
|
||||||
import bisq.core.btc.listeners.AddressConfidenceListener;
|
import bisq.core.btc.listeners.AddressConfidenceListener;
|
||||||
import bisq.core.btc.listeners.BalanceListener;
|
import bisq.core.btc.listeners.BalanceListener;
|
||||||
import bisq.core.btc.wallet.BtcWalletService;
|
import bisq.core.btc.wallet.BtcWalletService;
|
||||||
import bisq.core.util.BSFormatter;
|
import bisq.core.util.coin.CoinFormatter;
|
||||||
|
|
||||||
import org.bitcoinj.core.Address;
|
import org.bitcoinj.core.Address;
|
||||||
import org.bitcoinj.core.Coin;
|
import org.bitcoinj.core.Coin;
|
||||||
|
@ -56,7 +56,7 @@ public class BalanceWithConfirmationTextField extends AnchorPane {
|
||||||
|
|
||||||
private final Effect fundedEffect = new DropShadow(BlurType.THREE_PASS_BOX, Color.GREEN, 4, 0.0, 0, 0);
|
private final Effect fundedEffect = new DropShadow(BlurType.THREE_PASS_BOX, Color.GREEN, 4, 0.0, 0, 0);
|
||||||
private final Effect notFundedEffect = new DropShadow(BlurType.THREE_PASS_BOX, Color.ORANGERED, 4, 0.0, 0, 0);
|
private final Effect notFundedEffect = new DropShadow(BlurType.THREE_PASS_BOX, Color.ORANGERED, 4, 0.0, 0, 0);
|
||||||
private BSFormatter formatter;
|
private CoinFormatter formatter;
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -91,7 +91,7 @@ public class BalanceWithConfirmationTextField extends AnchorPane {
|
||||||
walletService.removeAddressConfidenceListener(confidenceListener);
|
walletService.removeAddressConfidenceListener(confidenceListener);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setup(Address address, BSFormatter formatter) {
|
public void setup(Address address, CoinFormatter formatter) {
|
||||||
this.formatter = formatter;
|
this.formatter = formatter;
|
||||||
confidenceListener = new AddressConfidenceListener(address) {
|
confidenceListener = new AddressConfidenceListener(address) {
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -4,7 +4,7 @@ import bisq.core.account.witness.AccountAgeWitnessService;
|
||||||
import bisq.core.alert.PrivateNotificationManager;
|
import bisq.core.alert.PrivateNotificationManager;
|
||||||
import bisq.core.offer.Offer;
|
import bisq.core.offer.Offer;
|
||||||
import bisq.core.user.Preferences;
|
import bisq.core.user.Preferences;
|
||||||
import bisq.core.util.BSFormatter;
|
import bisq.core.util.coin.CoinFormatter;
|
||||||
|
|
||||||
import bisq.network.p2p.NodeAddress;
|
import bisq.network.p2p.NodeAddress;
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ public class PeerInfoIconSmall extends PeerInfoIcon {
|
||||||
String role, Offer offer,
|
String role, Offer offer,
|
||||||
Preferences preferences,
|
Preferences preferences,
|
||||||
AccountAgeWitnessService accountAgeWitnessService,
|
AccountAgeWitnessService accountAgeWitnessService,
|
||||||
BSFormatter formatter,
|
CoinFormatter formatter,
|
||||||
boolean useDevPrivilegeKeys) {
|
boolean useDevPrivilegeKeys) {
|
||||||
// We don't want to show number of trades in that case as it would be unreadable.
|
// We don't want to show number of trades in that case as it would be unreadable.
|
||||||
// Also we don't need the privateNotificationManager as no interaction will take place with this icon.
|
// Also we don't need the privateNotificationManager as no interaction will take place with this icon.
|
||||||
|
|
|
@ -29,7 +29,7 @@ import bisq.core.payment.AdvancedCashAccount;
|
||||||
import bisq.core.payment.PaymentAccount;
|
import bisq.core.payment.PaymentAccount;
|
||||||
import bisq.core.payment.payload.AdvancedCashAccountPayload;
|
import bisq.core.payment.payload.AdvancedCashAccountPayload;
|
||||||
import bisq.core.payment.payload.PaymentAccountPayload;
|
import bisq.core.payment.payload.PaymentAccountPayload;
|
||||||
import bisq.core.util.BSFormatter;
|
import bisq.core.util.coin.CoinFormatter;
|
||||||
import bisq.core.util.validation.InputValidator;
|
import bisq.core.util.validation.InputValidator;
|
||||||
|
|
||||||
import bisq.common.util.Tuple2;
|
import bisq.common.util.Tuple2;
|
||||||
|
@ -63,7 +63,7 @@ public class AdvancedCashForm extends PaymentMethodForm {
|
||||||
}
|
}
|
||||||
|
|
||||||
public AdvancedCashForm(PaymentAccount paymentAccount, AccountAgeWitnessService accountAgeWitnessService, AdvancedCashValidator advancedCashValidator,
|
public AdvancedCashForm(PaymentAccount paymentAccount, AccountAgeWitnessService accountAgeWitnessService, AdvancedCashValidator advancedCashValidator,
|
||||||
InputValidator inputValidator, GridPane gridPane, int gridRow, BSFormatter formatter) {
|
InputValidator inputValidator, GridPane gridPane, int gridRow, CoinFormatter formatter) {
|
||||||
super(paymentAccount, accountAgeWitnessService, inputValidator, gridPane, gridRow, formatter);
|
super(paymentAccount, accountAgeWitnessService, inputValidator, gridPane, gridRow, formatter);
|
||||||
this.advancedCashAccount = (AdvancedCashAccount) paymentAccount;
|
this.advancedCashAccount = (AdvancedCashAccount) paymentAccount;
|
||||||
this.advancedCashValidator = advancedCashValidator;
|
this.advancedCashValidator = advancedCashValidator;
|
||||||
|
|
|
@ -25,7 +25,7 @@ import bisq.core.payment.AliPayAccount;
|
||||||
import bisq.core.payment.PaymentAccount;
|
import bisq.core.payment.PaymentAccount;
|
||||||
import bisq.core.payment.payload.AliPayAccountPayload;
|
import bisq.core.payment.payload.AliPayAccountPayload;
|
||||||
import bisq.core.payment.payload.PaymentAccountPayload;
|
import bisq.core.payment.payload.PaymentAccountPayload;
|
||||||
import bisq.core.util.BSFormatter;
|
import bisq.core.util.coin.CoinFormatter;
|
||||||
import bisq.core.util.validation.InputValidator;
|
import bisq.core.util.validation.InputValidator;
|
||||||
|
|
||||||
import javafx.scene.layout.GridPane;
|
import javafx.scene.layout.GridPane;
|
||||||
|
@ -41,7 +41,7 @@ public class AliPayForm extends GeneralAccountNumberForm {
|
||||||
return gridRow;
|
return gridRow;
|
||||||
}
|
}
|
||||||
|
|
||||||
public AliPayForm(PaymentAccount paymentAccount, AccountAgeWitnessService accountAgeWitnessService, AliPayValidator aliPayValidator, InputValidator inputValidator, GridPane gridPane, int gridRow, BSFormatter formatter) {
|
public AliPayForm(PaymentAccount paymentAccount, AccountAgeWitnessService accountAgeWitnessService, AliPayValidator aliPayValidator, InputValidator inputValidator, GridPane gridPane, int gridRow, CoinFormatter formatter) {
|
||||||
super(paymentAccount, accountAgeWitnessService, inputValidator, gridPane, gridRow, formatter);
|
super(paymentAccount, accountAgeWitnessService, inputValidator, gridPane, gridRow, formatter);
|
||||||
this.aliPayAccount = (AliPayAccount) paymentAccount;
|
this.aliPayAccount = (AliPayAccount) paymentAccount;
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,7 +36,7 @@ import bisq.core.payment.payload.AssetsAccountPayload;
|
||||||
import bisq.core.payment.payload.PaymentAccountPayload;
|
import bisq.core.payment.payload.PaymentAccountPayload;
|
||||||
import bisq.core.payment.validation.AltCoinAddressValidator;
|
import bisq.core.payment.validation.AltCoinAddressValidator;
|
||||||
import bisq.core.user.Preferences;
|
import bisq.core.user.Preferences;
|
||||||
import bisq.core.util.BSFormatter;
|
import bisq.core.util.coin.CoinFormatter;
|
||||||
import bisq.core.util.validation.InputValidator;
|
import bisq.core.util.validation.InputValidator;
|
||||||
|
|
||||||
import bisq.common.util.Tuple3;
|
import bisq.common.util.Tuple3;
|
||||||
|
@ -86,7 +86,7 @@ public class AssetsForm extends PaymentMethodForm {
|
||||||
InputValidator inputValidator,
|
InputValidator inputValidator,
|
||||||
GridPane gridPane,
|
GridPane gridPane,
|
||||||
int gridRow,
|
int gridRow,
|
||||||
BSFormatter formatter,
|
CoinFormatter formatter,
|
||||||
AssetService assetService,
|
AssetService assetService,
|
||||||
FilterManager filterManager,
|
FilterManager filterManager,
|
||||||
Preferences preferences) {
|
Preferences preferences) {
|
||||||
|
|
|
@ -33,7 +33,7 @@ import bisq.core.payment.CountryBasedPaymentAccount;
|
||||||
import bisq.core.payment.PaymentAccount;
|
import bisq.core.payment.PaymentAccount;
|
||||||
import bisq.core.payment.payload.BankAccountPayload;
|
import bisq.core.payment.payload.BankAccountPayload;
|
||||||
import bisq.core.payment.payload.PaymentAccountPayload;
|
import bisq.core.payment.payload.PaymentAccountPayload;
|
||||||
import bisq.core.util.BSFormatter;
|
import bisq.core.util.coin.CoinFormatter;
|
||||||
import bisq.core.util.validation.InputValidator;
|
import bisq.core.util.validation.InputValidator;
|
||||||
|
|
||||||
import bisq.common.util.Tuple2;
|
import bisq.common.util.Tuple2;
|
||||||
|
@ -167,7 +167,7 @@ abstract class BankForm extends GeneralBankForm {
|
||||||
private Country selectedCountry;
|
private Country selectedCountry;
|
||||||
|
|
||||||
BankForm(PaymentAccount paymentAccount, AccountAgeWitnessService accountAgeWitnessService, InputValidator inputValidator,
|
BankForm(PaymentAccount paymentAccount, AccountAgeWitnessService accountAgeWitnessService, InputValidator inputValidator,
|
||||||
GridPane gridPane, int gridRow, BSFormatter formatter) {
|
GridPane gridPane, int gridRow, CoinFormatter formatter) {
|
||||||
super(paymentAccount, accountAgeWitnessService, inputValidator, gridPane, gridRow, formatter);
|
super(paymentAccount, accountAgeWitnessService, inputValidator, gridPane, gridRow, formatter);
|
||||||
this.bankAccountPayload = (BankAccountPayload) paymentAccount.paymentAccountPayload;
|
this.bankAccountPayload = (BankAccountPayload) paymentAccount.paymentAccountPayload;
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,7 +34,7 @@ import bisq.core.payment.CountryBasedPaymentAccount;
|
||||||
import bisq.core.payment.PaymentAccount;
|
import bisq.core.payment.PaymentAccount;
|
||||||
import bisq.core.payment.payload.CashDepositAccountPayload;
|
import bisq.core.payment.payload.CashDepositAccountPayload;
|
||||||
import bisq.core.payment.payload.PaymentAccountPayload;
|
import bisq.core.payment.payload.PaymentAccountPayload;
|
||||||
import bisq.core.util.BSFormatter;
|
import bisq.core.util.coin.CoinFormatter;
|
||||||
import bisq.core.util.validation.InputValidator;
|
import bisq.core.util.validation.InputValidator;
|
||||||
|
|
||||||
import bisq.common.util.Tuple2;
|
import bisq.common.util.Tuple2;
|
||||||
|
@ -182,7 +182,7 @@ public class CashDepositForm extends GeneralBankForm {
|
||||||
private Country selectedCountry;
|
private Country selectedCountry;
|
||||||
|
|
||||||
public CashDepositForm(PaymentAccount paymentAccount, AccountAgeWitnessService accountAgeWitnessService, InputValidator inputValidator,
|
public CashDepositForm(PaymentAccount paymentAccount, AccountAgeWitnessService accountAgeWitnessService, InputValidator inputValidator,
|
||||||
GridPane gridPane, int gridRow, BSFormatter formatter) {
|
GridPane gridPane, int gridRow, CoinFormatter formatter) {
|
||||||
super(paymentAccount, accountAgeWitnessService, inputValidator, gridPane, gridRow, formatter);
|
super(paymentAccount, accountAgeWitnessService, inputValidator, gridPane, gridRow, formatter);
|
||||||
this.cashDepositAccountPayload = (CashDepositAccountPayload) paymentAccount.paymentAccountPayload;
|
this.cashDepositAccountPayload = (CashDepositAccountPayload) paymentAccount.paymentAccountPayload;
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,7 @@ import bisq.core.payment.ChaseQuickPayAccount;
|
||||||
import bisq.core.payment.PaymentAccount;
|
import bisq.core.payment.PaymentAccount;
|
||||||
import bisq.core.payment.payload.ChaseQuickPayAccountPayload;
|
import bisq.core.payment.payload.ChaseQuickPayAccountPayload;
|
||||||
import bisq.core.payment.payload.PaymentAccountPayload;
|
import bisq.core.payment.payload.PaymentAccountPayload;
|
||||||
import bisq.core.util.BSFormatter;
|
import bisq.core.util.coin.CoinFormatter;
|
||||||
import bisq.core.util.validation.InputValidator;
|
import bisq.core.util.validation.InputValidator;
|
||||||
|
|
||||||
import javafx.scene.control.TextField;
|
import javafx.scene.control.TextField;
|
||||||
|
@ -53,7 +53,7 @@ public class ChaseQuickPayForm extends PaymentMethodForm {
|
||||||
}
|
}
|
||||||
|
|
||||||
public ChaseQuickPayForm(PaymentAccount paymentAccount, AccountAgeWitnessService accountAgeWitnessService, ChaseQuickPayValidator chaseQuickPayValidator,
|
public ChaseQuickPayForm(PaymentAccount paymentAccount, AccountAgeWitnessService accountAgeWitnessService, ChaseQuickPayValidator chaseQuickPayValidator,
|
||||||
InputValidator inputValidator, GridPane gridPane, int gridRow, BSFormatter formatter) {
|
InputValidator inputValidator, GridPane gridPane, int gridRow, CoinFormatter formatter) {
|
||||||
super(paymentAccount, accountAgeWitnessService, inputValidator, gridPane, gridRow, formatter);
|
super(paymentAccount, accountAgeWitnessService, inputValidator, gridPane, gridRow, formatter);
|
||||||
this.chaseQuickPayAccount = (ChaseQuickPayAccount) paymentAccount;
|
this.chaseQuickPayAccount = (ChaseQuickPayAccount) paymentAccount;
|
||||||
this.chaseQuickPayValidator = chaseQuickPayValidator;
|
this.chaseQuickPayValidator = chaseQuickPayValidator;
|
||||||
|
|
|
@ -29,7 +29,7 @@ import bisq.core.payment.ClearXchangeAccount;
|
||||||
import bisq.core.payment.PaymentAccount;
|
import bisq.core.payment.PaymentAccount;
|
||||||
import bisq.core.payment.payload.ClearXchangeAccountPayload;
|
import bisq.core.payment.payload.ClearXchangeAccountPayload;
|
||||||
import bisq.core.payment.payload.PaymentAccountPayload;
|
import bisq.core.payment.payload.PaymentAccountPayload;
|
||||||
import bisq.core.util.BSFormatter;
|
import bisq.core.util.coin.CoinFormatter;
|
||||||
import bisq.core.util.validation.InputValidator;
|
import bisq.core.util.validation.InputValidator;
|
||||||
|
|
||||||
import javafx.scene.control.TextField;
|
import javafx.scene.control.TextField;
|
||||||
|
@ -52,7 +52,7 @@ public class ClearXchangeForm extends PaymentMethodForm {
|
||||||
return gridRow;
|
return gridRow;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ClearXchangeForm(PaymentAccount paymentAccount, AccountAgeWitnessService accountAgeWitnessService, ClearXchangeValidator clearXchangeValidator, InputValidator inputValidator, GridPane gridPane, int gridRow, BSFormatter formatter) {
|
public ClearXchangeForm(PaymentAccount paymentAccount, AccountAgeWitnessService accountAgeWitnessService, ClearXchangeValidator clearXchangeValidator, InputValidator inputValidator, GridPane gridPane, int gridRow, CoinFormatter formatter) {
|
||||||
super(paymentAccount, accountAgeWitnessService, inputValidator, gridPane, gridRow, formatter);
|
super(paymentAccount, accountAgeWitnessService, inputValidator, gridPane, gridRow, formatter);
|
||||||
this.clearXchangeAccount = (ClearXchangeAccount) paymentAccount;
|
this.clearXchangeAccount = (ClearXchangeAccount) paymentAccount;
|
||||||
this.clearXchangeValidator = clearXchangeValidator;
|
this.clearXchangeValidator = clearXchangeValidator;
|
||||||
|
|
|
@ -36,7 +36,7 @@ import bisq.core.payment.F2FAccount;
|
||||||
import bisq.core.payment.PaymentAccount;
|
import bisq.core.payment.PaymentAccount;
|
||||||
import bisq.core.payment.payload.F2FAccountPayload;
|
import bisq.core.payment.payload.F2FAccountPayload;
|
||||||
import bisq.core.payment.payload.PaymentAccountPayload;
|
import bisq.core.payment.payload.PaymentAccountPayload;
|
||||||
import bisq.core.util.BSFormatter;
|
import bisq.core.util.coin.CoinFormatter;
|
||||||
import bisq.core.util.validation.InputValidator;
|
import bisq.core.util.validation.InputValidator;
|
||||||
|
|
||||||
import bisq.common.util.Tuple2;
|
import bisq.common.util.Tuple2;
|
||||||
|
@ -74,7 +74,7 @@ public class F2FForm extends PaymentMethodForm {
|
||||||
|
|
||||||
public F2FForm(PaymentAccount paymentAccount,
|
public F2FForm(PaymentAccount paymentAccount,
|
||||||
AccountAgeWitnessService accountAgeWitnessService, F2FValidator f2fValidator,
|
AccountAgeWitnessService accountAgeWitnessService, F2FValidator f2fValidator,
|
||||||
InputValidator inputValidator, GridPane gridPane, int gridRow, BSFormatter formatter) {
|
InputValidator inputValidator, GridPane gridPane, int gridRow, CoinFormatter formatter) {
|
||||||
super(paymentAccount, accountAgeWitnessService, inputValidator, gridPane, gridRow, formatter);
|
super(paymentAccount, accountAgeWitnessService, inputValidator, gridPane, gridRow, formatter);
|
||||||
|
|
||||||
this.f2fAccount = (F2FAccount) paymentAccount;
|
this.f2fAccount = (F2FAccount) paymentAccount;
|
||||||
|
|
|
@ -30,7 +30,7 @@ import bisq.core.payment.FasterPaymentsAccount;
|
||||||
import bisq.core.payment.PaymentAccount;
|
import bisq.core.payment.PaymentAccount;
|
||||||
import bisq.core.payment.payload.FasterPaymentsAccountPayload;
|
import bisq.core.payment.payload.FasterPaymentsAccountPayload;
|
||||||
import bisq.core.payment.payload.PaymentAccountPayload;
|
import bisq.core.payment.payload.PaymentAccountPayload;
|
||||||
import bisq.core.util.BSFormatter;
|
import bisq.core.util.coin.CoinFormatter;
|
||||||
import bisq.core.util.validation.InputValidator;
|
import bisq.core.util.validation.InputValidator;
|
||||||
|
|
||||||
import javafx.scene.control.TextField;
|
import javafx.scene.control.TextField;
|
||||||
|
@ -58,7 +58,7 @@ public class FasterPaymentsForm extends PaymentMethodForm {
|
||||||
private InputTextField sortCodeInputTextField;
|
private InputTextField sortCodeInputTextField;
|
||||||
|
|
||||||
public FasterPaymentsForm(PaymentAccount paymentAccount, AccountAgeWitnessService accountAgeWitnessService, InputValidator inputValidator, GridPane gridPane,
|
public FasterPaymentsForm(PaymentAccount paymentAccount, AccountAgeWitnessService accountAgeWitnessService, InputValidator inputValidator, GridPane gridPane,
|
||||||
int gridRow, BSFormatter formatter) {
|
int gridRow, CoinFormatter formatter) {
|
||||||
super(paymentAccount, accountAgeWitnessService, inputValidator, gridPane, gridRow, formatter);
|
super(paymentAccount, accountAgeWitnessService, inputValidator, gridPane, gridRow, formatter);
|
||||||
this.fasterPaymentsAccount = (FasterPaymentsAccount) paymentAccount;
|
this.fasterPaymentsAccount = (FasterPaymentsAccount) paymentAccount;
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,7 @@ import bisq.core.locale.Res;
|
||||||
import bisq.core.locale.TradeCurrency;
|
import bisq.core.locale.TradeCurrency;
|
||||||
import bisq.core.payment.PaymentAccount;
|
import bisq.core.payment.PaymentAccount;
|
||||||
import bisq.core.payment.payload.PaymentMethod;
|
import bisq.core.payment.payload.PaymentMethod;
|
||||||
import bisq.core.util.BSFormatter;
|
import bisq.core.util.coin.CoinFormatter;
|
||||||
import bisq.core.util.validation.InputValidator;
|
import bisq.core.util.validation.InputValidator;
|
||||||
|
|
||||||
import javafx.scene.control.TextField;
|
import javafx.scene.control.TextField;
|
||||||
|
@ -22,7 +22,7 @@ public abstract class GeneralAccountNumberForm extends PaymentMethodForm {
|
||||||
|
|
||||||
private InputTextField accountNrInputTextField;
|
private InputTextField accountNrInputTextField;
|
||||||
|
|
||||||
GeneralAccountNumberForm(PaymentAccount paymentAccount, AccountAgeWitnessService accountAgeWitnessService, InputValidator inputValidator, GridPane gridPane, int gridRow, BSFormatter formatter) {
|
GeneralAccountNumberForm(PaymentAccount paymentAccount, AccountAgeWitnessService accountAgeWitnessService, InputValidator inputValidator, GridPane gridPane, int gridRow, CoinFormatter formatter) {
|
||||||
super(paymentAccount, accountAgeWitnessService, inputValidator, gridPane, gridRow, formatter);
|
super(paymentAccount, accountAgeWitnessService, inputValidator, gridPane, gridRow, formatter);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@ import bisq.core.locale.BankUtil;
|
||||||
import bisq.core.locale.Res;
|
import bisq.core.locale.Res;
|
||||||
import bisq.core.payment.PaymentAccount;
|
import bisq.core.payment.PaymentAccount;
|
||||||
import bisq.core.payment.payload.CountryBasedPaymentAccountPayload;
|
import bisq.core.payment.payload.CountryBasedPaymentAccountPayload;
|
||||||
import bisq.core.util.BSFormatter;
|
import bisq.core.util.coin.CoinFormatter;
|
||||||
import bisq.core.util.validation.InputValidator;
|
import bisq.core.util.validation.InputValidator;
|
||||||
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
@ -38,7 +38,7 @@ public abstract class GeneralBankForm extends PaymentMethodForm {
|
||||||
|
|
||||||
boolean accountNrInputTextFieldEdited;
|
boolean accountNrInputTextFieldEdited;
|
||||||
|
|
||||||
public GeneralBankForm(PaymentAccount paymentAccount, AccountAgeWitnessService accountAgeWitnessService, InputValidator inputValidator, GridPane gridPane, int gridRow, BSFormatter formatter) {
|
public GeneralBankForm(PaymentAccount paymentAccount, AccountAgeWitnessService accountAgeWitnessService, InputValidator inputValidator, GridPane gridPane, int gridRow, CoinFormatter formatter) {
|
||||||
super(paymentAccount, accountAgeWitnessService, inputValidator, gridPane, gridRow, formatter);
|
super(paymentAccount, accountAgeWitnessService, inputValidator, gridPane, gridRow, formatter);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@ import bisq.core.locale.Res;
|
||||||
import bisq.core.locale.TradeCurrency;
|
import bisq.core.locale.TradeCurrency;
|
||||||
import bisq.core.payment.CountryBasedPaymentAccount;
|
import bisq.core.payment.CountryBasedPaymentAccount;
|
||||||
import bisq.core.payment.PaymentAccount;
|
import bisq.core.payment.PaymentAccount;
|
||||||
import bisq.core.util.BSFormatter;
|
import bisq.core.util.coin.CoinFormatter;
|
||||||
import bisq.core.util.validation.InputValidator;
|
import bisq.core.util.validation.InputValidator;
|
||||||
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
@ -45,7 +45,7 @@ public abstract class GeneralSepaForm extends PaymentMethodForm {
|
||||||
private ComboBox<TradeCurrency> currencyComboBox;
|
private ComboBox<TradeCurrency> currencyComboBox;
|
||||||
InputTextField ibanInputTextField;
|
InputTextField ibanInputTextField;
|
||||||
|
|
||||||
GeneralSepaForm(PaymentAccount paymentAccount, AccountAgeWitnessService accountAgeWitnessService, InputValidator inputValidator, GridPane gridPane, int gridRow, BSFormatter formatter) {
|
GeneralSepaForm(PaymentAccount paymentAccount, AccountAgeWitnessService accountAgeWitnessService, InputValidator inputValidator, GridPane gridPane, int gridRow, CoinFormatter formatter) {
|
||||||
super(paymentAccount, accountAgeWitnessService, inputValidator, gridPane, gridRow, formatter);
|
super(paymentAccount, accountAgeWitnessService, inputValidator, gridPane, gridRow, formatter);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,7 @@ import bisq.core.payment.HalCashAccount;
|
||||||
import bisq.core.payment.PaymentAccount;
|
import bisq.core.payment.PaymentAccount;
|
||||||
import bisq.core.payment.payload.HalCashAccountPayload;
|
import bisq.core.payment.payload.HalCashAccountPayload;
|
||||||
import bisq.core.payment.payload.PaymentAccountPayload;
|
import bisq.core.payment.payload.PaymentAccountPayload;
|
||||||
import bisq.core.util.BSFormatter;
|
import bisq.core.util.coin.CoinFormatter;
|
||||||
import bisq.core.util.validation.InputValidator;
|
import bisq.core.util.validation.InputValidator;
|
||||||
|
|
||||||
import javafx.scene.control.TextField;
|
import javafx.scene.control.TextField;
|
||||||
|
@ -51,7 +51,7 @@ public class HalCashForm extends PaymentMethodForm {
|
||||||
}
|
}
|
||||||
|
|
||||||
public HalCashForm(PaymentAccount paymentAccount, AccountAgeWitnessService accountAgeWitnessService, HalCashValidator halCashValidator,
|
public HalCashForm(PaymentAccount paymentAccount, AccountAgeWitnessService accountAgeWitnessService, HalCashValidator halCashValidator,
|
||||||
InputValidator inputValidator, GridPane gridPane, int gridRow, BSFormatter formatter) {
|
InputValidator inputValidator, GridPane gridPane, int gridRow, CoinFormatter formatter) {
|
||||||
super(paymentAccount, accountAgeWitnessService, inputValidator, gridPane, gridRow, formatter);
|
super(paymentAccount, accountAgeWitnessService, inputValidator, gridPane, gridRow, formatter);
|
||||||
this.halCashAccount = (HalCashAccount) paymentAccount;
|
this.halCashAccount = (HalCashAccount) paymentAccount;
|
||||||
this.halCashValidator = halCashValidator;
|
this.halCashValidator = halCashValidator;
|
||||||
|
|
|
@ -29,7 +29,7 @@ import bisq.core.payment.InteracETransferAccount;
|
||||||
import bisq.core.payment.PaymentAccount;
|
import bisq.core.payment.PaymentAccount;
|
||||||
import bisq.core.payment.payload.InteracETransferAccountPayload;
|
import bisq.core.payment.payload.InteracETransferAccountPayload;
|
||||||
import bisq.core.payment.payload.PaymentAccountPayload;
|
import bisq.core.payment.payload.PaymentAccountPayload;
|
||||||
import bisq.core.util.BSFormatter;
|
import bisq.core.util.coin.CoinFormatter;
|
||||||
import bisq.core.util.validation.InputValidator;
|
import bisq.core.util.validation.InputValidator;
|
||||||
|
|
||||||
import javafx.scene.layout.GridPane;
|
import javafx.scene.layout.GridPane;
|
||||||
|
@ -57,7 +57,7 @@ public class InteracETransferForm extends PaymentMethodForm {
|
||||||
}
|
}
|
||||||
|
|
||||||
public InteracETransferForm(PaymentAccount paymentAccount, AccountAgeWitnessService accountAgeWitnessService, InteracETransferValidator interacETransferValidator,
|
public InteracETransferForm(PaymentAccount paymentAccount, AccountAgeWitnessService accountAgeWitnessService, InteracETransferValidator interacETransferValidator,
|
||||||
InputValidator inputValidator, GridPane gridPane, int gridRow, BSFormatter formatter) {
|
InputValidator inputValidator, GridPane gridPane, int gridRow, CoinFormatter formatter) {
|
||||||
super(paymentAccount, accountAgeWitnessService, inputValidator, gridPane, gridRow, formatter);
|
super(paymentAccount, accountAgeWitnessService, inputValidator, gridPane, gridRow, formatter);
|
||||||
this.interacETransferAccount = (InteracETransferAccount) paymentAccount;
|
this.interacETransferAccount = (InteracETransferAccount) paymentAccount;
|
||||||
this.interacETransferValidator = interacETransferValidator;
|
this.interacETransferValidator = interacETransferValidator;
|
||||||
|
|
|
@ -36,7 +36,7 @@ import bisq.core.payment.JapanBankAccount;
|
||||||
import bisq.core.payment.PaymentAccount;
|
import bisq.core.payment.PaymentAccount;
|
||||||
import bisq.core.payment.payload.JapanBankAccountPayload;
|
import bisq.core.payment.payload.JapanBankAccountPayload;
|
||||||
import bisq.core.payment.payload.PaymentAccountPayload;
|
import bisq.core.payment.payload.PaymentAccountPayload;
|
||||||
import bisq.core.util.BSFormatter;
|
import bisq.core.util.coin.CoinFormatter;
|
||||||
import bisq.core.util.validation.InputValidator;
|
import bisq.core.util.validation.InputValidator;
|
||||||
|
|
||||||
import bisq.common.util.Tuple2;
|
import bisq.common.util.Tuple2;
|
||||||
|
@ -96,7 +96,7 @@ public class JapanBankTransferForm extends PaymentMethodForm
|
||||||
AccountAgeWitnessService accountAgeWitnessService,
|
AccountAgeWitnessService accountAgeWitnessService,
|
||||||
JapanBankTransferValidator japanBankTransferValidator,
|
JapanBankTransferValidator japanBankTransferValidator,
|
||||||
InputValidator inputValidator, GridPane gridPane,
|
InputValidator inputValidator, GridPane gridPane,
|
||||||
int gridRow, BSFormatter formatter)
|
int gridRow, CoinFormatter formatter)
|
||||||
{
|
{
|
||||||
super(paymentAccount, accountAgeWitnessService, inputValidator, gridPane, gridRow, formatter);
|
super(paymentAccount, accountAgeWitnessService, inputValidator, gridPane, gridRow, formatter);
|
||||||
this.japanBankAccount = (JapanBankAccount) paymentAccount;
|
this.japanBankAccount = (JapanBankAccount) paymentAccount;
|
||||||
|
|
|
@ -29,7 +29,7 @@ import bisq.core.payment.MoneyBeamAccount;
|
||||||
import bisq.core.payment.PaymentAccount;
|
import bisq.core.payment.PaymentAccount;
|
||||||
import bisq.core.payment.payload.MoneyBeamAccountPayload;
|
import bisq.core.payment.payload.MoneyBeamAccountPayload;
|
||||||
import bisq.core.payment.payload.PaymentAccountPayload;
|
import bisq.core.payment.payload.PaymentAccountPayload;
|
||||||
import bisq.core.util.BSFormatter;
|
import bisq.core.util.coin.CoinFormatter;
|
||||||
import bisq.core.util.validation.InputValidator;
|
import bisq.core.util.validation.InputValidator;
|
||||||
|
|
||||||
import javafx.scene.control.TextField;
|
import javafx.scene.control.TextField;
|
||||||
|
@ -49,7 +49,7 @@ public class MoneyBeamForm extends PaymentMethodForm {
|
||||||
return gridRow;
|
return gridRow;
|
||||||
}
|
}
|
||||||
|
|
||||||
public MoneyBeamForm(PaymentAccount paymentAccount, AccountAgeWitnessService accountAgeWitnessService, MoneyBeamValidator moneyBeamValidator, InputValidator inputValidator, GridPane gridPane, int gridRow, BSFormatter formatter) {
|
public MoneyBeamForm(PaymentAccount paymentAccount, AccountAgeWitnessService accountAgeWitnessService, MoneyBeamValidator moneyBeamValidator, InputValidator inputValidator, GridPane gridPane, int gridRow, CoinFormatter formatter) {
|
||||||
super(paymentAccount, accountAgeWitnessService, inputValidator, gridPane, gridRow, formatter);
|
super(paymentAccount, accountAgeWitnessService, inputValidator, gridPane, gridRow, formatter);
|
||||||
this.account = (MoneyBeamAccount) paymentAccount;
|
this.account = (MoneyBeamAccount) paymentAccount;
|
||||||
this.validator = moneyBeamValidator;
|
this.validator = moneyBeamValidator;
|
||||||
|
|
|
@ -32,7 +32,7 @@ import bisq.core.payment.MoneyGramAccount;
|
||||||
import bisq.core.payment.PaymentAccount;
|
import bisq.core.payment.PaymentAccount;
|
||||||
import bisq.core.payment.payload.MoneyGramAccountPayload;
|
import bisq.core.payment.payload.MoneyGramAccountPayload;
|
||||||
import bisq.core.payment.payload.PaymentAccountPayload;
|
import bisq.core.payment.payload.PaymentAccountPayload;
|
||||||
import bisq.core.util.BSFormatter;
|
import bisq.core.util.coin.CoinFormatter;
|
||||||
import bisq.core.util.validation.InputValidator;
|
import bisq.core.util.validation.InputValidator;
|
||||||
|
|
||||||
import bisq.common.util.Tuple2;
|
import bisq.common.util.Tuple2;
|
||||||
|
@ -74,7 +74,7 @@ public class MoneyGramForm extends PaymentMethodForm {
|
||||||
private final EmailValidator emailValidator;
|
private final EmailValidator emailValidator;
|
||||||
|
|
||||||
public MoneyGramForm(PaymentAccount paymentAccount, AccountAgeWitnessService accountAgeWitnessService, InputValidator inputValidator,
|
public MoneyGramForm(PaymentAccount paymentAccount, AccountAgeWitnessService accountAgeWitnessService, InputValidator inputValidator,
|
||||||
GridPane gridPane, int gridRow, BSFormatter formatter) {
|
GridPane gridPane, int gridRow, CoinFormatter formatter) {
|
||||||
super(paymentAccount, accountAgeWitnessService, inputValidator, gridPane, gridRow, formatter);
|
super(paymentAccount, accountAgeWitnessService, inputValidator, gridPane, gridRow, formatter);
|
||||||
this.moneyGramAccountPayload = (MoneyGramAccountPayload) paymentAccount.paymentAccountPayload;
|
this.moneyGramAccountPayload = (MoneyGramAccountPayload) paymentAccount.paymentAccountPayload;
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@ package bisq.desktop.components.paymentmethods;
|
||||||
import bisq.core.account.witness.AccountAgeWitnessService;
|
import bisq.core.account.witness.AccountAgeWitnessService;
|
||||||
import bisq.core.payment.PaymentAccount;
|
import bisq.core.payment.PaymentAccount;
|
||||||
import bisq.core.payment.payload.PaymentAccountPayload;
|
import bisq.core.payment.payload.PaymentAccountPayload;
|
||||||
import bisq.core.util.BSFormatter;
|
import bisq.core.util.coin.CoinFormatter;
|
||||||
import bisq.core.util.validation.InputValidator;
|
import bisq.core.util.validation.InputValidator;
|
||||||
|
|
||||||
import javafx.scene.layout.GridPane;
|
import javafx.scene.layout.GridPane;
|
||||||
|
@ -31,7 +31,7 @@ public class NationalBankForm extends BankForm {
|
||||||
}
|
}
|
||||||
|
|
||||||
public NationalBankForm(PaymentAccount paymentAccount, AccountAgeWitnessService accountAgeWitnessService, InputValidator inputValidator,
|
public NationalBankForm(PaymentAccount paymentAccount, AccountAgeWitnessService accountAgeWitnessService, InputValidator inputValidator,
|
||||||
GridPane gridPane, int gridRow, BSFormatter formatter) {
|
GridPane gridPane, int gridRow, CoinFormatter formatter) {
|
||||||
super(paymentAccount, accountAgeWitnessService, inputValidator, gridPane, gridRow, formatter);
|
super(paymentAccount, accountAgeWitnessService, inputValidator, gridPane, gridRow, formatter);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,7 +38,7 @@ import bisq.core.offer.OfferPayload;
|
||||||
import bisq.core.payment.AssetAccount;
|
import bisq.core.payment.AssetAccount;
|
||||||
import bisq.core.payment.PaymentAccount;
|
import bisq.core.payment.PaymentAccount;
|
||||||
import bisq.core.payment.payload.PaymentMethod;
|
import bisq.core.payment.payload.PaymentMethod;
|
||||||
import bisq.core.util.BSFormatter;
|
import bisq.core.util.coin.CoinFormatter;
|
||||||
import bisq.core.util.validation.InputValidator;
|
import bisq.core.util.validation.InputValidator;
|
||||||
|
|
||||||
import bisq.common.util.Tuple3;
|
import bisq.common.util.Tuple3;
|
||||||
|
@ -81,7 +81,7 @@ public abstract class PaymentMethodForm {
|
||||||
protected final InputValidator inputValidator;
|
protected final InputValidator inputValidator;
|
||||||
protected final GridPane gridPane;
|
protected final GridPane gridPane;
|
||||||
protected int gridRow;
|
protected int gridRow;
|
||||||
private final BSFormatter formatter;
|
private final CoinFormatter formatter;
|
||||||
protected final BooleanProperty allInputsValid = new SimpleBooleanProperty();
|
protected final BooleanProperty allInputsValid = new SimpleBooleanProperty();
|
||||||
|
|
||||||
protected int gridRowFrom;
|
protected int gridRowFrom;
|
||||||
|
@ -90,7 +90,7 @@ public abstract class PaymentMethodForm {
|
||||||
protected ComboBox<TradeCurrency> currencyComboBox;
|
protected ComboBox<TradeCurrency> currencyComboBox;
|
||||||
|
|
||||||
public PaymentMethodForm(PaymentAccount paymentAccount, AccountAgeWitnessService accountAgeWitnessService,
|
public PaymentMethodForm(PaymentAccount paymentAccount, AccountAgeWitnessService accountAgeWitnessService,
|
||||||
InputValidator inputValidator, GridPane gridPane, int gridRow, BSFormatter formatter) {
|
InputValidator inputValidator, GridPane gridPane, int gridRow, CoinFormatter formatter) {
|
||||||
this.paymentAccount = paymentAccount;
|
this.paymentAccount = paymentAccount;
|
||||||
this.accountAgeWitnessService = accountAgeWitnessService;
|
this.accountAgeWitnessService = accountAgeWitnessService;
|
||||||
this.inputValidator = inputValidator;
|
this.inputValidator = inputValidator;
|
||||||
|
|
|
@ -26,7 +26,7 @@ import bisq.core.payment.PaymentAccount;
|
||||||
import bisq.core.payment.PerfectMoneyAccount;
|
import bisq.core.payment.PerfectMoneyAccount;
|
||||||
import bisq.core.payment.payload.PaymentAccountPayload;
|
import bisq.core.payment.payload.PaymentAccountPayload;
|
||||||
import bisq.core.payment.payload.PerfectMoneyAccountPayload;
|
import bisq.core.payment.payload.PerfectMoneyAccountPayload;
|
||||||
import bisq.core.util.BSFormatter;
|
import bisq.core.util.coin.CoinFormatter;
|
||||||
import bisq.core.util.validation.InputValidator;
|
import bisq.core.util.validation.InputValidator;
|
||||||
|
|
||||||
import javafx.scene.layout.GridPane;
|
import javafx.scene.layout.GridPane;
|
||||||
|
@ -45,7 +45,7 @@ public class PerfectMoneyForm extends GeneralAccountNumberForm {
|
||||||
}
|
}
|
||||||
|
|
||||||
public PerfectMoneyForm(PaymentAccount paymentAccount, AccountAgeWitnessService accountAgeWitnessService, PerfectMoneyValidator perfectMoneyValidator, InputValidator inputValidator, GridPane gridPane, int
|
public PerfectMoneyForm(PaymentAccount paymentAccount, AccountAgeWitnessService accountAgeWitnessService, PerfectMoneyValidator perfectMoneyValidator, InputValidator inputValidator, GridPane gridPane, int
|
||||||
gridRow, BSFormatter formatter) {
|
gridRow, CoinFormatter formatter) {
|
||||||
super(paymentAccount, accountAgeWitnessService, inputValidator, gridPane, gridRow, formatter);
|
super(paymentAccount, accountAgeWitnessService, inputValidator, gridPane, gridRow, formatter);
|
||||||
this.perfectMoneyAccount = (PerfectMoneyAccount) paymentAccount;
|
this.perfectMoneyAccount = (PerfectMoneyAccount) paymentAccount;
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,7 +29,7 @@ import bisq.core.payment.PaymentAccount;
|
||||||
import bisq.core.payment.PopmoneyAccount;
|
import bisq.core.payment.PopmoneyAccount;
|
||||||
import bisq.core.payment.payload.PaymentAccountPayload;
|
import bisq.core.payment.payload.PaymentAccountPayload;
|
||||||
import bisq.core.payment.payload.PopmoneyAccountPayload;
|
import bisq.core.payment.payload.PopmoneyAccountPayload;
|
||||||
import bisq.core.util.BSFormatter;
|
import bisq.core.util.coin.CoinFormatter;
|
||||||
import bisq.core.util.validation.InputValidator;
|
import bisq.core.util.validation.InputValidator;
|
||||||
|
|
||||||
import javafx.scene.control.TextField;
|
import javafx.scene.control.TextField;
|
||||||
|
@ -51,7 +51,7 @@ public class PopmoneyForm extends PaymentMethodForm {
|
||||||
return gridRow;
|
return gridRow;
|
||||||
}
|
}
|
||||||
|
|
||||||
public PopmoneyForm(PaymentAccount paymentAccount, AccountAgeWitnessService accountAgeWitnessService, PopmoneyValidator popmoneyValidator, InputValidator inputValidator, GridPane gridPane, int gridRow, BSFormatter formatter) {
|
public PopmoneyForm(PaymentAccount paymentAccount, AccountAgeWitnessService accountAgeWitnessService, PopmoneyValidator popmoneyValidator, InputValidator inputValidator, GridPane gridPane, int gridRow, CoinFormatter formatter) {
|
||||||
super(paymentAccount, accountAgeWitnessService, inputValidator, gridPane, gridRow, formatter);
|
super(paymentAccount, accountAgeWitnessService, inputValidator, gridPane, gridRow, formatter);
|
||||||
this.account = (PopmoneyAccount) paymentAccount;
|
this.account = (PopmoneyAccount) paymentAccount;
|
||||||
this.validator = popmoneyValidator;
|
this.validator = popmoneyValidator;
|
||||||
|
|
|
@ -28,7 +28,7 @@ import bisq.core.payment.PaymentAccount;
|
||||||
import bisq.core.payment.PromptPayAccount;
|
import bisq.core.payment.PromptPayAccount;
|
||||||
import bisq.core.payment.payload.PaymentAccountPayload;
|
import bisq.core.payment.payload.PaymentAccountPayload;
|
||||||
import bisq.core.payment.payload.PromptPayAccountPayload;
|
import bisq.core.payment.payload.PromptPayAccountPayload;
|
||||||
import bisq.core.util.BSFormatter;
|
import bisq.core.util.coin.CoinFormatter;
|
||||||
import bisq.core.util.validation.InputValidator;
|
import bisq.core.util.validation.InputValidator;
|
||||||
|
|
||||||
import javafx.scene.control.TextField;
|
import javafx.scene.control.TextField;
|
||||||
|
@ -51,7 +51,7 @@ public class PromptPayForm extends PaymentMethodForm {
|
||||||
}
|
}
|
||||||
|
|
||||||
public PromptPayForm(PaymentAccount paymentAccount, AccountAgeWitnessService accountAgeWitnessService, PromptPayValidator promptPayValidator,
|
public PromptPayForm(PaymentAccount paymentAccount, AccountAgeWitnessService accountAgeWitnessService, PromptPayValidator promptPayValidator,
|
||||||
InputValidator inputValidator, GridPane gridPane, int gridRow, BSFormatter formatter) {
|
InputValidator inputValidator, GridPane gridPane, int gridRow, CoinFormatter formatter) {
|
||||||
super(paymentAccount, accountAgeWitnessService, inputValidator, gridPane, gridRow, formatter);
|
super(paymentAccount, accountAgeWitnessService, inputValidator, gridPane, gridRow, formatter);
|
||||||
this.promptPayAccount = (PromptPayAccount) paymentAccount;
|
this.promptPayAccount = (PromptPayAccount) paymentAccount;
|
||||||
this.promptPayValidator = promptPayValidator;
|
this.promptPayValidator = promptPayValidator;
|
||||||
|
|
|
@ -29,7 +29,7 @@ import bisq.core.payment.PaymentAccount;
|
||||||
import bisq.core.payment.RevolutAccount;
|
import bisq.core.payment.RevolutAccount;
|
||||||
import bisq.core.payment.payload.PaymentAccountPayload;
|
import bisq.core.payment.payload.PaymentAccountPayload;
|
||||||
import bisq.core.payment.payload.RevolutAccountPayload;
|
import bisq.core.payment.payload.RevolutAccountPayload;
|
||||||
import bisq.core.util.BSFormatter;
|
import bisq.core.util.coin.CoinFormatter;
|
||||||
import bisq.core.util.validation.InputValidator;
|
import bisq.core.util.validation.InputValidator;
|
||||||
|
|
||||||
import javafx.scene.control.TextField;
|
import javafx.scene.control.TextField;
|
||||||
|
@ -64,7 +64,7 @@ public class RevolutForm extends PaymentMethodForm {
|
||||||
|
|
||||||
public RevolutForm(PaymentAccount paymentAccount, AccountAgeWitnessService accountAgeWitnessService,
|
public RevolutForm(PaymentAccount paymentAccount, AccountAgeWitnessService accountAgeWitnessService,
|
||||||
RevolutValidator revolutValidator, InputValidator inputValidator, GridPane gridPane,
|
RevolutValidator revolutValidator, InputValidator inputValidator, GridPane gridPane,
|
||||||
int gridRow, BSFormatter formatter) {
|
int gridRow, CoinFormatter formatter) {
|
||||||
super(paymentAccount, accountAgeWitnessService, inputValidator, gridPane, gridRow, formatter);
|
super(paymentAccount, accountAgeWitnessService, inputValidator, gridPane, gridRow, formatter);
|
||||||
this.account = (RevolutAccount) paymentAccount;
|
this.account = (RevolutAccount) paymentAccount;
|
||||||
this.validator = revolutValidator;
|
this.validator = revolutValidator;
|
||||||
|
|
|
@ -20,7 +20,7 @@ package bisq.desktop.components.paymentmethods;
|
||||||
import bisq.core.account.witness.AccountAgeWitnessService;
|
import bisq.core.account.witness.AccountAgeWitnessService;
|
||||||
import bisq.core.payment.PaymentAccount;
|
import bisq.core.payment.PaymentAccount;
|
||||||
import bisq.core.payment.payload.PaymentAccountPayload;
|
import bisq.core.payment.payload.PaymentAccountPayload;
|
||||||
import bisq.core.util.BSFormatter;
|
import bisq.core.util.coin.CoinFormatter;
|
||||||
import bisq.core.util.validation.InputValidator;
|
import bisq.core.util.validation.InputValidator;
|
||||||
|
|
||||||
import javafx.scene.layout.GridPane;
|
import javafx.scene.layout.GridPane;
|
||||||
|
@ -32,7 +32,7 @@ public class SameBankForm extends BankForm {
|
||||||
}
|
}
|
||||||
|
|
||||||
public SameBankForm(PaymentAccount paymentAccount, AccountAgeWitnessService accountAgeWitnessService, InputValidator inputValidator,
|
public SameBankForm(PaymentAccount paymentAccount, AccountAgeWitnessService accountAgeWitnessService, InputValidator inputValidator,
|
||||||
GridPane gridPane, int gridRow, BSFormatter formatter) {
|
GridPane gridPane, int gridRow, CoinFormatter formatter) {
|
||||||
super(paymentAccount, accountAgeWitnessService, inputValidator, gridPane, gridRow, formatter);
|
super(paymentAccount, accountAgeWitnessService, inputValidator, gridPane, gridRow, formatter);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,7 +34,7 @@ import bisq.core.payment.PaymentAccount;
|
||||||
import bisq.core.payment.SepaAccount;
|
import bisq.core.payment.SepaAccount;
|
||||||
import bisq.core.payment.payload.PaymentAccountPayload;
|
import bisq.core.payment.payload.PaymentAccountPayload;
|
||||||
import bisq.core.payment.payload.SepaAccountPayload;
|
import bisq.core.payment.payload.SepaAccountPayload;
|
||||||
import bisq.core.util.BSFormatter;
|
import bisq.core.util.coin.CoinFormatter;
|
||||||
import bisq.core.util.validation.InputValidator;
|
import bisq.core.util.validation.InputValidator;
|
||||||
|
|
||||||
import javafx.scene.control.CheckBox;
|
import javafx.scene.control.CheckBox;
|
||||||
|
@ -77,7 +77,7 @@ public class SepaForm extends GeneralSepaForm {
|
||||||
|
|
||||||
public SepaForm(PaymentAccount paymentAccount, AccountAgeWitnessService accountAgeWitnessService, IBANValidator ibanValidator,
|
public SepaForm(PaymentAccount paymentAccount, AccountAgeWitnessService accountAgeWitnessService, IBANValidator ibanValidator,
|
||||||
BICValidator bicValidator, InputValidator inputValidator,
|
BICValidator bicValidator, InputValidator inputValidator,
|
||||||
GridPane gridPane, int gridRow, BSFormatter formatter) {
|
GridPane gridPane, int gridRow, CoinFormatter formatter) {
|
||||||
super(paymentAccount, accountAgeWitnessService, inputValidator, gridPane, gridRow, formatter);
|
super(paymentAccount, accountAgeWitnessService, inputValidator, gridPane, gridRow, formatter);
|
||||||
this.sepaAccount = (SepaAccount) paymentAccount;
|
this.sepaAccount = (SepaAccount) paymentAccount;
|
||||||
this.ibanValidator = ibanValidator;
|
this.ibanValidator = ibanValidator;
|
||||||
|
|
|
@ -34,7 +34,7 @@ import bisq.core.payment.PaymentAccount;
|
||||||
import bisq.core.payment.SepaInstantAccount;
|
import bisq.core.payment.SepaInstantAccount;
|
||||||
import bisq.core.payment.payload.PaymentAccountPayload;
|
import bisq.core.payment.payload.PaymentAccountPayload;
|
||||||
import bisq.core.payment.payload.SepaInstantAccountPayload;
|
import bisq.core.payment.payload.SepaInstantAccountPayload;
|
||||||
import bisq.core.util.BSFormatter;
|
import bisq.core.util.coin.CoinFormatter;
|
||||||
import bisq.core.util.validation.InputValidator;
|
import bisq.core.util.validation.InputValidator;
|
||||||
|
|
||||||
import javafx.scene.control.CheckBox;
|
import javafx.scene.control.CheckBox;
|
||||||
|
@ -77,7 +77,7 @@ public class SepaInstantForm extends GeneralSepaForm {
|
||||||
|
|
||||||
public SepaInstantForm(PaymentAccount paymentAccount, AccountAgeWitnessService accountAgeWitnessService, IBANValidator ibanValidator,
|
public SepaInstantForm(PaymentAccount paymentAccount, AccountAgeWitnessService accountAgeWitnessService, IBANValidator ibanValidator,
|
||||||
BICValidator bicValidator, InputValidator inputValidator,
|
BICValidator bicValidator, InputValidator inputValidator,
|
||||||
GridPane gridPane, int gridRow, BSFormatter formatter) {
|
GridPane gridPane, int gridRow, CoinFormatter formatter) {
|
||||||
super(paymentAccount, accountAgeWitnessService, inputValidator, gridPane, gridRow, formatter);
|
super(paymentAccount, accountAgeWitnessService, inputValidator, gridPane, gridRow, formatter);
|
||||||
this.sepaInstantAccount = (SepaInstantAccount) paymentAccount;
|
this.sepaInstantAccount = (SepaInstantAccount) paymentAccount;
|
||||||
this.ibanValidator = ibanValidator;
|
this.ibanValidator = ibanValidator;
|
||||||
|
|
|
@ -24,7 +24,7 @@ import bisq.core.locale.Res;
|
||||||
import bisq.core.payment.PaymentAccount;
|
import bisq.core.payment.PaymentAccount;
|
||||||
import bisq.core.payment.payload.PaymentAccountPayload;
|
import bisq.core.payment.payload.PaymentAccountPayload;
|
||||||
import bisq.core.payment.payload.SpecificBanksAccountPayload;
|
import bisq.core.payment.payload.SpecificBanksAccountPayload;
|
||||||
import bisq.core.util.BSFormatter;
|
import bisq.core.util.coin.CoinFormatter;
|
||||||
import bisq.core.util.validation.InputValidator;
|
import bisq.core.util.validation.InputValidator;
|
||||||
|
|
||||||
import bisq.common.util.Tuple3;
|
import bisq.common.util.Tuple3;
|
||||||
|
@ -53,7 +53,7 @@ public class SpecificBankForm extends BankForm {
|
||||||
}
|
}
|
||||||
|
|
||||||
public SpecificBankForm(PaymentAccount paymentAccount, AccountAgeWitnessService accountAgeWitnessService, InputValidator inputValidator,
|
public SpecificBankForm(PaymentAccount paymentAccount, AccountAgeWitnessService accountAgeWitnessService, InputValidator inputValidator,
|
||||||
GridPane gridPane, int gridRow, BSFormatter formatter) {
|
GridPane gridPane, int gridRow, CoinFormatter formatter) {
|
||||||
super(paymentAccount, accountAgeWitnessService, inputValidator, gridPane, gridRow, formatter);
|
super(paymentAccount, accountAgeWitnessService, inputValidator, gridPane, gridRow, formatter);
|
||||||
this.specificBanksAccountPayload = (SpecificBanksAccountPayload) paymentAccount.paymentAccountPayload;
|
this.specificBanksAccountPayload = (SpecificBanksAccountPayload) paymentAccount.paymentAccountPayload;
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,7 +29,7 @@ import bisq.core.payment.PaymentAccount;
|
||||||
import bisq.core.payment.SwishAccount;
|
import bisq.core.payment.SwishAccount;
|
||||||
import bisq.core.payment.payload.PaymentAccountPayload;
|
import bisq.core.payment.payload.PaymentAccountPayload;
|
||||||
import bisq.core.payment.payload.SwishAccountPayload;
|
import bisq.core.payment.payload.SwishAccountPayload;
|
||||||
import bisq.core.util.BSFormatter;
|
import bisq.core.util.coin.CoinFormatter;
|
||||||
import bisq.core.util.validation.InputValidator;
|
import bisq.core.util.validation.InputValidator;
|
||||||
|
|
||||||
import javafx.scene.control.TextField;
|
import javafx.scene.control.TextField;
|
||||||
|
@ -53,7 +53,7 @@ public class SwishForm extends PaymentMethodForm {
|
||||||
InputValidator inputValidator,
|
InputValidator inputValidator,
|
||||||
GridPane gridPane,
|
GridPane gridPane,
|
||||||
int gridRow,
|
int gridRow,
|
||||||
BSFormatter formatter) {
|
CoinFormatter formatter) {
|
||||||
super(paymentAccount, accountAgeWitnessService, inputValidator, gridPane, gridRow, formatter);
|
super(paymentAccount, accountAgeWitnessService, inputValidator, gridPane, gridRow, formatter);
|
||||||
this.swishAccount = (SwishAccount) paymentAccount;
|
this.swishAccount = (SwishAccount) paymentAccount;
|
||||||
this.swishValidator = swishValidator;
|
this.swishValidator = swishValidator;
|
||||||
|
|
|
@ -29,7 +29,7 @@ import bisq.core.payment.PaymentAccount;
|
||||||
import bisq.core.payment.USPostalMoneyOrderAccount;
|
import bisq.core.payment.USPostalMoneyOrderAccount;
|
||||||
import bisq.core.payment.payload.PaymentAccountPayload;
|
import bisq.core.payment.payload.PaymentAccountPayload;
|
||||||
import bisq.core.payment.payload.USPostalMoneyOrderAccountPayload;
|
import bisq.core.payment.payload.USPostalMoneyOrderAccountPayload;
|
||||||
import bisq.core.util.BSFormatter;
|
import bisq.core.util.coin.CoinFormatter;
|
||||||
import bisq.core.util.validation.InputValidator;
|
import bisq.core.util.validation.InputValidator;
|
||||||
|
|
||||||
import javafx.scene.control.TextArea;
|
import javafx.scene.control.TextArea;
|
||||||
|
@ -56,7 +56,7 @@ public class USPostalMoneyOrderForm extends PaymentMethodForm {
|
||||||
|
|
||||||
public USPostalMoneyOrderForm(PaymentAccount paymentAccount,
|
public USPostalMoneyOrderForm(PaymentAccount paymentAccount,
|
||||||
AccountAgeWitnessService accountAgeWitnessService, USPostalMoneyOrderValidator usPostalMoneyOrderValidator,
|
AccountAgeWitnessService accountAgeWitnessService, USPostalMoneyOrderValidator usPostalMoneyOrderValidator,
|
||||||
InputValidator inputValidator, GridPane gridPane, int gridRow, BSFormatter formatter) {
|
InputValidator inputValidator, GridPane gridPane, int gridRow, CoinFormatter formatter) {
|
||||||
super(paymentAccount, accountAgeWitnessService, inputValidator, gridPane, gridRow, formatter);
|
super(paymentAccount, accountAgeWitnessService, inputValidator, gridPane, gridRow, formatter);
|
||||||
this.usPostalMoneyOrderAccount = (USPostalMoneyOrderAccount) paymentAccount;
|
this.usPostalMoneyOrderAccount = (USPostalMoneyOrderAccount) paymentAccount;
|
||||||
this.usPostalMoneyOrderValidator = usPostalMoneyOrderValidator;
|
this.usPostalMoneyOrderValidator = usPostalMoneyOrderValidator;
|
||||||
|
|
|
@ -29,7 +29,7 @@ import bisq.core.payment.PaymentAccount;
|
||||||
import bisq.core.payment.UpholdAccount;
|
import bisq.core.payment.UpholdAccount;
|
||||||
import bisq.core.payment.payload.PaymentAccountPayload;
|
import bisq.core.payment.payload.PaymentAccountPayload;
|
||||||
import bisq.core.payment.payload.UpholdAccountPayload;
|
import bisq.core.payment.payload.UpholdAccountPayload;
|
||||||
import bisq.core.util.BSFormatter;
|
import bisq.core.util.coin.CoinFormatter;
|
||||||
import bisq.core.util.validation.InputValidator;
|
import bisq.core.util.validation.InputValidator;
|
||||||
|
|
||||||
import javafx.scene.control.TextField;
|
import javafx.scene.control.TextField;
|
||||||
|
@ -54,7 +54,7 @@ public class UpholdForm extends PaymentMethodForm {
|
||||||
|
|
||||||
public UpholdForm(PaymentAccount paymentAccount, AccountAgeWitnessService accountAgeWitnessService,
|
public UpholdForm(PaymentAccount paymentAccount, AccountAgeWitnessService accountAgeWitnessService,
|
||||||
UpholdValidator upholdValidator, InputValidator inputValidator, GridPane gridPane,
|
UpholdValidator upholdValidator, InputValidator inputValidator, GridPane gridPane,
|
||||||
int gridRow, BSFormatter formatter) {
|
int gridRow, CoinFormatter formatter) {
|
||||||
super(paymentAccount, accountAgeWitnessService, inputValidator, gridPane, gridRow, formatter);
|
super(paymentAccount, accountAgeWitnessService, inputValidator, gridPane, gridRow, formatter);
|
||||||
this.upholdAccount = (UpholdAccount) paymentAccount;
|
this.upholdAccount = (UpholdAccount) paymentAccount;
|
||||||
this.upholdValidator = upholdValidator;
|
this.upholdValidator = upholdValidator;
|
||||||
|
|
|
@ -25,7 +25,7 @@ import bisq.core.payment.PaymentAccount;
|
||||||
import bisq.core.payment.WeChatPayAccount;
|
import bisq.core.payment.WeChatPayAccount;
|
||||||
import bisq.core.payment.payload.PaymentAccountPayload;
|
import bisq.core.payment.payload.PaymentAccountPayload;
|
||||||
import bisq.core.payment.payload.WeChatPayAccountPayload;
|
import bisq.core.payment.payload.WeChatPayAccountPayload;
|
||||||
import bisq.core.util.BSFormatter;
|
import bisq.core.util.coin.CoinFormatter;
|
||||||
import bisq.core.util.validation.InputValidator;
|
import bisq.core.util.validation.InputValidator;
|
||||||
|
|
||||||
import javafx.scene.layout.GridPane;
|
import javafx.scene.layout.GridPane;
|
||||||
|
@ -41,7 +41,7 @@ public class WeChatPayForm extends GeneralAccountNumberForm {
|
||||||
return gridRow;
|
return gridRow;
|
||||||
}
|
}
|
||||||
|
|
||||||
public WeChatPayForm(PaymentAccount paymentAccount, AccountAgeWitnessService accountAgeWitnessService, WeChatPayValidator weChatPayValidator, InputValidator inputValidator, GridPane gridPane, int gridRow, BSFormatter formatter) {
|
public WeChatPayForm(PaymentAccount paymentAccount, AccountAgeWitnessService accountAgeWitnessService, WeChatPayValidator weChatPayValidator, InputValidator inputValidator, GridPane gridPane, int gridRow, CoinFormatter formatter) {
|
||||||
super(paymentAccount, accountAgeWitnessService, inputValidator, gridPane, gridRow, formatter);
|
super(paymentAccount, accountAgeWitnessService, inputValidator, gridPane, gridRow, formatter);
|
||||||
this.weChatPayAccount = (WeChatPayAccount) paymentAccount;
|
this.weChatPayAccount = (WeChatPayAccount) paymentAccount;
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,7 +34,7 @@ import bisq.core.payment.CountryBasedPaymentAccount;
|
||||||
import bisq.core.payment.PaymentAccount;
|
import bisq.core.payment.PaymentAccount;
|
||||||
import bisq.core.payment.payload.PaymentAccountPayload;
|
import bisq.core.payment.payload.PaymentAccountPayload;
|
||||||
import bisq.core.payment.payload.WesternUnionAccountPayload;
|
import bisq.core.payment.payload.WesternUnionAccountPayload;
|
||||||
import bisq.core.util.BSFormatter;
|
import bisq.core.util.coin.CoinFormatter;
|
||||||
import bisq.core.util.validation.InputValidator;
|
import bisq.core.util.validation.InputValidator;
|
||||||
|
|
||||||
import bisq.common.util.Tuple2;
|
import bisq.common.util.Tuple2;
|
||||||
|
@ -76,7 +76,7 @@ public class WesternUnionForm extends PaymentMethodForm {
|
||||||
private Country selectedCountry;
|
private Country selectedCountry;
|
||||||
|
|
||||||
public WesternUnionForm(PaymentAccount paymentAccount, AccountAgeWitnessService accountAgeWitnessService, InputValidator inputValidator,
|
public WesternUnionForm(PaymentAccount paymentAccount, AccountAgeWitnessService accountAgeWitnessService, InputValidator inputValidator,
|
||||||
GridPane gridPane, int gridRow, BSFormatter formatter) {
|
GridPane gridPane, int gridRow, CoinFormatter formatter) {
|
||||||
super(paymentAccount, accountAgeWitnessService, inputValidator, gridPane, gridRow, formatter);
|
super(paymentAccount, accountAgeWitnessService, inputValidator, gridPane, gridRow, formatter);
|
||||||
this.westernUnionAccountPayload = (WesternUnionAccountPayload) paymentAccount.paymentAccountPayload;
|
this.westernUnionAccountPayload = (WesternUnionAccountPayload) paymentAccount.paymentAccountPayload;
|
||||||
|
|
||||||
|
|
|
@ -47,7 +47,8 @@ import bisq.core.exceptions.BisqException;
|
||||||
import bisq.core.locale.GlobalSettings;
|
import bisq.core.locale.GlobalSettings;
|
||||||
import bisq.core.locale.LanguageUtil;
|
import bisq.core.locale.LanguageUtil;
|
||||||
import bisq.core.locale.Res;
|
import bisq.core.locale.Res;
|
||||||
import bisq.core.util.BSFormatter;
|
import bisq.core.util.FormattingUtils;
|
||||||
|
import bisq.core.util.coin.CoinFormatter;
|
||||||
|
|
||||||
import bisq.common.Timer;
|
import bisq.common.Timer;
|
||||||
import bisq.common.UserThread;
|
import bisq.common.UserThread;
|
||||||
|
@ -56,6 +57,7 @@ import bisq.common.util.Tuple2;
|
||||||
import bisq.common.util.Utilities;
|
import bisq.common.util.Utilities;
|
||||||
|
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
import javax.inject.Named;
|
||||||
|
|
||||||
import com.jfoenix.controls.JFXBadge;
|
import com.jfoenix.controls.JFXBadge;
|
||||||
import com.jfoenix.controls.JFXComboBox;
|
import com.jfoenix.controls.JFXComboBox;
|
||||||
|
@ -144,7 +146,7 @@ public class MainView extends InitializableView<StackPane, MainViewModel>
|
||||||
|
|
||||||
private final ViewLoader viewLoader;
|
private final ViewLoader viewLoader;
|
||||||
private final Navigation navigation;
|
private final Navigation navigation;
|
||||||
private final BSFormatter formatter;
|
private final CoinFormatter formatter;
|
||||||
|
|
||||||
private final ToggleGroup navButtons = new ToggleGroup();
|
private final ToggleGroup navButtons = new ToggleGroup();
|
||||||
private ChangeListener<String> walletServiceErrorMsgListener;
|
private ChangeListener<String> walletServiceErrorMsgListener;
|
||||||
|
@ -164,7 +166,7 @@ public class MainView extends InitializableView<StackPane, MainViewModel>
|
||||||
CachingViewLoader viewLoader,
|
CachingViewLoader viewLoader,
|
||||||
Navigation navigation,
|
Navigation navigation,
|
||||||
Transitions transitions,
|
Transitions transitions,
|
||||||
BSFormatter formatter,
|
@Named(FormattingUtils.BTC_FORMATTER_KEY) CoinFormatter formatter,
|
||||||
DaoStateMonitoringService daoStateMonitoringService) {
|
DaoStateMonitoringService daoStateMonitoringService) {
|
||||||
super(model);
|
super(model);
|
||||||
this.viewLoader = viewLoader;
|
this.viewLoader = viewLoader;
|
||||||
|
|
|
@ -38,7 +38,8 @@ import bisq.core.payment.PaymentAccountFactory;
|
||||||
import bisq.core.payment.payload.PaymentMethod;
|
import bisq.core.payment.payload.PaymentMethod;
|
||||||
import bisq.core.payment.validation.AltCoinAddressValidator;
|
import bisq.core.payment.validation.AltCoinAddressValidator;
|
||||||
import bisq.core.user.Preferences;
|
import bisq.core.user.Preferences;
|
||||||
import bisq.core.util.BSFormatter;
|
import bisq.core.util.FormattingUtils;
|
||||||
|
import bisq.core.util.coin.CoinFormatter;
|
||||||
import bisq.core.util.validation.InputValidator;
|
import bisq.core.util.validation.InputValidator;
|
||||||
|
|
||||||
import bisq.asset.AltCoinAccountDisclaimer;
|
import bisq.asset.AltCoinAccountDisclaimer;
|
||||||
|
@ -49,6 +50,7 @@ import bisq.common.util.Tuple2;
|
||||||
import bisq.common.util.Tuple3;
|
import bisq.common.util.Tuple3;
|
||||||
|
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
import javax.inject.Named;
|
||||||
|
|
||||||
import javafx.stage.Stage;
|
import javafx.stage.Stage;
|
||||||
|
|
||||||
|
@ -75,7 +77,7 @@ public class AltCoinAccountsView extends PaymentAccountsView<GridPane, AltCoinAc
|
||||||
private final AltCoinAddressValidator altCoinAddressValidator;
|
private final AltCoinAddressValidator altCoinAddressValidator;
|
||||||
private final AssetService assetService;
|
private final AssetService assetService;
|
||||||
private final FilterManager filterManager;
|
private final FilterManager filterManager;
|
||||||
private final BSFormatter formatter;
|
private final CoinFormatter formatter;
|
||||||
private final Preferences preferences;
|
private final Preferences preferences;
|
||||||
|
|
||||||
private PaymentMethodForm paymentMethodForm;
|
private PaymentMethodForm paymentMethodForm;
|
||||||
|
@ -90,7 +92,7 @@ public class AltCoinAccountsView extends PaymentAccountsView<GridPane, AltCoinAc
|
||||||
AccountAgeWitnessService accountAgeWitnessService,
|
AccountAgeWitnessService accountAgeWitnessService,
|
||||||
AssetService assetService,
|
AssetService assetService,
|
||||||
FilterManager filterManager,
|
FilterManager filterManager,
|
||||||
BSFormatter formatter,
|
@Named(FormattingUtils.BTC_FORMATTER_KEY) CoinFormatter formatter,
|
||||||
Preferences preferences) {
|
Preferences preferences) {
|
||||||
super(model, accountAgeWitnessService);
|
super(model, accountAgeWitnessService);
|
||||||
|
|
||||||
|
|
|
@ -86,7 +86,8 @@ import bisq.core.payment.RevolutAccount;
|
||||||
import bisq.core.payment.USPostalMoneyOrderAccount;
|
import bisq.core.payment.USPostalMoneyOrderAccount;
|
||||||
import bisq.core.payment.WesternUnionAccount;
|
import bisq.core.payment.WesternUnionAccount;
|
||||||
import bisq.core.payment.payload.PaymentMethod;
|
import bisq.core.payment.payload.PaymentMethod;
|
||||||
import bisq.core.util.BSFormatter;
|
import bisq.core.util.FormattingUtils;
|
||||||
|
import bisq.core.util.coin.CoinFormatter;
|
||||||
import bisq.core.util.validation.InputValidator;
|
import bisq.core.util.validation.InputValidator;
|
||||||
|
|
||||||
import bisq.common.util.Tuple2;
|
import bisq.common.util.Tuple2;
|
||||||
|
@ -95,6 +96,7 @@ import bisq.common.util.Tuple3;
|
||||||
import org.bitcoinj.core.Coin;
|
import org.bitcoinj.core.Coin;
|
||||||
|
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
import javax.inject.Named;
|
||||||
|
|
||||||
import javafx.stage.Stage;
|
import javafx.stage.Stage;
|
||||||
|
|
||||||
|
@ -141,7 +143,7 @@ public class FiatAccountsView extends PaymentAccountsView<GridPane, FiatAccounts
|
||||||
private final F2FValidator f2FValidator;
|
private final F2FValidator f2FValidator;
|
||||||
private final PromptPayValidator promptPayValidator;
|
private final PromptPayValidator promptPayValidator;
|
||||||
private final AdvancedCashValidator advancedCashValidator;
|
private final AdvancedCashValidator advancedCashValidator;
|
||||||
private final BSFormatter formatter;
|
private final CoinFormatter formatter;
|
||||||
private ComboBox<PaymentMethod> paymentMethodComboBox;
|
private ComboBox<PaymentMethod> paymentMethodComboBox;
|
||||||
private PaymentMethodForm paymentMethodForm;
|
private PaymentMethodForm paymentMethodForm;
|
||||||
private TitledGroupBg accountTitledGroupBg;
|
private TitledGroupBg accountTitledGroupBg;
|
||||||
|
@ -171,7 +173,7 @@ public class FiatAccountsView extends PaymentAccountsView<GridPane, FiatAccounts
|
||||||
PromptPayValidator promptPayValidator,
|
PromptPayValidator promptPayValidator,
|
||||||
AdvancedCashValidator advancedCashValidator,
|
AdvancedCashValidator advancedCashValidator,
|
||||||
AccountAgeWitnessService accountAgeWitnessService,
|
AccountAgeWitnessService accountAgeWitnessService,
|
||||||
BSFormatter formatter) {
|
@Named(FormattingUtils.BTC_FORMATTER_KEY) CoinFormatter formatter) {
|
||||||
super(model, accountAgeWitnessService);
|
super(model, accountAgeWitnessService);
|
||||||
|
|
||||||
this.ibanValidator = ibanValidator;
|
this.ibanValidator = ibanValidator;
|
||||||
|
|
|
@ -26,8 +26,8 @@ import bisq.desktop.util.ImageUtil;
|
||||||
import bisq.core.locale.Res;
|
import bisq.core.locale.Res;
|
||||||
import bisq.core.notifications.alerts.market.MarketAlertFilter;
|
import bisq.core.notifications.alerts.market.MarketAlertFilter;
|
||||||
import bisq.core.notifications.alerts.market.MarketAlerts;
|
import bisq.core.notifications.alerts.market.MarketAlerts;
|
||||||
import bisq.core.util.BSFormatter;
|
|
||||||
import bisq.core.util.FormattingUtils;
|
import bisq.core.util.FormattingUtils;
|
||||||
|
import bisq.core.util.coin.CoinFormatter;
|
||||||
|
|
||||||
import bisq.common.UserThread;
|
import bisq.common.UserThread;
|
||||||
|
|
||||||
|
@ -54,9 +54,9 @@ import lombok.extern.slf4j.Slf4j;
|
||||||
public class ManageMarketAlertsWindow extends Overlay<ManageMarketAlertsWindow> {
|
public class ManageMarketAlertsWindow extends Overlay<ManageMarketAlertsWindow> {
|
||||||
|
|
||||||
private final MarketAlerts marketAlerts;
|
private final MarketAlerts marketAlerts;
|
||||||
private final BSFormatter formatter;
|
private final CoinFormatter formatter;
|
||||||
|
|
||||||
ManageMarketAlertsWindow(MarketAlerts marketAlerts, BSFormatter formatter) {
|
ManageMarketAlertsWindow(MarketAlerts marketAlerts, CoinFormatter formatter) {
|
||||||
this.marketAlerts = marketAlerts;
|
this.marketAlerts = marketAlerts;
|
||||||
this.formatter = formatter;
|
this.formatter = formatter;
|
||||||
type = Type.Attention;
|
type = Type.Attention;
|
||||||
|
|
|
@ -47,9 +47,9 @@ import bisq.core.payment.PaymentAccount;
|
||||||
import bisq.core.provider.price.PriceFeedService;
|
import bisq.core.provider.price.PriceFeedService;
|
||||||
import bisq.core.user.Preferences;
|
import bisq.core.user.Preferences;
|
||||||
import bisq.core.user.User;
|
import bisq.core.user.User;
|
||||||
import bisq.core.util.BSFormatter;
|
|
||||||
import bisq.core.util.FormattingUtils;
|
import bisq.core.util.FormattingUtils;
|
||||||
import bisq.core.util.ParsingUtils;
|
import bisq.core.util.ParsingUtils;
|
||||||
|
import bisq.core.util.coin.CoinFormatter;
|
||||||
import bisq.core.util.validation.InputValidator;
|
import bisq.core.util.validation.InputValidator;
|
||||||
|
|
||||||
import bisq.common.UserThread;
|
import bisq.common.UserThread;
|
||||||
|
@ -57,6 +57,7 @@ import bisq.common.util.Tuple2;
|
||||||
import bisq.common.util.Tuple3;
|
import bisq.common.util.Tuple3;
|
||||||
|
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
import javax.inject.Named;
|
||||||
|
|
||||||
import javafx.scene.control.Button;
|
import javafx.scene.control.Button;
|
||||||
import javafx.scene.control.ComboBox;
|
import javafx.scene.control.ComboBox;
|
||||||
|
@ -90,7 +91,7 @@ public class MobileNotificationsView extends ActivatableView<GridPane, Void> {
|
||||||
private final PriceFeedService priceFeedService;
|
private final PriceFeedService priceFeedService;
|
||||||
private final MarketAlerts marketAlerts;
|
private final MarketAlerts marketAlerts;
|
||||||
private final MobileNotificationService mobileNotificationService;
|
private final MobileNotificationService mobileNotificationService;
|
||||||
private final BSFormatter formatter;
|
private final CoinFormatter formatter;
|
||||||
|
|
||||||
private WebCamWindow webCamWindow;
|
private WebCamWindow webCamWindow;
|
||||||
private QrCodeReader qrCodeReader;
|
private QrCodeReader qrCodeReader;
|
||||||
|
@ -127,7 +128,7 @@ public class MobileNotificationsView extends ActivatableView<GridPane, Void> {
|
||||||
PriceFeedService priceFeedService,
|
PriceFeedService priceFeedService,
|
||||||
MarketAlerts marketAlerts,
|
MarketAlerts marketAlerts,
|
||||||
MobileNotificationService mobileNotificationService,
|
MobileNotificationService mobileNotificationService,
|
||||||
BSFormatter formatter) {
|
@Named(FormattingUtils.BTC_FORMATTER_KEY) CoinFormatter formatter) {
|
||||||
super();
|
super();
|
||||||
this.preferences = preferences;
|
this.preferences = preferences;
|
||||||
this.user = user;
|
this.user = user;
|
||||||
|
|
|
@ -34,9 +34,10 @@ import bisq.core.dao.state.model.blockchain.TxOutput;
|
||||||
import bisq.core.dao.state.model.governance.Role;
|
import bisq.core.dao.state.model.governance.Role;
|
||||||
import bisq.core.dao.state.model.governance.RoleProposal;
|
import bisq.core.dao.state.model.governance.RoleProposal;
|
||||||
import bisq.core.locale.Res;
|
import bisq.core.locale.Res;
|
||||||
import bisq.core.util.BSFormatter;
|
import bisq.core.util.coin.ImmutableCoinFormatter;
|
||||||
import bisq.core.util.BsqFormatter;
|
import bisq.core.util.coin.BsqFormatter;
|
||||||
import bisq.core.util.CoinUtil;
|
import bisq.core.util.coin.CoinFormatter;
|
||||||
|
import bisq.core.util.coin.CoinUtil;
|
||||||
import bisq.core.util.FormattingUtils;
|
import bisq.core.util.FormattingUtils;
|
||||||
|
|
||||||
import bisq.network.p2p.P2PService;
|
import bisq.network.p2p.P2PService;
|
||||||
|
@ -113,14 +114,13 @@ public class BondingViewUtils {
|
||||||
Tuple2<Coin, Integer> miningFeeAndTxSize = daoFacade.getLockupTxMiningFeeAndTxSize(lockupAmount, lockupTime, lockupReason, hash);
|
Tuple2<Coin, Integer> miningFeeAndTxSize = daoFacade.getLockupTxMiningFeeAndTxSize(lockupAmount, lockupTime, lockupReason, hash);
|
||||||
Coin miningFee = miningFeeAndTxSize.first;
|
Coin miningFee = miningFeeAndTxSize.first;
|
||||||
int txSize = miningFeeAndTxSize.second;
|
int txSize = miningFeeAndTxSize.second;
|
||||||
BSFormatter formatter = new BSFormatter();
|
|
||||||
String duration = FormattingUtils.formatDurationAsWords(lockupTime * 10 * 60 * 1000L, false, false);
|
String duration = FormattingUtils.formatDurationAsWords(lockupTime * 10 * 60 * 1000L, false, false);
|
||||||
new Popup<>().headLine(Res.get("dao.bond.reputation.lockup.headline"))
|
new Popup<>().headLine(Res.get("dao.bond.reputation.lockup.headline"))
|
||||||
.confirmation(Res.get("dao.bond.reputation.lockup.details",
|
.confirmation(Res.get("dao.bond.reputation.lockup.details",
|
||||||
bsqFormatter.formatCoinWithCode(lockupAmount),
|
bsqFormatter.formatCoinWithCode(lockupAmount),
|
||||||
lockupTime,
|
lockupTime,
|
||||||
duration,
|
duration,
|
||||||
formatter.formatCoinWithCode(miningFee),
|
bsqFormatter.formatBTCWithCode(miningFee),
|
||||||
CoinUtil.getFeePerByte(miningFee, txSize),
|
CoinUtil.getFeePerByte(miningFee, txSize),
|
||||||
txSize / 1000d
|
txSize / 1000d
|
||||||
))
|
))
|
||||||
|
@ -172,14 +172,13 @@ public class BondingViewUtils {
|
||||||
Tuple2<Coin, Integer> miningFeeAndTxSize = daoFacade.getUnlockTxMiningFeeAndTxSize(lockupTxId);
|
Tuple2<Coin, Integer> miningFeeAndTxSize = daoFacade.getUnlockTxMiningFeeAndTxSize(lockupTxId);
|
||||||
Coin miningFee = miningFeeAndTxSize.first;
|
Coin miningFee = miningFeeAndTxSize.first;
|
||||||
int txSize = miningFeeAndTxSize.second;
|
int txSize = miningFeeAndTxSize.second;
|
||||||
BSFormatter formatter = new BSFormatter();
|
|
||||||
String duration = FormattingUtils.formatDurationAsWords(lockTime * 10 * 60 * 1000L, false, false);
|
String duration = FormattingUtils.formatDurationAsWords(lockTime * 10 * 60 * 1000L, false, false);
|
||||||
new Popup<>().headLine(Res.get("dao.bond.reputation.unlock.headline"))
|
new Popup<>().headLine(Res.get("dao.bond.reputation.unlock.headline"))
|
||||||
.confirmation(Res.get("dao.bond.reputation.unlock.details",
|
.confirmation(Res.get("dao.bond.reputation.unlock.details",
|
||||||
bsqFormatter.formatCoinWithCode(unlockAmount),
|
bsqFormatter.formatCoinWithCode(unlockAmount),
|
||||||
lockTime,
|
lockTime,
|
||||||
duration,
|
duration,
|
||||||
formatter.formatCoinWithCode(miningFee),
|
bsqFormatter.formatBTCWithCode(miningFee),
|
||||||
CoinUtil.getFeePerByte(miningFee, txSize),
|
CoinUtil.getFeePerByte(miningFee, txSize),
|
||||||
txSize / 1000d
|
txSize / 1000d
|
||||||
))
|
))
|
||||||
|
|
|
@ -23,7 +23,7 @@ import bisq.core.dao.governance.bond.Bond;
|
||||||
import bisq.core.dao.governance.bond.BondState;
|
import bisq.core.dao.governance.bond.BondState;
|
||||||
import bisq.core.dao.governance.bond.role.BondedRole;
|
import bisq.core.dao.governance.bond.role.BondedRole;
|
||||||
import bisq.core.locale.Res;
|
import bisq.core.locale.Res;
|
||||||
import bisq.core.util.BsqFormatter;
|
import bisq.core.util.coin.BsqFormatter;
|
||||||
|
|
||||||
import bisq.common.util.Utilities;
|
import bisq.common.util.Utilities;
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@ import bisq.core.dao.governance.bond.role.BondedRole;
|
||||||
import bisq.core.dao.governance.bond.role.BondedRolesRepository;
|
import bisq.core.dao.governance.bond.role.BondedRolesRepository;
|
||||||
import bisq.core.locale.Res;
|
import bisq.core.locale.Res;
|
||||||
import bisq.core.user.Preferences;
|
import bisq.core.user.Preferences;
|
||||||
import bisq.core.util.BsqFormatter;
|
import bisq.core.util.coin.BsqFormatter;
|
||||||
|
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@ import bisq.core.dao.governance.bond.BondState;
|
||||||
import bisq.core.dao.governance.bond.reputation.MyBondedReputation;
|
import bisq.core.dao.governance.bond.reputation.MyBondedReputation;
|
||||||
import bisq.core.dao.governance.bond.reputation.MyReputation;
|
import bisq.core.dao.governance.bond.reputation.MyReputation;
|
||||||
import bisq.core.locale.Res;
|
import bisq.core.locale.Res;
|
||||||
import bisq.core.util.BsqFormatter;
|
import bisq.core.util.coin.BsqFormatter;
|
||||||
|
|
||||||
import bisq.common.util.Utilities;
|
import bisq.common.util.Utilities;
|
||||||
|
|
||||||
|
|
|
@ -38,7 +38,7 @@ import bisq.core.dao.governance.bond.BondState;
|
||||||
import bisq.core.dao.governance.bond.reputation.MyBondedReputation;
|
import bisq.core.dao.governance.bond.reputation.MyBondedReputation;
|
||||||
import bisq.core.locale.Res;
|
import bisq.core.locale.Res;
|
||||||
import bisq.core.user.Preferences;
|
import bisq.core.user.Preferences;
|
||||||
import bisq.core.util.BsqFormatter;
|
import bisq.core.util.coin.BsqFormatter;
|
||||||
import bisq.core.util.ParsingUtils;
|
import bisq.core.util.ParsingUtils;
|
||||||
import bisq.core.util.validation.HexStringValidator;
|
import bisq.core.util.validation.HexStringValidator;
|
||||||
import bisq.core.util.validation.IntegerValidator;
|
import bisq.core.util.validation.IntegerValidator;
|
||||||
|
|
|
@ -25,7 +25,7 @@ import bisq.core.dao.DaoFacade;
|
||||||
import bisq.core.dao.state.model.governance.BondedRoleType;
|
import bisq.core.dao.state.model.governance.BondedRoleType;
|
||||||
import bisq.core.dao.state.model.governance.RoleProposal;
|
import bisq.core.dao.state.model.governance.RoleProposal;
|
||||||
import bisq.core.locale.Res;
|
import bisq.core.locale.Res;
|
||||||
import bisq.core.util.BsqFormatter;
|
import bisq.core.util.coin.BsqFormatter;
|
||||||
|
|
||||||
import org.bitcoinj.core.Coin;
|
import org.bitcoinj.core.Coin;
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,7 @@ import bisq.core.dao.state.model.governance.BondedRoleType;
|
||||||
import bisq.core.dao.state.model.governance.RoleProposal;
|
import bisq.core.dao.state.model.governance.RoleProposal;
|
||||||
import bisq.core.locale.Res;
|
import bisq.core.locale.Res;
|
||||||
import bisq.core.user.Preferences;
|
import bisq.core.user.Preferences;
|
||||||
import bisq.core.util.BsqFormatter;
|
import bisq.core.util.coin.BsqFormatter;
|
||||||
|
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
|
||||||
|
|
|
@ -34,9 +34,10 @@ import bisq.core.dao.governance.asset.StatefulAsset;
|
||||||
import bisq.core.dao.governance.proposal.TxException;
|
import bisq.core.dao.governance.proposal.TxException;
|
||||||
import bisq.core.locale.CurrencyUtil;
|
import bisq.core.locale.CurrencyUtil;
|
||||||
import bisq.core.locale.Res;
|
import bisq.core.locale.Res;
|
||||||
import bisq.core.util.BSFormatter;
|
import bisq.core.util.FormattingUtils;
|
||||||
import bisq.core.util.BsqFormatter;
|
import bisq.core.util.coin.BsqFormatter;
|
||||||
import bisq.core.util.ParsingUtils;
|
import bisq.core.util.ParsingUtils;
|
||||||
|
import bisq.core.util.coin.CoinFormatter;
|
||||||
|
|
||||||
import bisq.common.app.DevEnv;
|
import bisq.common.app.DevEnv;
|
||||||
|
|
||||||
|
@ -45,6 +46,7 @@ import org.bitcoinj.core.InsufficientMoneyException;
|
||||||
import org.bitcoinj.core.Transaction;
|
import org.bitcoinj.core.Transaction;
|
||||||
|
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
import javax.inject.Named;
|
||||||
|
|
||||||
import javafx.scene.control.Button;
|
import javafx.scene.control.Button;
|
||||||
import javafx.scene.control.ComboBox;
|
import javafx.scene.control.ComboBox;
|
||||||
|
@ -86,7 +88,7 @@ public class AssetFeeView extends ActivatableView<GridPane, Void> implements Bsq
|
||||||
private final BsqWalletService bsqWalletService;
|
private final BsqWalletService bsqWalletService;
|
||||||
private final BsqValidator bsqValidator;
|
private final BsqValidator bsqValidator;
|
||||||
private final AssetService assetService;
|
private final AssetService assetService;
|
||||||
private final BSFormatter btcFormatter;
|
private final CoinFormatter btcFormatter;
|
||||||
|
|
||||||
private final ObservableList<AssetListItem> observableList = FXCollections.observableArrayList();
|
private final ObservableList<AssetListItem> observableList = FXCollections.observableArrayList();
|
||||||
private final SortedList<AssetListItem> sortedList = new SortedList<>(observableList);
|
private final SortedList<AssetListItem> sortedList = new SortedList<>(observableList);
|
||||||
|
@ -109,7 +111,7 @@ public class AssetFeeView extends ActivatableView<GridPane, Void> implements Bsq
|
||||||
BsqWalletService bsqWalletService,
|
BsqWalletService bsqWalletService,
|
||||||
BsqValidator bsqValidator,
|
BsqValidator bsqValidator,
|
||||||
AssetService assetService,
|
AssetService assetService,
|
||||||
BSFormatter btcFormatter) {
|
@Named(FormattingUtils.BTC_FORMATTER_KEY) CoinFormatter btcFormatter) {
|
||||||
this.bsqFormatter = bsqFormatter;
|
this.bsqFormatter = bsqFormatter;
|
||||||
this.bsqWalletService = bsqWalletService;
|
this.bsqWalletService = bsqWalletService;
|
||||||
this.bsqValidator = bsqValidator;
|
this.bsqValidator = bsqValidator;
|
||||||
|
|
|
@ -19,7 +19,7 @@ package bisq.desktop.main.dao.burnbsq.assetfee;
|
||||||
|
|
||||||
import bisq.core.dao.governance.asset.StatefulAsset;
|
import bisq.core.dao.governance.asset.StatefulAsset;
|
||||||
import bisq.core.locale.Res;
|
import bisq.core.locale.Res;
|
||||||
import bisq.core.util.BsqFormatter;
|
import bisq.core.util.coin.BsqFormatter;
|
||||||
|
|
||||||
import lombok.Value;
|
import lombok.Value;
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@ import bisq.core.dao.governance.proofofburn.MyProofOfBurn;
|
||||||
import bisq.core.dao.governance.proofofburn.ProofOfBurnService;
|
import bisq.core.dao.governance.proofofburn.ProofOfBurnService;
|
||||||
import bisq.core.dao.state.model.blockchain.Tx;
|
import bisq.core.dao.state.model.blockchain.Tx;
|
||||||
import bisq.core.locale.Res;
|
import bisq.core.locale.Res;
|
||||||
import bisq.core.util.BsqFormatter;
|
import bisq.core.util.coin.BsqFormatter;
|
||||||
|
|
||||||
import bisq.common.util.Utilities;
|
import bisq.common.util.Utilities;
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ import bisq.desktop.util.DisplayUtils;
|
||||||
|
|
||||||
import bisq.core.dao.governance.proofofburn.ProofOfBurnService;
|
import bisq.core.dao.governance.proofofburn.ProofOfBurnService;
|
||||||
import bisq.core.dao.state.model.blockchain.Tx;
|
import bisq.core.dao.state.model.blockchain.Tx;
|
||||||
import bisq.core.util.BsqFormatter;
|
import bisq.core.util.coin.BsqFormatter;
|
||||||
|
|
||||||
import bisq.common.util.Utilities;
|
import bisq.common.util.Utilities;
|
||||||
|
|
||||||
|
|
|
@ -37,9 +37,10 @@ import bisq.core.dao.governance.proofofburn.ProofOfBurnService;
|
||||||
import bisq.core.dao.governance.proposal.TxException;
|
import bisq.core.dao.governance.proposal.TxException;
|
||||||
import bisq.core.locale.Res;
|
import bisq.core.locale.Res;
|
||||||
import bisq.core.user.Preferences;
|
import bisq.core.user.Preferences;
|
||||||
import bisq.core.util.BSFormatter;
|
import bisq.core.util.FormattingUtils;
|
||||||
import bisq.core.util.BsqFormatter;
|
import bisq.core.util.coin.BsqFormatter;
|
||||||
import bisq.core.util.ParsingUtils;
|
import bisq.core.util.ParsingUtils;
|
||||||
|
import bisq.core.util.coin.CoinFormatter;
|
||||||
import bisq.core.util.validation.InputValidator;
|
import bisq.core.util.validation.InputValidator;
|
||||||
|
|
||||||
import bisq.common.app.DevEnv;
|
import bisq.common.app.DevEnv;
|
||||||
|
@ -49,6 +50,7 @@ import org.bitcoinj.core.InsufficientMoneyException;
|
||||||
import org.bitcoinj.core.Transaction;
|
import org.bitcoinj.core.Transaction;
|
||||||
|
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
import javax.inject.Named;
|
||||||
|
|
||||||
import javafx.scene.control.Button;
|
import javafx.scene.control.Button;
|
||||||
import javafx.scene.control.TableCell;
|
import javafx.scene.control.TableCell;
|
||||||
|
@ -81,7 +83,7 @@ public class ProofOfBurnView extends ActivatableView<GridPane, Void> implements
|
||||||
private final ProofOfBurnService proofOfBurnService;
|
private final ProofOfBurnService proofOfBurnService;
|
||||||
private final MyProofOfBurnListService myProofOfBurnListService;
|
private final MyProofOfBurnListService myProofOfBurnListService;
|
||||||
private final Preferences preferences;
|
private final Preferences preferences;
|
||||||
private final BSFormatter btcFormatter;
|
private final CoinFormatter btcFormatter;
|
||||||
private final BsqFormatter bsqFormatter;
|
private final BsqFormatter bsqFormatter;
|
||||||
private final BsqWalletService bsqWalletService;
|
private final BsqWalletService bsqWalletService;
|
||||||
private final BsqValidator bsqValidator;
|
private final BsqValidator bsqValidator;
|
||||||
|
@ -116,7 +118,7 @@ public class ProofOfBurnView extends ActivatableView<GridPane, Void> implements
|
||||||
ProofOfBurnService proofOfBurnService,
|
ProofOfBurnService proofOfBurnService,
|
||||||
MyProofOfBurnListService myProofOfBurnListService,
|
MyProofOfBurnListService myProofOfBurnListService,
|
||||||
Preferences preferences,
|
Preferences preferences,
|
||||||
BSFormatter btcFormatter) {
|
@Named(FormattingUtils.BTC_FORMATTER_KEY) CoinFormatter btcFormatter) {
|
||||||
this.bsqFormatter = bsqFormatter;
|
this.bsqFormatter = bsqFormatter;
|
||||||
this.bsqWalletService = bsqWalletService;
|
this.bsqWalletService = bsqWalletService;
|
||||||
this.bsqValidator = bsqValidator;
|
this.bsqValidator = bsqValidator;
|
||||||
|
|
|
@ -34,8 +34,7 @@ import bisq.core.provider.price.PriceFeedService;
|
||||||
import bisq.core.trade.statistics.TradeStatistics2;
|
import bisq.core.trade.statistics.TradeStatistics2;
|
||||||
import bisq.core.trade.statistics.TradeStatisticsManager;
|
import bisq.core.trade.statistics.TradeStatisticsManager;
|
||||||
import bisq.core.user.Preferences;
|
import bisq.core.user.Preferences;
|
||||||
import bisq.core.util.BSFormatter;
|
import bisq.core.util.coin.BsqFormatter;
|
||||||
import bisq.core.util.BsqFormatter;
|
|
||||||
import bisq.core.util.FormattingUtils;
|
import bisq.core.util.FormattingUtils;
|
||||||
|
|
||||||
import bisq.common.util.MathUtils;
|
import bisq.common.util.MathUtils;
|
||||||
|
|
|
@ -31,7 +31,7 @@ import bisq.core.dao.state.model.governance.Issuance;
|
||||||
import bisq.core.dao.state.model.governance.IssuanceType;
|
import bisq.core.dao.state.model.governance.IssuanceType;
|
||||||
import bisq.core.locale.GlobalSettings;
|
import bisq.core.locale.GlobalSettings;
|
||||||
import bisq.core.locale.Res;
|
import bisq.core.locale.Res;
|
||||||
import bisq.core.util.BsqFormatter;
|
import bisq.core.util.coin.BsqFormatter;
|
||||||
|
|
||||||
import bisq.common.util.Tuple3;
|
import bisq.common.util.Tuple3;
|
||||||
|
|
||||||
|
|
|
@ -58,7 +58,7 @@ import bisq.core.dao.state.model.governance.Vote;
|
||||||
import bisq.core.locale.CurrencyUtil;
|
import bisq.core.locale.CurrencyUtil;
|
||||||
import bisq.core.locale.Res;
|
import bisq.core.locale.Res;
|
||||||
import bisq.core.user.Preferences;
|
import bisq.core.user.Preferences;
|
||||||
import bisq.core.util.BsqFormatter;
|
import bisq.core.util.coin.BsqFormatter;
|
||||||
import bisq.core.util.validation.InputValidator;
|
import bisq.core.util.validation.InputValidator;
|
||||||
|
|
||||||
import bisq.asset.Asset;
|
import bisq.asset.Asset;
|
||||||
|
|
|
@ -30,9 +30,11 @@ import bisq.core.dao.state.DaoStateListener;
|
||||||
import bisq.core.dao.state.model.blockchain.Block;
|
import bisq.core.dao.state.model.blockchain.Block;
|
||||||
import bisq.core.dao.state.model.governance.DaoPhase;
|
import bisq.core.dao.state.model.governance.DaoPhase;
|
||||||
import bisq.core.locale.Res;
|
import bisq.core.locale.Res;
|
||||||
import bisq.core.util.BSFormatter;
|
import bisq.core.util.FormattingUtils;
|
||||||
|
import bisq.core.util.coin.CoinFormatter;
|
||||||
|
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
import javax.inject.Named;
|
||||||
|
|
||||||
import javafx.scene.control.TextField;
|
import javafx.scene.control.TextField;
|
||||||
import javafx.scene.layout.GridPane;
|
import javafx.scene.layout.GridPane;
|
||||||
|
@ -48,7 +50,7 @@ public class GovernanceDashboardView extends ActivatableView<GridPane, Void> imp
|
||||||
private final DaoFacade daoFacade;
|
private final DaoFacade daoFacade;
|
||||||
private final PeriodService periodService;
|
private final PeriodService periodService;
|
||||||
private final PhasesView phasesView;
|
private final PhasesView phasesView;
|
||||||
private final BSFormatter formatter;
|
private final CoinFormatter formatter;
|
||||||
|
|
||||||
private int gridRow = 0;
|
private int gridRow = 0;
|
||||||
private TextField currentPhaseTextField, currentBlockHeightTextField, proposalTextField, blindVoteTextField, voteRevealTextField, voteResultTextField;
|
private TextField currentPhaseTextField, currentBlockHeightTextField, proposalTextField, blindVoteTextField, voteRevealTextField, voteResultTextField;
|
||||||
|
@ -59,7 +61,7 @@ public class GovernanceDashboardView extends ActivatableView<GridPane, Void> imp
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
public GovernanceDashboardView(DaoFacade daoFacade, PeriodService periodService, PhasesView phasesView, BSFormatter formatter) {
|
public GovernanceDashboardView(DaoFacade daoFacade, PeriodService periodService, PhasesView phasesView, @Named(FormattingUtils.BTC_FORMATTER_KEY) CoinFormatter formatter) {
|
||||||
this.daoFacade = daoFacade;
|
this.daoFacade = daoFacade;
|
||||||
this.periodService = periodService;
|
this.periodService = periodService;
|
||||||
this.phasesView = phasesView;
|
this.phasesView = phasesView;
|
||||||
|
|
|
@ -50,9 +50,10 @@ import bisq.core.dao.state.model.governance.DaoPhase;
|
||||||
import bisq.core.dao.state.model.governance.Proposal;
|
import bisq.core.dao.state.model.governance.Proposal;
|
||||||
import bisq.core.dao.state.model.governance.Role;
|
import bisq.core.dao.state.model.governance.Role;
|
||||||
import bisq.core.locale.Res;
|
import bisq.core.locale.Res;
|
||||||
import bisq.core.util.BSFormatter;
|
import bisq.core.util.FormattingUtils;
|
||||||
import bisq.core.util.BsqFormatter;
|
import bisq.core.util.coin.BsqFormatter;
|
||||||
import bisq.core.util.ParsingUtils;
|
import bisq.core.util.ParsingUtils;
|
||||||
|
import bisq.core.util.coin.CoinFormatter;
|
||||||
|
|
||||||
import bisq.asset.Asset;
|
import bisq.asset.Asset;
|
||||||
|
|
||||||
|
@ -67,6 +68,7 @@ import org.bitcoinj.core.InsufficientMoneyException;
|
||||||
import org.bitcoinj.core.Transaction;
|
import org.bitcoinj.core.Transaction;
|
||||||
|
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
import javax.inject.Named;
|
||||||
|
|
||||||
import javafx.scene.control.Button;
|
import javafx.scene.control.Button;
|
||||||
import javafx.scene.control.ComboBox;
|
import javafx.scene.control.ComboBox;
|
||||||
|
@ -108,7 +110,7 @@ public class MakeProposalView extends ActivatableView<GridPane, Void> implements
|
||||||
private final P2PService p2PService;
|
private final P2PService p2PService;
|
||||||
private final PhasesView phasesView;
|
private final PhasesView phasesView;
|
||||||
private final ChangeParamValidator changeParamValidator;
|
private final ChangeParamValidator changeParamValidator;
|
||||||
private final BSFormatter btcFormatter;
|
private final CoinFormatter btcFormatter;
|
||||||
private final BsqFormatter bsqFormatter;
|
private final BsqFormatter bsqFormatter;
|
||||||
private final Navigation navigation;
|
private final Navigation navigation;
|
||||||
private final BsqWalletService bsqWalletService;
|
private final BsqWalletService bsqWalletService;
|
||||||
|
@ -144,7 +146,7 @@ public class MakeProposalView extends ActivatableView<GridPane, Void> implements
|
||||||
BsqWalletService bsqWalletService,
|
BsqWalletService bsqWalletService,
|
||||||
PhasesView phasesView,
|
PhasesView phasesView,
|
||||||
ChangeParamValidator changeParamValidator,
|
ChangeParamValidator changeParamValidator,
|
||||||
BSFormatter btcFormatter,
|
@Named(FormattingUtils.BTC_FORMATTER_KEY) CoinFormatter btcFormatter,
|
||||||
BsqFormatter bsqFormatter,
|
BsqFormatter bsqFormatter,
|
||||||
Navigation navigation) {
|
Navigation navigation) {
|
||||||
this.daoFacade = daoFacade;
|
this.daoFacade = daoFacade;
|
||||||
|
|
|
@ -25,7 +25,7 @@ import bisq.core.dao.state.model.governance.DaoPhase;
|
||||||
import bisq.core.dao.state.model.governance.Proposal;
|
import bisq.core.dao.state.model.governance.Proposal;
|
||||||
import bisq.core.dao.state.model.governance.Vote;
|
import bisq.core.dao.state.model.governance.Vote;
|
||||||
import bisq.core.locale.Res;
|
import bisq.core.locale.Res;
|
||||||
import bisq.core.util.BsqFormatter;
|
import bisq.core.util.coin.BsqFormatter;
|
||||||
|
|
||||||
import de.jensd.fx.fontawesome.AwesomeIcon;
|
import de.jensd.fx.fontawesome.AwesomeIcon;
|
||||||
|
|
||||||
|
|
|
@ -53,9 +53,10 @@ import bisq.core.dao.state.model.governance.Proposal;
|
||||||
import bisq.core.dao.state.model.governance.Vote;
|
import bisq.core.dao.state.model.governance.Vote;
|
||||||
import bisq.core.locale.Res;
|
import bisq.core.locale.Res;
|
||||||
import bisq.core.user.Preferences;
|
import bisq.core.user.Preferences;
|
||||||
import bisq.core.util.BSFormatter;
|
import bisq.core.util.FormattingUtils;
|
||||||
import bisq.core.util.BsqFormatter;
|
import bisq.core.util.coin.BsqFormatter;
|
||||||
import bisq.core.util.ParsingUtils;
|
import bisq.core.util.ParsingUtils;
|
||||||
|
import bisq.core.util.coin.CoinFormatter;
|
||||||
|
|
||||||
import bisq.common.UserThread;
|
import bisq.common.UserThread;
|
||||||
import bisq.common.app.DevEnv;
|
import bisq.common.app.DevEnv;
|
||||||
|
@ -67,6 +68,7 @@ import org.bitcoinj.core.Coin;
|
||||||
import org.bitcoinj.core.InsufficientMoneyException;
|
import org.bitcoinj.core.InsufficientMoneyException;
|
||||||
|
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
import javax.inject.Named;
|
||||||
|
|
||||||
import com.jfoenix.controls.JFXButton;
|
import com.jfoenix.controls.JFXButton;
|
||||||
|
|
||||||
|
@ -119,7 +121,7 @@ public class ProposalsView extends ActivatableView<GridPane, Void> implements Bs
|
||||||
private final MyBlindVoteListService myBlindVoteListService;
|
private final MyBlindVoteListService myBlindVoteListService;
|
||||||
private final Preferences preferences;
|
private final Preferences preferences;
|
||||||
private final BsqFormatter bsqFormatter;
|
private final BsqFormatter bsqFormatter;
|
||||||
private final BSFormatter btcFormatter;
|
private final CoinFormatter btcFormatter;
|
||||||
private final SelectProposalWindow selectProposalWindow;
|
private final SelectProposalWindow selectProposalWindow;
|
||||||
|
|
||||||
private final ObservableList<ProposalsListItem> listItems = FXCollections.observableArrayList();
|
private final ObservableList<ProposalsListItem> listItems = FXCollections.observableArrayList();
|
||||||
|
@ -170,7 +172,7 @@ public class ProposalsView extends ActivatableView<GridPane, Void> implements Bs
|
||||||
MyBlindVoteListService myBlindVoteListService,
|
MyBlindVoteListService myBlindVoteListService,
|
||||||
Preferences preferences,
|
Preferences preferences,
|
||||||
BsqFormatter bsqFormatter,
|
BsqFormatter bsqFormatter,
|
||||||
BSFormatter btcFormatter,
|
@Named(FormattingUtils.BTC_FORMATTER_KEY) CoinFormatter btcFormatter,
|
||||||
SelectProposalWindow selectProposalWindow) {
|
SelectProposalWindow selectProposalWindow) {
|
||||||
this.daoFacade = daoFacade;
|
this.daoFacade = daoFacade;
|
||||||
this.bsqWalletService = bsqWalletService;
|
this.bsqWalletService = bsqWalletService;
|
||||||
|
|
|
@ -20,7 +20,7 @@ package bisq.desktop.main.dao.governance.result;
|
||||||
import bisq.core.dao.governance.proposal.IssuanceProposal;
|
import bisq.core.dao.governance.proposal.IssuanceProposal;
|
||||||
import bisq.core.dao.state.model.governance.EvaluatedProposal;
|
import bisq.core.dao.state.model.governance.EvaluatedProposal;
|
||||||
import bisq.core.locale.Res;
|
import bisq.core.locale.Res;
|
||||||
import bisq.core.util.BsqFormatter;
|
import bisq.core.util.coin.BsqFormatter;
|
||||||
import bisq.core.util.FormattingUtils;
|
import bisq.core.util.FormattingUtils;
|
||||||
|
|
||||||
import org.bitcoinj.core.Coin;
|
import org.bitcoinj.core.Coin;
|
||||||
|
|
|
@ -32,7 +32,7 @@ import bisq.core.dao.state.model.governance.RoleProposal;
|
||||||
import bisq.core.dao.state.model.governance.Vote;
|
import bisq.core.dao.state.model.governance.Vote;
|
||||||
import bisq.core.locale.CurrencyUtil;
|
import bisq.core.locale.CurrencyUtil;
|
||||||
import bisq.core.locale.Res;
|
import bisq.core.locale.Res;
|
||||||
import bisq.core.util.BsqFormatter;
|
import bisq.core.util.coin.BsqFormatter;
|
||||||
|
|
||||||
import org.bitcoinj.core.Coin;
|
import org.bitcoinj.core.Coin;
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ import bisq.core.dao.state.DaoStateService;
|
||||||
import bisq.core.dao.state.model.governance.Ballot;
|
import bisq.core.dao.state.model.governance.Ballot;
|
||||||
import bisq.core.dao.state.model.governance.DecryptedBallotsWithMerits;
|
import bisq.core.dao.state.model.governance.DecryptedBallotsWithMerits;
|
||||||
import bisq.core.dao.state.model.governance.Proposal;
|
import bisq.core.dao.state.model.governance.Proposal;
|
||||||
import bisq.core.util.BsqFormatter;
|
import bisq.core.util.coin.BsqFormatter;
|
||||||
|
|
||||||
import bisq.common.util.Tuple2;
|
import bisq.common.util.Tuple2;
|
||||||
|
|
||||||
|
|
|
@ -60,7 +60,7 @@ import bisq.core.dao.state.model.governance.Role;
|
||||||
import bisq.core.dao.state.model.governance.RoleProposal;
|
import bisq.core.dao.state.model.governance.RoleProposal;
|
||||||
import bisq.core.dao.state.model.governance.Vote;
|
import bisq.core.dao.state.model.governance.Vote;
|
||||||
import bisq.core.locale.Res;
|
import bisq.core.locale.Res;
|
||||||
import bisq.core.util.BsqFormatter;
|
import bisq.core.util.coin.BsqFormatter;
|
||||||
|
|
||||||
import bisq.common.UserThread;
|
import bisq.common.UserThread;
|
||||||
import bisq.common.util.Utilities;
|
import bisq.common.util.Utilities;
|
||||||
|
|
|
@ -10,7 +10,7 @@ import bisq.desktop.util.Layout;
|
||||||
import bisq.core.btc.wallet.BsqWalletService;
|
import bisq.core.btc.wallet.BsqWalletService;
|
||||||
import bisq.core.locale.Res;
|
import bisq.core.locale.Res;
|
||||||
import bisq.core.user.Preferences;
|
import bisq.core.user.Preferences;
|
||||||
import bisq.core.util.BsqFormatter;
|
import bisq.core.util.coin.BsqFormatter;
|
||||||
|
|
||||||
import bisq.common.util.Tuple3;
|
import bisq.common.util.Tuple3;
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@ import bisq.core.dao.state.DaoStateListener;
|
||||||
import bisq.core.dao.state.DaoStateService;
|
import bisq.core.dao.state.DaoStateService;
|
||||||
import bisq.core.dao.state.model.blockchain.Block;
|
import bisq.core.dao.state.model.blockchain.Block;
|
||||||
import bisq.core.locale.Res;
|
import bisq.core.locale.Res;
|
||||||
import bisq.core.util.BsqFormatter;
|
import bisq.core.util.coin.BsqFormatter;
|
||||||
|
|
||||||
import bisq.common.util.Tuple3;
|
import bisq.common.util.Tuple3;
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,7 @@ import bisq.desktop.util.Layout;
|
||||||
|
|
||||||
import bisq.core.btc.wallet.BsqWalletService;
|
import bisq.core.btc.wallet.BsqWalletService;
|
||||||
import bisq.core.locale.Res;
|
import bisq.core.locale.Res;
|
||||||
import bisq.core.util.BsqFormatter;
|
import bisq.core.util.coin.BsqFormatter;
|
||||||
|
|
||||||
import bisq.common.app.DevEnv;
|
import bisq.common.app.DevEnv;
|
||||||
import bisq.common.util.Tuple3;
|
import bisq.common.util.Tuple3;
|
||||||
|
|
|
@ -44,9 +44,10 @@ import bisq.core.btc.wallet.TxBroadcaster;
|
||||||
import bisq.core.btc.wallet.WalletsManager;
|
import bisq.core.btc.wallet.WalletsManager;
|
||||||
import bisq.core.dao.state.model.blockchain.TxType;
|
import bisq.core.dao.state.model.blockchain.TxType;
|
||||||
import bisq.core.locale.Res;
|
import bisq.core.locale.Res;
|
||||||
import bisq.core.util.BSFormatter;
|
import bisq.core.util.FormattingUtils;
|
||||||
import bisq.core.util.BsqFormatter;
|
import bisq.core.util.coin.BsqFormatter;
|
||||||
import bisq.core.util.CoinUtil;
|
import bisq.core.util.coin.CoinFormatter;
|
||||||
|
import bisq.core.util.coin.CoinUtil;
|
||||||
import bisq.core.util.ParsingUtils;
|
import bisq.core.util.ParsingUtils;
|
||||||
import bisq.core.util.validation.BtcAddressValidator;
|
import bisq.core.util.validation.BtcAddressValidator;
|
||||||
|
|
||||||
|
@ -59,6 +60,7 @@ import org.bitcoinj.core.InsufficientMoneyException;
|
||||||
import org.bitcoinj.core.Transaction;
|
import org.bitcoinj.core.Transaction;
|
||||||
|
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
import javax.inject.Named;
|
||||||
|
|
||||||
import javafx.scene.control.Button;
|
import javafx.scene.control.Button;
|
||||||
import javafx.scene.layout.GridPane;
|
import javafx.scene.layout.GridPane;
|
||||||
|
@ -77,7 +79,7 @@ public class BsqSendView extends ActivatableView<GridPane, Void> implements BsqB
|
||||||
private final WalletsSetup walletsSetup;
|
private final WalletsSetup walletsSetup;
|
||||||
private final P2PService p2PService;
|
private final P2PService p2PService;
|
||||||
private final BsqFormatter bsqFormatter;
|
private final BsqFormatter bsqFormatter;
|
||||||
private final BSFormatter btcFormatter;
|
private final CoinFormatter btcFormatter;
|
||||||
private final Navigation navigation;
|
private final Navigation navigation;
|
||||||
private final BsqBalanceUtil bsqBalanceUtil;
|
private final BsqBalanceUtil bsqBalanceUtil;
|
||||||
private final BsqValidator bsqValidator;
|
private final BsqValidator bsqValidator;
|
||||||
|
@ -105,7 +107,7 @@ public class BsqSendView extends ActivatableView<GridPane, Void> implements BsqB
|
||||||
WalletsSetup walletsSetup,
|
WalletsSetup walletsSetup,
|
||||||
P2PService p2PService,
|
P2PService p2PService,
|
||||||
BsqFormatter bsqFormatter,
|
BsqFormatter bsqFormatter,
|
||||||
BSFormatter btcFormatter,
|
@Named(FormattingUtils.BTC_FORMATTER_KEY) CoinFormatter btcFormatter,
|
||||||
Navigation navigation,
|
Navigation navigation,
|
||||||
BsqBalanceUtil bsqBalanceUtil,
|
BsqBalanceUtil bsqBalanceUtil,
|
||||||
BsqValidator bsqValidator,
|
BsqValidator bsqValidator,
|
||||||
|
@ -347,8 +349,8 @@ public class BsqSendView extends ActivatableView<GridPane, Void> implements BsqB
|
||||||
TxType txType,
|
TxType txType,
|
||||||
Coin miningFee,
|
Coin miningFee,
|
||||||
int txSize, String address,
|
int txSize, String address,
|
||||||
BSFormatter amountFormatter, // can be BSQ or BTC formatter
|
CoinFormatter amountFormatter, // can be BSQ or BTC formatter
|
||||||
BSFormatter feeFormatter,
|
CoinFormatter feeFormatter,
|
||||||
ResultHandler resultHandler) {
|
ResultHandler resultHandler) {
|
||||||
new Popup<>().headLine(Res.get("dao.wallet.send.sendFunds.headline"))
|
new Popup<>().headLine(Res.get("dao.wallet.send.sendFunds.headline"))
|
||||||
.confirmation(Res.get("dao.wallet.send.sendFunds.details",
|
.confirmation(Res.get("dao.wallet.send.sendFunds.details",
|
||||||
|
|
|
@ -25,7 +25,7 @@ import bisq.core.btc.wallet.WalletService;
|
||||||
import bisq.core.dao.DaoFacade;
|
import bisq.core.dao.DaoFacade;
|
||||||
import bisq.core.dao.state.model.blockchain.TxType;
|
import bisq.core.dao.state.model.blockchain.TxType;
|
||||||
import bisq.core.locale.Res;
|
import bisq.core.locale.Res;
|
||||||
import bisq.core.util.BsqFormatter;
|
import bisq.core.util.coin.BsqFormatter;
|
||||||
|
|
||||||
import org.bitcoinj.core.Coin;
|
import org.bitcoinj.core.Coin;
|
||||||
import org.bitcoinj.core.Transaction;
|
import org.bitcoinj.core.Transaction;
|
||||||
|
|
|
@ -40,7 +40,7 @@ import bisq.core.dao.state.model.blockchain.TxType;
|
||||||
import bisq.core.dao.state.model.governance.IssuanceType;
|
import bisq.core.dao.state.model.governance.IssuanceType;
|
||||||
import bisq.core.locale.Res;
|
import bisq.core.locale.Res;
|
||||||
import bisq.core.user.Preferences;
|
import bisq.core.user.Preferences;
|
||||||
import bisq.core.util.BsqFormatter;
|
import bisq.core.util.coin.BsqFormatter;
|
||||||
|
|
||||||
import bisq.common.Timer;
|
import bisq.common.Timer;
|
||||||
import bisq.common.UserThread;
|
import bisq.common.UserThread;
|
||||||
|
|
|
@ -25,7 +25,7 @@ import bisq.core.btc.listeners.TxConfidenceListener;
|
||||||
import bisq.core.btc.model.AddressEntry;
|
import bisq.core.btc.model.AddressEntry;
|
||||||
import bisq.core.btc.wallet.BtcWalletService;
|
import bisq.core.btc.wallet.BtcWalletService;
|
||||||
import bisq.core.locale.Res;
|
import bisq.core.locale.Res;
|
||||||
import bisq.core.util.BSFormatter;
|
import bisq.core.util.coin.CoinFormatter;
|
||||||
|
|
||||||
import org.bitcoinj.core.Address;
|
import org.bitcoinj.core.Address;
|
||||||
import org.bitcoinj.core.Coin;
|
import org.bitcoinj.core.Coin;
|
||||||
|
@ -53,7 +53,7 @@ class DepositListItem {
|
||||||
private TxConfidenceListener txConfidenceListener;
|
private TxConfidenceListener txConfidenceListener;
|
||||||
private int numTxOutputs = 0;
|
private int numTxOutputs = 0;
|
||||||
|
|
||||||
public DepositListItem(AddressEntry addressEntry, BtcWalletService walletService, BSFormatter formatter) {
|
public DepositListItem(AddressEntry addressEntry, BtcWalletService walletService, CoinFormatter formatter) {
|
||||||
this.walletService = walletService;
|
this.walletService = walletService;
|
||||||
|
|
||||||
addressString = addressEntry.getAddressString();
|
addressString = addressEntry.getAddressString();
|
||||||
|
|
|
@ -36,8 +36,9 @@ import bisq.core.btc.wallet.BtcWalletService;
|
||||||
import bisq.core.locale.Res;
|
import bisq.core.locale.Res;
|
||||||
import bisq.core.provider.fee.FeeService;
|
import bisq.core.provider.fee.FeeService;
|
||||||
import bisq.core.user.Preferences;
|
import bisq.core.user.Preferences;
|
||||||
import bisq.core.util.BSFormatter;
|
import bisq.core.util.FormattingUtils;
|
||||||
import bisq.core.util.ParsingUtils;
|
import bisq.core.util.ParsingUtils;
|
||||||
|
import bisq.core.util.coin.CoinFormatter;
|
||||||
|
|
||||||
import bisq.common.UserThread;
|
import bisq.common.UserThread;
|
||||||
import bisq.common.app.DevEnv;
|
import bisq.common.app.DevEnv;
|
||||||
|
@ -49,6 +50,7 @@ import net.glxn.qrgen.QRCode;
|
||||||
import net.glxn.qrgen.image.ImageType;
|
import net.glxn.qrgen.image.ImageType;
|
||||||
|
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
import javax.inject.Named;
|
||||||
|
|
||||||
import javafx.fxml.FXML;
|
import javafx.fxml.FXML;
|
||||||
|
|
||||||
|
@ -106,7 +108,7 @@ public class DepositView extends ActivatableView<VBox, Void> {
|
||||||
|
|
||||||
private final BtcWalletService walletService;
|
private final BtcWalletService walletService;
|
||||||
private final Preferences preferences;
|
private final Preferences preferences;
|
||||||
private final BSFormatter formatter;
|
private final CoinFormatter formatter;
|
||||||
private String paymentLabelString;
|
private String paymentLabelString;
|
||||||
private final ObservableList<DepositListItem> observableList = FXCollections.observableArrayList();
|
private final ObservableList<DepositListItem> observableList = FXCollections.observableArrayList();
|
||||||
private final SortedList<DepositListItem> sortedList = new SortedList<>(observableList);
|
private final SortedList<DepositListItem> sortedList = new SortedList<>(observableList);
|
||||||
|
@ -123,7 +125,7 @@ public class DepositView extends ActivatableView<VBox, Void> {
|
||||||
private DepositView(BtcWalletService walletService,
|
private DepositView(BtcWalletService walletService,
|
||||||
FeeService feeService,
|
FeeService feeService,
|
||||||
Preferences preferences,
|
Preferences preferences,
|
||||||
BSFormatter formatter) {
|
@Named(FormattingUtils.BTC_FORMATTER_KEY) CoinFormatter formatter) {
|
||||||
this.walletService = walletService;
|
this.walletService = walletService;
|
||||||
this.preferences = preferences;
|
this.preferences = preferences;
|
||||||
this.formatter = formatter;
|
this.formatter = formatter;
|
||||||
|
|
|
@ -25,7 +25,7 @@ import bisq.core.btc.wallet.BtcWalletService;
|
||||||
import bisq.core.btc.wallet.WalletService;
|
import bisq.core.btc.wallet.WalletService;
|
||||||
import bisq.core.trade.Tradable;
|
import bisq.core.trade.Tradable;
|
||||||
import bisq.core.trade.Trade;
|
import bisq.core.trade.Trade;
|
||||||
import bisq.core.util.BSFormatter;
|
import bisq.core.util.coin.CoinFormatter;
|
||||||
|
|
||||||
import org.bitcoinj.core.Address;
|
import org.bitcoinj.core.Address;
|
||||||
import org.bitcoinj.core.Coin;
|
import org.bitcoinj.core.Coin;
|
||||||
|
@ -41,13 +41,13 @@ class LockedListItem {
|
||||||
private final Trade trade;
|
private final Trade trade;
|
||||||
private final AddressEntry addressEntry;
|
private final AddressEntry addressEntry;
|
||||||
private final BtcWalletService btcWalletService;
|
private final BtcWalletService btcWalletService;
|
||||||
private final BSFormatter formatter;
|
private final CoinFormatter formatter;
|
||||||
private final String addressString;
|
private final String addressString;
|
||||||
@Nullable
|
@Nullable
|
||||||
private final Address address;
|
private final Address address;
|
||||||
private Coin balance;
|
private Coin balance;
|
||||||
|
|
||||||
public LockedListItem(Trade trade, AddressEntry addressEntry, BtcWalletService btcWalletService, BSFormatter formatter) {
|
public LockedListItem(Trade trade, AddressEntry addressEntry, BtcWalletService btcWalletService, CoinFormatter formatter) {
|
||||||
this.trade = trade;
|
this.trade = trade;
|
||||||
this.addressEntry = addressEntry;
|
this.addressEntry = addressEntry;
|
||||||
this.btcWalletService = btcWalletService;
|
this.btcWalletService = btcWalletService;
|
||||||
|
|
|
@ -37,12 +37,14 @@ import bisq.core.trade.Tradable;
|
||||||
import bisq.core.trade.Trade;
|
import bisq.core.trade.Trade;
|
||||||
import bisq.core.trade.TradeManager;
|
import bisq.core.trade.TradeManager;
|
||||||
import bisq.core.user.Preferences;
|
import bisq.core.user.Preferences;
|
||||||
import bisq.core.util.BSFormatter;
|
import bisq.core.util.FormattingUtils;
|
||||||
|
import bisq.core.util.coin.CoinFormatter;
|
||||||
|
|
||||||
import org.bitcoinj.core.Coin;
|
import org.bitcoinj.core.Coin;
|
||||||
import org.bitcoinj.core.Transaction;
|
import org.bitcoinj.core.Transaction;
|
||||||
|
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
import javax.inject.Named;
|
||||||
|
|
||||||
import de.jensd.fx.fontawesome.AwesomeIcon;
|
import de.jensd.fx.fontawesome.AwesomeIcon;
|
||||||
|
|
||||||
|
@ -80,7 +82,7 @@ public class LockedView extends ActivatableView<VBox, Void> {
|
||||||
private final TradeManager tradeManager;
|
private final TradeManager tradeManager;
|
||||||
private final OpenOfferManager openOfferManager;
|
private final OpenOfferManager openOfferManager;
|
||||||
private final Preferences preferences;
|
private final Preferences preferences;
|
||||||
private final BSFormatter formatter;
|
private final CoinFormatter formatter;
|
||||||
private final OfferDetailsWindow offerDetailsWindow;
|
private final OfferDetailsWindow offerDetailsWindow;
|
||||||
private final TradeDetailsWindow tradeDetailsWindow;
|
private final TradeDetailsWindow tradeDetailsWindow;
|
||||||
private final ObservableList<LockedListItem> observableList = FXCollections.observableArrayList();
|
private final ObservableList<LockedListItem> observableList = FXCollections.observableArrayList();
|
||||||
|
@ -96,7 +98,7 @@ public class LockedView extends ActivatableView<VBox, Void> {
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private LockedView(BtcWalletService btcWalletService, TradeManager tradeManager, OpenOfferManager openOfferManager, Preferences preferences,
|
private LockedView(BtcWalletService btcWalletService, TradeManager tradeManager, OpenOfferManager openOfferManager, Preferences preferences,
|
||||||
BSFormatter formatter, OfferDetailsWindow offerDetailsWindow, TradeDetailsWindow tradeDetailsWindow) {
|
@Named(FormattingUtils.BTC_FORMATTER_KEY) CoinFormatter formatter, OfferDetailsWindow offerDetailsWindow, TradeDetailsWindow tradeDetailsWindow) {
|
||||||
this.btcWalletService = btcWalletService;
|
this.btcWalletService = btcWalletService;
|
||||||
this.tradeManager = tradeManager;
|
this.tradeManager = tradeManager;
|
||||||
this.openOfferManager = openOfferManager;
|
this.openOfferManager = openOfferManager;
|
||||||
|
|
|
@ -24,7 +24,7 @@ import bisq.core.btc.model.AddressEntry;
|
||||||
import bisq.core.btc.wallet.BtcWalletService;
|
import bisq.core.btc.wallet.BtcWalletService;
|
||||||
import bisq.core.offer.OpenOffer;
|
import bisq.core.offer.OpenOffer;
|
||||||
import bisq.core.trade.Tradable;
|
import bisq.core.trade.Tradable;
|
||||||
import bisq.core.util.BSFormatter;
|
import bisq.core.util.coin.CoinFormatter;
|
||||||
|
|
||||||
import org.bitcoinj.core.Address;
|
import org.bitcoinj.core.Address;
|
||||||
import org.bitcoinj.core.Coin;
|
import org.bitcoinj.core.Coin;
|
||||||
|
@ -40,11 +40,11 @@ class ReservedListItem {
|
||||||
private final OpenOffer openOffer;
|
private final OpenOffer openOffer;
|
||||||
private final AddressEntry addressEntry;
|
private final AddressEntry addressEntry;
|
||||||
private final BtcWalletService btcWalletService;
|
private final BtcWalletService btcWalletService;
|
||||||
private final BSFormatter formatter;
|
private final CoinFormatter formatter;
|
||||||
private final String addressString;
|
private final String addressString;
|
||||||
private Coin balance;
|
private Coin balance;
|
||||||
|
|
||||||
public ReservedListItem(OpenOffer openOffer, AddressEntry addressEntry, BtcWalletService btcWalletService, BSFormatter formatter) {
|
public ReservedListItem(OpenOffer openOffer, AddressEntry addressEntry, BtcWalletService btcWalletService, CoinFormatter formatter) {
|
||||||
this.openOffer = openOffer;
|
this.openOffer = openOffer;
|
||||||
this.addressEntry = addressEntry;
|
this.addressEntry = addressEntry;
|
||||||
this.btcWalletService = btcWalletService;
|
this.btcWalletService = btcWalletService;
|
||||||
|
|
|
@ -37,12 +37,14 @@ import bisq.core.trade.Tradable;
|
||||||
import bisq.core.trade.Trade;
|
import bisq.core.trade.Trade;
|
||||||
import bisq.core.trade.TradeManager;
|
import bisq.core.trade.TradeManager;
|
||||||
import bisq.core.user.Preferences;
|
import bisq.core.user.Preferences;
|
||||||
import bisq.core.util.BSFormatter;
|
import bisq.core.util.FormattingUtils;
|
||||||
|
import bisq.core.util.coin.CoinFormatter;
|
||||||
|
|
||||||
import org.bitcoinj.core.Coin;
|
import org.bitcoinj.core.Coin;
|
||||||
import org.bitcoinj.core.Transaction;
|
import org.bitcoinj.core.Transaction;
|
||||||
|
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
import javax.inject.Named;
|
||||||
|
|
||||||
import de.jensd.fx.fontawesome.AwesomeIcon;
|
import de.jensd.fx.fontawesome.AwesomeIcon;
|
||||||
|
|
||||||
|
@ -80,7 +82,7 @@ public class ReservedView extends ActivatableView<VBox, Void> {
|
||||||
private final TradeManager tradeManager;
|
private final TradeManager tradeManager;
|
||||||
private final OpenOfferManager openOfferManager;
|
private final OpenOfferManager openOfferManager;
|
||||||
private final Preferences preferences;
|
private final Preferences preferences;
|
||||||
private final BSFormatter formatter;
|
private final CoinFormatter formatter;
|
||||||
private final OfferDetailsWindow offerDetailsWindow;
|
private final OfferDetailsWindow offerDetailsWindow;
|
||||||
private final TradeDetailsWindow tradeDetailsWindow;
|
private final TradeDetailsWindow tradeDetailsWindow;
|
||||||
private final ObservableList<ReservedListItem> observableList = FXCollections.observableArrayList();
|
private final ObservableList<ReservedListItem> observableList = FXCollections.observableArrayList();
|
||||||
|
@ -96,7 +98,7 @@ public class ReservedView extends ActivatableView<VBox, Void> {
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private ReservedView(BtcWalletService btcWalletService, TradeManager tradeManager, OpenOfferManager openOfferManager, Preferences preferences,
|
private ReservedView(BtcWalletService btcWalletService, TradeManager tradeManager, OpenOfferManager openOfferManager, Preferences preferences,
|
||||||
BSFormatter formatter, OfferDetailsWindow offerDetailsWindow, TradeDetailsWindow tradeDetailsWindow) {
|
@Named(FormattingUtils.BTC_FORMATTER_KEY) CoinFormatter formatter, OfferDetailsWindow offerDetailsWindow, TradeDetailsWindow tradeDetailsWindow) {
|
||||||
this.btcWalletService = btcWalletService;
|
this.btcWalletService = btcWalletService;
|
||||||
this.tradeManager = tradeManager;
|
this.tradeManager = tradeManager;
|
||||||
this.openOfferManager = openOfferManager;
|
this.openOfferManager = openOfferManager;
|
||||||
|
|
|
@ -21,13 +21,15 @@ import bisq.core.btc.wallet.BsqWalletService;
|
||||||
import bisq.core.btc.wallet.BtcWalletService;
|
import bisq.core.btc.wallet.BtcWalletService;
|
||||||
import bisq.core.dao.DaoFacade;
|
import bisq.core.dao.DaoFacade;
|
||||||
import bisq.core.user.Preferences;
|
import bisq.core.user.Preferences;
|
||||||
import bisq.core.util.BSFormatter;
|
import bisq.core.util.FormattingUtils;
|
||||||
|
import bisq.core.util.coin.CoinFormatter;
|
||||||
|
|
||||||
import bisq.common.crypto.PubKeyRing;
|
import bisq.common.crypto.PubKeyRing;
|
||||||
|
|
||||||
import org.bitcoinj.core.Transaction;
|
import org.bitcoinj.core.Transaction;
|
||||||
|
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
import javax.inject.Named;
|
||||||
import javax.inject.Singleton;
|
import javax.inject.Singleton;
|
||||||
|
|
||||||
import javax.annotation.Nullable;
|
import javax.annotation.Nullable;
|
||||||
|
@ -39,7 +41,7 @@ public class TransactionListItemFactory {
|
||||||
private final BsqWalletService bsqWalletService;
|
private final BsqWalletService bsqWalletService;
|
||||||
private final DaoFacade daoFacade;
|
private final DaoFacade daoFacade;
|
||||||
private final PubKeyRing pubKeyRing;
|
private final PubKeyRing pubKeyRing;
|
||||||
private final BSFormatter formatter;
|
private final CoinFormatter formatter;
|
||||||
private final Preferences preferences;
|
private final Preferences preferences;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
|
@ -47,7 +49,7 @@ public class TransactionListItemFactory {
|
||||||
BsqWalletService bsqWalletService,
|
BsqWalletService bsqWalletService,
|
||||||
DaoFacade daoFacade,
|
DaoFacade daoFacade,
|
||||||
PubKeyRing pubKeyRing,
|
PubKeyRing pubKeyRing,
|
||||||
BSFormatter formatter,
|
@Named(FormattingUtils.BTC_FORMATTER_KEY) CoinFormatter formatter,
|
||||||
Preferences preferences) {
|
Preferences preferences) {
|
||||||
this.btcWalletService = btcWalletService;
|
this.btcWalletService = btcWalletService;
|
||||||
this.bsqWalletService = bsqWalletService;
|
this.bsqWalletService = bsqWalletService;
|
||||||
|
|
|
@ -32,7 +32,7 @@ import bisq.core.offer.Offer;
|
||||||
import bisq.core.offer.OpenOffer;
|
import bisq.core.offer.OpenOffer;
|
||||||
import bisq.core.trade.Tradable;
|
import bisq.core.trade.Tradable;
|
||||||
import bisq.core.trade.Trade;
|
import bisq.core.trade.Trade;
|
||||||
import bisq.core.util.BSFormatter;
|
import bisq.core.util.coin.CoinFormatter;
|
||||||
|
|
||||||
import bisq.common.crypto.PubKeyRing;
|
import bisq.common.crypto.PubKeyRing;
|
||||||
|
|
||||||
|
@ -54,7 +54,7 @@ import javax.annotation.Nullable;
|
||||||
@Slf4j
|
@Slf4j
|
||||||
class TransactionsListItem {
|
class TransactionsListItem {
|
||||||
private final BtcWalletService btcWalletService;
|
private final BtcWalletService btcWalletService;
|
||||||
private final BSFormatter formatter;
|
private final CoinFormatter formatter;
|
||||||
private String dateString;
|
private String dateString;
|
||||||
private final Date date;
|
private final Date date;
|
||||||
private final String txId;
|
private final String txId;
|
||||||
|
@ -90,7 +90,7 @@ class TransactionsListItem {
|
||||||
TransactionAwareTradable transactionAwareTradable,
|
TransactionAwareTradable transactionAwareTradable,
|
||||||
DaoFacade daoFacade,
|
DaoFacade daoFacade,
|
||||||
PubKeyRing pubKeyRing,
|
PubKeyRing pubKeyRing,
|
||||||
BSFormatter formatter,
|
CoinFormatter formatter,
|
||||||
long ignoreDustThreshold) {
|
long ignoreDustThreshold) {
|
||||||
this.btcWalletService = btcWalletService;
|
this.btcWalletService = btcWalletService;
|
||||||
this.formatter = formatter;
|
this.formatter = formatter;
|
||||||
|
|
|
@ -36,7 +36,7 @@ import bisq.core.offer.OpenOffer;
|
||||||
import bisq.core.trade.Tradable;
|
import bisq.core.trade.Tradable;
|
||||||
import bisq.core.trade.Trade;
|
import bisq.core.trade.Trade;
|
||||||
import bisq.core.user.Preferences;
|
import bisq.core.user.Preferences;
|
||||||
import bisq.core.util.BSFormatter;
|
import bisq.core.util.coin.CoinFormatter;
|
||||||
|
|
||||||
import bisq.network.p2p.P2PService;
|
import bisq.network.p2p.P2PService;
|
||||||
|
|
||||||
|
@ -110,7 +110,7 @@ public class TransactionsView extends ActivatableView<VBox, Void> {
|
||||||
private final BtcWalletService btcWalletService;
|
private final BtcWalletService btcWalletService;
|
||||||
private final P2PService p2PService;
|
private final P2PService p2PService;
|
||||||
private final WalletsSetup walletsSetup;
|
private final WalletsSetup walletsSetup;
|
||||||
private final BSFormatter formatter;
|
private final CoinFormatter formatter;
|
||||||
private final Preferences preferences;
|
private final Preferences preferences;
|
||||||
private final TradeDetailsWindow tradeDetailsWindow;
|
private final TradeDetailsWindow tradeDetailsWindow;
|
||||||
private final OfferDetailsWindow offerDetailsWindow;
|
private final OfferDetailsWindow offerDetailsWindow;
|
||||||
|
@ -127,7 +127,7 @@ public class TransactionsView extends ActivatableView<VBox, Void> {
|
||||||
private TransactionsView(BtcWalletService btcWalletService,
|
private TransactionsView(BtcWalletService btcWalletService,
|
||||||
P2PService p2PService,
|
P2PService p2PService,
|
||||||
WalletsSetup walletsSetup,
|
WalletsSetup walletsSetup,
|
||||||
BSFormatter formatter,
|
CoinFormatter formatter,
|
||||||
Preferences preferences,
|
Preferences preferences,
|
||||||
TradeDetailsWindow tradeDetailsWindow,
|
TradeDetailsWindow tradeDetailsWindow,
|
||||||
OfferDetailsWindow offerDetailsWindow,
|
OfferDetailsWindow offerDetailsWindow,
|
||||||
|
|
|
@ -23,7 +23,7 @@ import bisq.core.btc.listeners.BalanceListener;
|
||||||
import bisq.core.btc.model.AddressEntry;
|
import bisq.core.btc.model.AddressEntry;
|
||||||
import bisq.core.btc.wallet.BtcWalletService;
|
import bisq.core.btc.wallet.BtcWalletService;
|
||||||
import bisq.core.locale.Res;
|
import bisq.core.locale.Res;
|
||||||
import bisq.core.util.BSFormatter;
|
import bisq.core.util.coin.CoinFormatter;
|
||||||
|
|
||||||
import org.bitcoinj.core.Address;
|
import org.bitcoinj.core.Address;
|
||||||
import org.bitcoinj.core.Coin;
|
import org.bitcoinj.core.Coin;
|
||||||
|
@ -39,7 +39,7 @@ class WithdrawalListItem {
|
||||||
private final Label balanceLabel;
|
private final Label balanceLabel;
|
||||||
private final AddressEntry addressEntry;
|
private final AddressEntry addressEntry;
|
||||||
private final BtcWalletService walletService;
|
private final BtcWalletService walletService;
|
||||||
private final BSFormatter formatter;
|
private final CoinFormatter formatter;
|
||||||
private Coin balance;
|
private Coin balance;
|
||||||
private final String addressString;
|
private final String addressString;
|
||||||
@Setter
|
@Setter
|
||||||
|
@ -47,7 +47,7 @@ class WithdrawalListItem {
|
||||||
private boolean isSelected;
|
private boolean isSelected;
|
||||||
|
|
||||||
public WithdrawalListItem(AddressEntry addressEntry, BtcWalletService walletService,
|
public WithdrawalListItem(AddressEntry addressEntry, BtcWalletService walletService,
|
||||||
BSFormatter formatter) {
|
CoinFormatter formatter) {
|
||||||
this.addressEntry = addressEntry;
|
this.addressEntry = addressEntry;
|
||||||
this.walletService = walletService;
|
this.walletService = walletService;
|
||||||
this.formatter = formatter;
|
this.formatter = formatter;
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue