diff --git a/common/src/main/java/io/bisq/common/locale/CurrencyUtil.java b/common/src/main/java/io/bisq/common/locale/CurrencyUtil.java index 4813aa1b96..52402d7720 100644 --- a/common/src/main/java/io/bisq/common/locale/CurrencyUtil.java +++ b/common/src/main/java/io/bisq/common/locale/CurrencyUtil.java @@ -113,6 +113,7 @@ public class CurrencyUtil { if (!baseCurrencyCode.equals("LTC")) result.add(new CryptoCurrency("LTC", "Litecoin")); result.add(new CryptoCurrency("MAID", "MaidSafeCoin")); + result.add(new CryptoCurrency("MDC", "Madcoin")); result.add(new CryptoCurrency("XMR", "Monero")); result.add(new CryptoCurrency("MT", "Mycelium Token", true)); result.add(new CryptoCurrency("NAV", "Nav Coin")); diff --git a/core/src/main/java/io/bisq/core/trade/statistics/TradeStatisticsManager.java b/core/src/main/java/io/bisq/core/trade/statistics/TradeStatisticsManager.java index 4aa75b3b69..894cff82b2 100644 --- a/core/src/main/java/io/bisq/core/trade/statistics/TradeStatisticsManager.java +++ b/core/src/main/java/io/bisq/core/trade/statistics/TradeStatisticsManager.java @@ -221,6 +221,7 @@ public class TradeStatisticsManager { List allCryptoCurrencies = new ArrayList<>(); Set coinsWithValidator = new HashSet<>(); coinsWithValidator.add("BTC"); + coinsWithValidator.add("BSQ"); coinsWithValidator.add("LTC"); coinsWithValidator.add("DOGE"); coinsWithValidator.add("DASH"); @@ -231,13 +232,21 @@ public class TradeStatisticsManager { coinsWithValidator.add("ZEC"); coinsWithValidator.add("GBYTE"); coinsWithValidator.add("NXT"); + //v0.6.0 + coinsWithValidator.add("DCT"); coinsWithValidator.add("PNC"); - coinsWithValidator.add("ZEN"); coinsWithValidator.add("WAC"); - coinsWithValidator.add("DEC"); + coinsWithValidator.add("ZEN"); + coinsWithValidator.add("ELLA"); + coinsWithValidator.add("XCN"); + coinsWithValidator.add("TRC"); + coinsWithValidator.add("INXT"); + coinsWithValidator.add("PART"); + // v0.6.1 + coinsWithValidator.add("MAD"); - // v0.6: DECENT, Pranacoin, WACoins, ZenCash, Ellaism, Cryptonite, Terracoin, Internext Set newlyAdded = new HashSet<>(); + // v0.6.0 newlyAdded.add("DCT"); newlyAdded.add("PNC"); newlyAdded.add("WAC"); @@ -247,6 +256,8 @@ public class TradeStatisticsManager { newlyAdded.add("TRC"); newlyAdded.add("INXT"); newlyAdded.add("PART"); + // v0.6.1 + newlyAdded.add("MAD"); CurrencyUtil.getAllSortedCryptoCurrencies().stream() .forEach(e -> allCryptoCurrencies.add(e.getNameAndCode())); diff --git a/gui/src/main/java/io/bisq/gui/util/validation/AltCoinAddressValidator.java b/gui/src/main/java/io/bisq/gui/util/validation/AltCoinAddressValidator.java index 5588a6bd6a..8cd2a2981b 100644 --- a/gui/src/main/java/io/bisq/gui/util/validation/AltCoinAddressValidator.java +++ b/gui/src/main/java/io/bisq/gui/util/validation/AltCoinAddressValidator.java @@ -370,6 +370,11 @@ public final class AltCoinAddressValidator extends InputValidator { default: log.debug("Validation for AltCoinAddress not implemented yet. currencyCode: " + currencyCode); return validationResult; + case "MDC": + if (input.matches("^L[a-zA-Z0-9]{26,33}$")) + return new ValidationResult(true); + else + return regexTestFailed; } } } diff --git a/gui/src/test/java/io/bisq/gui/util/validation/AltCoinAddressValidatorTest.java b/gui/src/test/java/io/bisq/gui/util/validation/AltCoinAddressValidatorTest.java index 3683382915..1085981d43 100644 --- a/gui/src/test/java/io/bisq/gui/util/validation/AltCoinAddressValidatorTest.java +++ b/gui/src/test/java/io/bisq/gui/util/validation/AltCoinAddressValidatorTest.java @@ -283,5 +283,18 @@ public class AltCoinAddressValidatorTest { assertFalse(validator.validate("2a65Aca4D5fC5B5C859090a6c34d16413539822g").isValid); assertFalse(validator.validate("").isValid); } + @Test + public void testMDC() { + AltCoinAddressValidator validator = new AltCoinAddressValidator(); + validator.setCurrencyCode("MDC"); + + assertTrue(validator.validate("LiL8HvSJRDgnS5BXATWe5MzWYicCbRvisr").isValid); + assertTrue(validator.validate("LX8B2K8eHSxWjfS55sdMoQj2PCPmvRRyLv").isValid); + + assertFalse(validator.validate("mzBc4XEFSdzCDcTxAgf6EZXgsZWpztRhe").isValid); + assertFalse(validator.validate("miCVC7QcY917Cz427qTBEUrvBzRapHrupc").isValid); + assertFalse(validator.validate("12KYrjTdVGjFMtaxERSk3gphreJ5US8aUP").isValid); + assertFalse(validator.validate("").isValid); + } }