mirror of
https://github.com/bisq-network/bisq.git
synced 2024-11-19 01:41:11 +01:00
Add Beam
This commit is contained in:
parent
88a7292a06
commit
eca2e0200f
27
assets/src/main/java/bisq/asset/coins/Beam.java
Normal file
27
assets/src/main/java/bisq/asset/coins/Beam.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 Beam extends Coin {
|
||||
public Beam() {
|
||||
super("Beam", "BEAM", new RegexAddressValidator("^([0-9a-f]{64,65})$"));
|
||||
}
|
||||
}
|
@ -4,6 +4,7 @@
|
||||
# See https://bisq.network/list-asset for complete instructions.
|
||||
bisq.asset.coins.Actinium
|
||||
bisq.asset.coins.Aeon
|
||||
bisq.asset.coins.Beam
|
||||
bisq.asset.coins.BitcoinRhodium
|
||||
bisq.asset.coins.Bitcoin$Mainnet
|
||||
bisq.asset.coins.Bitcoin$Regtest
|
||||
|
43
assets/src/test/java/bisq/asset/coins/BeamTest.java
Normal file
43
assets/src/test/java/bisq/asset/coins/BeamTest.java
Normal file
@ -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 BeamTest extends AbstractAssetTest {
|
||||
|
||||
public BeamTest() {
|
||||
super(new Beam());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testValidAddresses() {
|
||||
assertValidAddress("4a0e54b24d5fdf06891a8eaa57b4b3ac16731e932a64da8ec768083495d624f1");
|
||||
assertValidAddress("c7776e6d3fd3d9cc66f9e61b943e6d99473b16418ee93f3d5f6b70824cdb7f0a9");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testInvalidAddresses() {
|
||||
assertInvalidAddress("");
|
||||
assertInvalidAddress("114a0e54b24d5fdf06891a8eaa57b4b3ac16731e932a64da8ec768083495d624f1");
|
||||
assertInvalidAddress("a0e54b24d5fdf06891a8eaa57b4b3ac16731e932a64da8ec768083495d624f1");
|
||||
assertInvalidAddress("4z0e54b24d5fdf06891a8eaa57b4b3ac16731e932a64da8ec768083495d624f1");
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user