mirror of
https://github.com/bisq-network/bisq.git
synced 2024-11-19 18:03:12 +01:00
commit
53ec4b2404
@ -146,7 +146,8 @@ public class CurrencyUtil {
|
||||
result.add(new CryptoCurrency("SIB", "Sibcoin"));
|
||||
result.add(new CryptoCurrency("XSPEC", "Spectrecoin"));
|
||||
result.add(new CryptoCurrency("STEEM", "STEEM"));
|
||||
result.add(new CryptoCurrency("TRC", "Terracoin"));
|
||||
result.add(new CryptoCurrency("STL", "Stellite"));
|
||||
result.add(new CryptoCurrency("TRC", "Terracoin"));
|
||||
result.add(new CryptoCurrency("MVT", "The Movement", true));
|
||||
|
||||
result.add(new CryptoCurrency("UNO", "Unobtanium"));
|
||||
|
@ -433,7 +433,11 @@ public final class AltCoinAddressValidator extends InputValidator {
|
||||
return regexTestFailed;
|
||||
else
|
||||
return new ValidationResult(true);
|
||||
|
||||
case "STL":
|
||||
if(!input.matches("^(Se)\\d[0-9A-Za-z]{94}$"))
|
||||
return regexTestFailed;
|
||||
else
|
||||
return new ValidationResult(true);
|
||||
|
||||
// Add new coins at the end...
|
||||
default:
|
||||
|
@ -568,4 +568,18 @@ public class AltCoinAddressValidatorTest {
|
||||
assertFalse(validator.validate("2a65Aca4D5fC5B5C859090a6c34d16413539822g").isValid);
|
||||
assertFalse(validator.validate("").isValid);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSTL() {
|
||||
AltCoinAddressValidator validator = new AltCoinAddressValidator();
|
||||
validator.setCurrencyCode("STL");
|
||||
|
||||
assertTrue(validator.validate("Se3x7sVdvUnMMn2KoYLyYVHMJGRoB2R3V8K3LYuHAiEXgVac7vsmFiXUC8dSpJnjXDfwytKsQJV6HFH8MjwPagTJ2Aha46RZM").isValid);
|
||||
assertTrue(validator.validate("Se3F51UzpbVVnQRx2VNbcjfBoQJfeuyFF353i1jLnCZda9yVN3vy8csbYCESBvf38TFkchH1C1tMY6XHkC8L678K2vLsVZVMU").isValid);
|
||||
|
||||
assertFalse(validator.validate("Se3x7svUnMMn2KoYLyYVHMJGRoB2R3V8K3LYuHAiEXgVac7vsmFiXUC8dSpJnjXDfwytKsQJV6HFH8MjwPagTJ2Aha46RZM").isValid); //Only 95 charecter, expected is 97.
|
||||
assertFalse(validator.validate("SX45GjRnvqheAgCpx4nJeKRjDtS5tYawxEP1GaTj79dTEm21Dtdxex6EHyDqBpofoDqW9k9uQWtkGgbbF8kiRSZ27AksBg7G111").isValid); //Address prefix is Se and not SX and not 99 chars.
|
||||
assertFalse(validator.validate("Se3F51UzpbVVnQRx2VNbcjfBoQJfeuyFF353i1jLnCZda9yVN3vy8csbYCESBvf38TFkchH1C1tMY6XHkC8L678K2vLsVZVMUII").isValid); //99 Charecters, expected is 97
|
||||
assertFalse(validator.validate("").isValid);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user