diff --git a/src/main/java/bisq/asset/coins/Devcoin.java b/src/main/java/bisq/asset/coins/Devcoin.java new file mode 100644 index 0000000..6698ad4 --- /dev/null +++ b/src/main/java/bisq/asset/coins/Devcoin.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.Base58BitcoinAddressValidator; +import bisq.asset.Coin; + +public class Devcoin extends Coin { + + public Devcoin() { + super("Devcoin", "DVC", new Base58BitcoinAddressValidator()); + } +} diff --git a/src/main/resources/META-INF/services/bisq.asset.Asset b/src/main/resources/META-INF/services/bisq.asset.Asset index 7124e11..556dac9 100644 --- a/src/main/resources/META-INF/services/bisq.asset.Asset +++ b/src/main/resources/META-INF/services/bisq.asset.Asset @@ -33,6 +33,7 @@ bisq.asset.coins.Dash$Testnet bisq.asset.coins.Decent bisq.asset.coins.Decred bisq.asset.coins.DeepOnion +bisq.asset.coins.Devcoin bisq.asset.coins.DigiMoney bisq.asset.coins.Dinero bisq.asset.coins.Dogecoin diff --git a/src/test/java/bisq/asset/coins/DevcoinTest.java b/src/test/java/bisq/asset/coins/DevcoinTest.java new file mode 100644 index 0000000..ca8839d --- /dev/null +++ b/src/test/java/bisq/asset/coins/DevcoinTest.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 DevcoinTest extends AbstractAssetTest { + + public DevcoinTest() { + super(new Devcoin()); + } + + @Test + public void testValidAddresses() { + assertValidAddress("1GJt2nDUrVinYyDFJuWMkkK1Urod5nH72F"); + assertValidAddress("1NAU869PAca5sH2ot6UyxxgK6pbTLRknQo"); + assertValidAddress("1HX3cBKe7hYBJd7xh6L4teNT75iLCZsqZJ"); + } + + @Test + public void testInvalidAddresses() { + assertInvalidAddress("21HQQgsvLTgN9xD9hNmAgAreakzVzQUSLSHa"); + assertInvalidAddress("1HQQgsvLTgN9xD9hNmAgAreakzVzQUSLSHs"); + assertInvalidAddress("1HQQgsvLTgN9xD9hNmAgAreakzVzQUSLSH#"); + } +}