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 #28 from LobsDex/Lobstex
Browse files Browse the repository at this point in the history
List Lobstex (LOB)
  • Loading branch information
cbeams committed Jun 30, 2018
2 parents 0d1bc82 + 26e8748 commit 6b009bb
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 0 deletions.
28 changes: 28 additions & 0 deletions src/main/java/bisq/asset/coins/Lobstex.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 Lobstex extends Coin {

public Lobstex() {
super("Lobstex", "LOBS", new RegexAddressValidator("^L[1-9A-Za-z]{26,33}$"));
}
}
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 @@ -63,6 +63,7 @@ bisq.asset.coins.LitecoinExtreme
bisq.asset.coins.Litecoin$Mainnet
bisq.asset.coins.Litecoin$Regtest
bisq.asset.coins.Litecoin$Testnet
bisq.asset.coins.Lobstex
bisq.asset.coins.Madbyte
bisq.asset.coins.Madcoin
bisq.asset.coins.MaidSafeCoin
Expand Down
44 changes: 44 additions & 0 deletions src/test/java/bisq/asset/coins/LobstexTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
/*
* 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 LobstexTest extends AbstractAssetTest {

public LobstexTest() {
super(new Lobstex());
}

@Test
public void testValidAddresses() {
assertValidAddress("LbfvBwhBKK9EUnBEzCa4spT6RgEKXj3RoR");
assertValidAddress("LMMLeypCrMzxytAUfTBpLDQ98eRx7hXRgD");
assertValidAddress("LeGSV3RRb7zULou9XGZsUUGLLk3gPi41aV");
}

@Test
public void testInvalidAddresses() {
assertInvalidAddress("LbfvBwhBKK9EUnBEzCa4spT6RgEKXj3RoRX");
assertInvalidAddress("LbfvBwhBKK9EUnBEzCa4spT6Rg");
assertInvalidAddress("LbfvBwhBKK9EUnBEzCa4spT6RgEKXj3Ro#");
assertInvalidAddress("ObfvBwhBKK9EUnBEzCa4spT6RgEKXj3RoR");
}
}

0 comments on commit 6b009bb

Please sign in to comment.