mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-22 22:45:21 +01:00
List Noteblockhain [NTBC]
Added NoteBlockchain coin related assets
This commit is contained in:
parent
6273246926
commit
c246571003
3 changed files with 71 additions and 0 deletions
27
assets/src/main/java/bisq/asset/coins/NoteBlockchain.java
Normal file
27
assets/src/main/java/bisq/asset/coins/NoteBlockchain.java
Normal file
|
@ -0,0 +1,27 @@
|
|||
/*
|
||||
* 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 NoteBlockchain extends Coin {
|
||||
public NoteBlockchain() {
|
||||
super("NoteBlockchain", "NTBC", new RegexAddressValidator("^[N][a-km-zA-HJ-NP-Z1-9]{26,33}$"));
|
||||
}
|
||||
}
|
|
@ -73,6 +73,7 @@ bisq.asset.coins.Namecoin
|
|||
bisq.asset.coins.Navcoin
|
||||
bisq.asset.coins.Neos
|
||||
bisq.asset.coins.Noir
|
||||
bisq.asset.coins.NoteBlockchain
|
||||
bisq.asset.coins.ParsiCoin
|
||||
bisq.asset.coins.Particl
|
||||
bisq.asset.coins.PENG
|
||||
|
|
|
@ -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 NoteBlockchainTest extends AbstractAssetTest {
|
||||
|
||||
public NoteBlockchainTest() {
|
||||
super(new NoteBlockchain());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testValidAddresses() {
|
||||
assertValidAddress("NaeSp6oTDFiGBZejFyYJvuCaSqWMnMM44E");
|
||||
assertValidAddress("NPCz6bsSnksLUGbp11hbHFWqFuVweEgMWM");
|
||||
assertValidAddress("NMNA6oMBExWhYoVEcD2BbcL6qmQ6rs7GN2");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testInvalidAddresses() {
|
||||
assertInvalidAddress("1NMNA6oMBExWhYoVEcD2BbcL6qmQ6rs7GN2");
|
||||
assertInvalidAddress("NMNA6oMBExyWhYoVEcD2BbcL6qmQ6rs7GN2");
|
||||
assertInvalidAddress("NMNA6oMBExWhYoVEcD2BbcL6qmQ6rs7GN2#");
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue