Skip to content
This repository has been archived by the owner on Sep 6, 2018. It is now read-only.

Commit

Permalink
Merge pull request #3 from ctya/list-devcoin-asset
Browse files Browse the repository at this point in the history
List Devcoin (DVC)
  • Loading branch information
cbeams committed May 9, 2018
2 parents d6a9d62 + 3043d26 commit 668a628
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 0 deletions.
28 changes: 28 additions & 0 deletions src/main/java/bisq/asset/coins/Devcoin.java
Original file line number Diff line number Diff line change
@@ -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 <http://www.gnu.org/licenses/>.
*/

package bisq.asset.coins;

import bisq.asset.Base58BitcoinAddressValidator;
import bisq.asset.Coin;

public class Devcoin extends Coin {

public Devcoin() {
super("Devcoin", "DVC", new Base58BitcoinAddressValidator());
}
}
1 change: 1 addition & 0 deletions src/main/resources/META-INF/services/bisq.asset.Asset
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
43 changes: 43 additions & 0 deletions src/test/java/bisq/asset/coins/DevcoinTest.java
Original file line number Diff line number Diff line change
@@ -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 <http://www.gnu.org/licenses/>.
*/

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#");
}
}

0 comments on commit 668a628

Please sign in to comment.