diff --git a/assets/src/main/java/bisq/asset/coins/Bzedge.java b/assets/src/main/java/bisq/asset/coins/Bzedge.java new file mode 100644 index 00000000000..c39248046ca --- /dev/null +++ b/assets/src/main/java/bisq/asset/coins/Bzedge.java @@ -0,0 +1,29 @@ +/* + * 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 Bzedge extends Coin { + + public Bzedge() { + super("Bzedge", "BZE", new RegexAddressValidator("^t.*", "validation.altcoin.zAddressesNotSupported")); + } + + } 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 5a141f856f6..afcf7e6bac5 100644 --- a/assets/src/main/resources/META-INF/services/bisq.asset.Asset +++ b/assets/src/main/resources/META-INF/services/bisq.asset.Asset @@ -22,6 +22,7 @@ bisq.asset.coins.BSQ$Mainnet bisq.asset.coins.BSQ$Regtest bisq.asset.coins.BSQ$Testnet bisq.asset.coins.Byteball +bisq.asset.coins.Bzedge bisq.asset.coins.Cash2 bisq.asset.coins.Chaucha bisq.asset.coins.CloakCoin diff --git a/assets/src/test/java/bisq/asset/coins/BzedgeTest.java b/assets/src/test/java/bisq/asset/coins/BzedgeTest.java new file mode 100644 index 00000000000..e5f213a8e0f --- /dev/null +++ b/assets/src/test/java/bisq/asset/coins/BzedgeTest.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 bisq.asset.AbstractAssetTest; + + import org.junit.Test; + + public class BzedgeTest extends AbstractAssetTest { + + public BzedgeTest() { + super(new Bzedge()); + } + + @Test + public void testValidAddresses() { + assertValidAddress("t1K6LGT7z2uNTLxag6eK6XwGNpdkHbncBaK"); + assertValidAddress("t1ZjdqCGEkqL9nZ8fk9R6KA7bqNvXaVLUpF"); + } + + @Test + public void testInvalidAddresses() { + assertInvalidAddress("17VZNX1SN5NtKa8UQFxwQbFeFc3iqRYhem"); + assertInvalidAddress("38NwrYsD1HxQW5zfLT0QcUUXGMPvQgzTSn"); + assertInvalidAddress("8tP9rh3SH6n9cSLmV22vnSNNw56LKGpLrB"); + assertInvalidAddress("8Zbvjr"); + } +}