mirror of
https://github.com/bisq-network/bisq.git
synced 2024-11-20 02:12:00 +01:00
Merge branch 'madcoin-project-master' into Development
This commit is contained in:
commit
862b59b50a
@ -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"));
|
||||
|
@ -221,6 +221,7 @@ public class TradeStatisticsManager {
|
||||
List<String> allCryptoCurrencies = new ArrayList<>();
|
||||
Set<String> 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<String> 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()));
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user