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

List Wownero (WOW) #5

Merged
merged 1 commit into from May 11, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions src/main/java/bisq/asset/coins/Wownero.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 Wownero extends Coin {

public Wownero() {
super("Wownero", "WOW", new RegexAddressValidator("^(Wo)\\d[0-9A-Za-z]{94}$"));
}
}
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 @@ -94,6 +94,7 @@ bisq.asset.coins.Unobtanium
bisq.asset.coins.VDinar
bisq.asset.coins.Wacoin
bisq.asset.coins.WorldMobileCoin
bisq.asset.coins.Wownero
bisq.asset.coins.Xuez
bisq.asset.coins.Yenten
bisq.asset.coins.Zcash
Expand Down
43 changes: 43 additions & 0 deletions src/test/java/bisq/asset/coins/WowneroTest.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 WowneroTest extends AbstractAssetTest {

public WowneroTest() {
super(new Wownero());
}

@Test
public void testValidAddresses() {
assertValidAddress("Wo3MWeKwtA918DU4c69hVSNgejdWFCRCuWjShRY66mJkU2Hv58eygJWDJS1MNa2Ge5M1WjUkGHuLqHkweDxwZZU42d16v94mP");
assertValidAddress("Wo4hqQ2xftk9UNDThFPWcQ4VtgC4Ciz7ES3XQ81qdfYjXe17kUxPSGGWwisoxYvZb5Y36DpGVKVLZXHhwjwB7TZr1evyvgMg2");
}

@Test
public void testInvalidAddresses() {
assertInvalidAddress("Wo3MWeKwtA918DU4c69hVSNgejdWFCRCuWjShRY66mJkU2Hv58eygJWDJS1MNa2Ge5M1WjUkGHuLqHkweDxwZZU42d16v94");
assertInvalidAddress("Wo3MWeKwtA918DU4c69hVSNgejdWFCRCuWjShRY66mJkU2Hv58eygJWDJS1MNa2Ge5M1WjUkGHuLqHkweDxwZZU42d16v94mP69");
assertInvalidAddress("694hqQ2xftk9UNDThFPWcQ4VtgC4Ciz7ES3XQ81qdfYjXe17kUxPSGGWwisoxYvZb5Y36DpGVKVLZXHhwjwB7TZr1evyvgMg2");
assertInvalidAddress("W14hqQ2xftk9UNDThFPWcQ4VtgC4Ciz7ES3XQ81qdfYjXe17kUxPSGGWwisoxYvZb5Y36DpGVKVLZXHhwjwB7TZr1evyvgMg2");
}
}