mirror of
https://github.com/bisq-network/bisq.git
synced 2024-11-19 18:03:12 +01:00
Merge branch 'list-betr-token' of https://github.com/BetterBetting/exchange-bisq-network into BetterBetting-list-betr-token
This commit is contained in:
commit
20fd6a706e
@ -94,6 +94,7 @@ public class CurrencyUtil {
|
||||
result.add(new CryptoCurrency("BTC", "Bitcoin"));
|
||||
result.add(new CryptoCurrency("BCH", "Bitcoin Cash"));
|
||||
result.add(new CryptoCurrency("BCHC", "Bitcoin Clashic"));
|
||||
result.add(new CryptoCurrency("BETR", "Better Betting", true));
|
||||
result.add(new CryptoCurrency("BTG", "Bitcoin Gold"));
|
||||
result.add(new CryptoCurrency("BURST", "Burstcoin"));
|
||||
result.add(new CryptoCurrency("GBYTE", "Byte"));
|
||||
|
@ -416,6 +416,12 @@ public final class AltCoinAddressValidator extends InputValidator {
|
||||
return regexTestFailed;
|
||||
else
|
||||
return new ValidationResult(true);
|
||||
case "BETR":
|
||||
// https://github.com/ethereum/web3.js/blob/master/lib/utils/utils.js#L403
|
||||
if (!input.matches("^(0x)?[0-9a-fA-F]{40}$"))
|
||||
return regexTestFailed;
|
||||
else
|
||||
return new ValidationResult(true);
|
||||
|
||||
// Add new coins at the end...
|
||||
default:
|
||||
|
@ -525,4 +525,18 @@ public class AltCoinAddressValidatorTest {
|
||||
assertFalse(validator.validate("XIN-FXFA-LR6Y-QZA-9V4SX").isValid);
|
||||
assertFalse(validator.validate("XIN-FXFA-LR6Y-QZAW-9V4S").isValid);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testBETR() {
|
||||
AltCoinAddressValidator validator = new AltCoinAddressValidator();
|
||||
validator.setCurrencyCode("BETR");
|
||||
|
||||
assertTrue(validator.validate("0x2a65Aca4D5fC5B5C859090a6c34d164135398226").isValid);
|
||||
assertTrue(validator.validate("2a65Aca4D5fC5B5C859090a6c34d164135398226").isValid);
|
||||
|
||||
assertFalse(validator.validate("0x2a65Aca4D5fC5B5C859090a6c34d1641353982266").isValid);
|
||||
assertFalse(validator.validate("0x2a65Aca4D5fC5B5C859090a6c34d16413539822g").isValid);
|
||||
assertFalse(validator.validate("2a65Aca4D5fC5B5C859090a6c34d16413539822g").isValid);
|
||||
assertFalse(validator.validate("").isValid);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user