diff --git a/assets/src/main/java/bisq/asset/coins/VARIUS.java b/assets/src/main/java/bisq/asset/coins/VARIUS.java new file mode 100644 index 00000000000..abb3e00ce1b --- /dev/null +++ b/assets/src/main/java/bisq/asset/coins/VARIUS.java @@ -0,0 +1,28 @@ +/* + * This file is part of Bisq. + * + * Bisq is free software: you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at + * your option) any later version. + * + * Bisq is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public + * License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with Bisq. If not, see . + */ + +package bisq.asset.coins; + +import bisq.asset.Coin; +import bisq.asset.RegexAddressValidator; + +public class VARIUS extends Coin { + + public VARIUS() { + super("VARIUS Coin", "VARIUS", new RegexAddressValidator("^[V][a-km-zA-HJ-NP-Z1-9]{33}$")); + } +} \ No newline at end of file diff --git a/assets/src/main/resources/META-INF/services/bisq.asset.Asset b/assets/src/main/resources/META-INF/services/bisq.asset.Asset index c1ec0a9baf8..a9a27689758 100644 --- a/assets/src/main/resources/META-INF/services/bisq.asset.Asset +++ b/assets/src/main/resources/META-INF/services/bisq.asset.Asset @@ -97,6 +97,7 @@ bisq.asset.coins.TEO bisq.asset.coins.TurtleCoin bisq.asset.coins.UnitedCommunityCoin bisq.asset.coins.Unobtanium +bisq.asset.coins.VARIUS bisq.asset.coins.Veil bisq.asset.coins.Vertcoin bisq.asset.coins.Webchain diff --git a/assets/src/test/java/bisq/asset/coins/VARIUSTest.java b/assets/src/test/java/bisq/asset/coins/VARIUSTest.java new file mode 100644 index 00000000000..a8b27d14063 --- /dev/null +++ b/assets/src/test/java/bisq/asset/coins/VARIUSTest.java @@ -0,0 +1,43 @@ +/* + * This file is part of Bisq. + * + * Bisq is free software: you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at + * your option) any later version. + * + * Bisq is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public + * License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with Bisq. If not, see . + */ + +package bisq.asset.coins; + +import org.junit.Test; + +import bisq.asset.AbstractAssetTest; + +public class VARIUSTest extends AbstractAssetTest { + + public VARIUSTest() { + super(new VARIUS()); + } + + @Test + public void testValidAddresses() { + assertValidAddress("VL85MGBCSfnSeiLxuQwXuvxHArzfr1574H"); + assertValidAddress("VBKxFQULC6bjzWdb2PhZyoRdePq8fs55fi"); + assertValidAddress("VXwmVvzX6KMqfkBJXRXu4VUbgzPhLKdBSq"); + } + + @Test + public void testInvalidAddresses() { + assertInvalidAddress("xLfnSeiLxuQwXuvxHArzfr1574H"); + assertInvalidAddress("BBKzWdb2PhZyoRdePq8fs55fi"); + assertInvalidAddress("vXwmVvzX6KMqfkBJXRXu4VUbgzPhLKdBSq"); + } +} \ No newline at end of file