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

Commit

Permalink
List Aquachain (AQUA)
Browse files Browse the repository at this point in the history
  • Loading branch information
aerth committed May 15, 2018
1 parent 36eb65e commit f31aea6
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/Aquachain.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.Coin;
import bisq.asset.RegexAddressValidator;

public class Aquachain extends Coin {

public Aquachain() {
super("Aquachain", "AQUA", new RegexAddressValidator("^(0x)?[0-9a-fA-F]{40}$"));
}
}
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 @@ -6,6 +6,7 @@
#
bisq.asset.coins.Achievecoin
bisq.asset.coins.Angelcoin
bisq.asset.coins.Aquachain
bisq.asset.coins.Arto
bisq.asset.coins.Bitcoin$Mainnet
bisq.asset.coins.Bitcoin$Regtest
Expand Down
43 changes: 43 additions & 0 deletions src/test/java/bisq/asset/coins/AquachainTest.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 AquachainTest extends AbstractAssetTest {

public AquachainTest() {
super(new Aquachain());
}

@Test
public void testValidAddresses() {
assertValidAddress("0x2a65Aca4D5fC5B5C859090a6c34d164135398226");
assertValidAddress("2a65Aca4D5fC5B5C859090a6c34d164135398226");
}

@Test
public void testInvalidAddresses() {
assertInvalidAddress("0x2a65Aca4D5fC5B5C859090a6c34d1641353982266");
assertInvalidAddress("0x2a65Aca4D5fC5B5C859090a6c34d16413539822g");
assertInvalidAddress("2a65Aca4D5fC5B5C859090a6c34d16413539822g");
}

}

0 comments on commit f31aea6

Please sign in to comment.