From 85caf029b324381536117c397dbd7835c3b403ef Mon Sep 17 00:00:00 2001 From: Chris Beams Date: Tue, 6 Nov 2018 21:05:27 +0100 Subject: [PATCH 01/16] Add newly listed assets to TradeStatisticsManager#isWarmingUp --- .../statistics/TradeStatisticsManager.java | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/core/src/main/java/bisq/core/trade/statistics/TradeStatisticsManager.java b/core/src/main/java/bisq/core/trade/statistics/TradeStatisticsManager.java index b47cb5dad4..3563e2d3e3 100644 --- a/core/src/main/java/bisq/core/trade/statistics/TradeStatisticsManager.java +++ b/core/src/main/java/bisq/core/trade/statistics/TradeStatisticsManager.java @@ -294,6 +294,29 @@ public class TradeStatisticsManager { // v0.8.0 Aug 22 2018 // none added + // v0.9.0 (Date TBD) + newlyAdded.add("ACM"); + newlyAdded.add("BTC2"); + newlyAdded.add("BLUR"); + newlyAdded.add("CHA"); + newlyAdded.add("CROAT"); + newlyAdded.add("DRGL"); + newlyAdded.add("ETHS"); + newlyAdded.add("GBK"); + newlyAdded.add("KEK"); + newlyAdded.add("LOKI"); + newlyAdded.add("MBGL"); + newlyAdded.add("NEOS"); + newlyAdded.add("PZDC"); + newlyAdded.add("QMCoin"); + newlyAdded.add("QRL"); + newlyAdded.add("RADS"); + newlyAdded.add("RYO"); + newlyAdded.add("SUB1X"); + newlyAdded.add("MAI"); + newlyAdded.add("TRTL"); + newlyAdded.add("ZER"); + return newlyAdded.contains(code); } } From 34a82ba890a72781668eed8ca6297bae68032880 Mon Sep 17 00:00:00 2001 From: Chris Beams Date: Tue, 6 Nov 2018 16:24:22 +0100 Subject: [PATCH 02/16] Deprecate insufficiently traded assets - Remove assets from META-INF/services/bisq.asset.Asset - Preserve asset types but mark as @Deprecated - @Ignore asset tests Preserving the types is important from a compatibility perspective. Users who have traded these assets in the past, however few there may be, need to be able to classload the asset type(s) in order to avoid errors when browsing through their trade portfolio history. --- .idea/codeStyles/Project.xml | 2 ++ assets/src/main/java/bisq/asset/coins/Koto.java | 4 ++++ assets/src/main/java/bisq/asset/coins/Obsidian.java | 4 ++++ assets/src/main/resources/META-INF/services/bisq.asset.Asset | 2 -- assets/src/test/java/bisq/asset/coins/KotoTest.java | 3 +++ assets/src/test/java/bisq/asset/coins/ObsidianTest.java | 3 +++ 6 files changed, 16 insertions(+), 2 deletions(-) diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml index 606121d887..ed3a4e085a 100644 --- a/.idea/codeStyles/Project.xml +++ b/.idea/codeStyles/Project.xml @@ -29,6 +29,8 @@ + + diff --git a/assets/src/main/java/bisq/asset/coins/Koto.java b/assets/src/main/java/bisq/asset/coins/Koto.java index f060c473c9..38ae9ff05d 100644 --- a/assets/src/main/java/bisq/asset/coins/Koto.java +++ b/assets/src/main/java/bisq/asset/coins/Koto.java @@ -26,6 +26,10 @@ import java.security.NoSuchAlgorithmException; import java.util.Arrays; +/** + * @deprecated for insufficent trading + */ +@Deprecated(since = "0.9.0") public class Koto extends Coin { public Koto() { diff --git a/assets/src/main/java/bisq/asset/coins/Obsidian.java b/assets/src/main/java/bisq/asset/coins/Obsidian.java index 0eebb7ce2d..ebef3c701d 100644 --- a/assets/src/main/java/bisq/asset/coins/Obsidian.java +++ b/assets/src/main/java/bisq/asset/coins/Obsidian.java @@ -21,6 +21,10 @@ import bisq.asset.Base58BitcoinAddressValidator; import bisq.asset.Coin; import bisq.asset.NetworkParametersAdapter; +/** + * @deprecated for insufficent trading + */ +@Deprecated(since = "0.9.0") public class Obsidian extends Coin { public Obsidian() { diff --git a/assets/src/main/resources/META-INF/services/bisq.asset.Asset b/assets/src/main/resources/META-INF/services/bisq.asset.Asset index 96349c48e3..6febb717e9 100644 --- a/assets/src/main/resources/META-INF/services/bisq.asset.Asset +++ b/assets/src/main/resources/META-INF/services/bisq.asset.Asset @@ -63,7 +63,6 @@ bisq.asset.coins.InfinityEconomics bisq.asset.coins.Instacash bisq.asset.coins.InternetOfPeople bisq.asset.coins.Kekcoin -bisq.asset.coins.Koto bisq.asset.coins.Kumacoin bisq.asset.coins.LBRY bisq.asset.coins.Lisk @@ -95,7 +94,6 @@ bisq.asset.coins.Nilu bisq.asset.coins.Nimiq bisq.asset.coins.NuBits bisq.asset.coins.Nxt -bisq.asset.coins.Obsidian bisq.asset.coins.Octocoin bisq.asset.coins.Particl bisq.asset.coins.PepeCash diff --git a/assets/src/test/java/bisq/asset/coins/KotoTest.java b/assets/src/test/java/bisq/asset/coins/KotoTest.java index 396adbdb56..305fc6d4c2 100644 --- a/assets/src/test/java/bisq/asset/coins/KotoTest.java +++ b/assets/src/test/java/bisq/asset/coins/KotoTest.java @@ -19,8 +19,11 @@ package bisq.asset.coins; import bisq.asset.AbstractAssetTest; +import org.junit.Ignore; import org.junit.Test; +@Ignore +@Deprecated public class KotoTest extends AbstractAssetTest { public KotoTest() { diff --git a/assets/src/test/java/bisq/asset/coins/ObsidianTest.java b/assets/src/test/java/bisq/asset/coins/ObsidianTest.java index bf7daa8006..8be910b5bd 100644 --- a/assets/src/test/java/bisq/asset/coins/ObsidianTest.java +++ b/assets/src/test/java/bisq/asset/coins/ObsidianTest.java @@ -19,8 +19,11 @@ package bisq.asset.coins; import bisq.asset.AbstractAssetTest; +import org.junit.Ignore; import org.junit.Test; +@Ignore +@Deprecated public class ObsidianTest extends AbstractAssetTest { public ObsidianTest() { From 247f383c2d44cf8890dbd9dfe0306322a2f4b86b Mon Sep 17 00:00:00 2001 From: Chris Beams Date: Tue, 6 Nov 2018 20:42:56 +0100 Subject: [PATCH 03/16] Remove untraded assets --- .../java/bisq/asset/coins/Achievecoin.java | 54 ---- .../main/java/bisq/asset/coins/Angelcoin.java | 56 ---- .../src/main/java/bisq/asset/coins/Arto.java | 28 -- .../main/java/bisq/asset/coins/BitDaric.java | 28 -- .../main/java/bisq/asset/coins/BitZeny.java | 39 --- .../java/bisq/asset/coins/BitcoinGold.java | 54 ---- .../main/java/bisq/asset/coins/Bitcore.java | 28 -- .../main/java/bisq/asset/coins/Burstcoin.java | 28 -- .../main/java/bisq/asset/coins/Cagecoin.java | 55 ---- .../java/bisq/asset/coins/CassubianDetk.java | 28 -- .../main/java/bisq/asset/coins/Conceal.java | 28 -- .../java/bisq/asset/coins/Creativecoin.java | 40 --- .../java/bisq/asset/coins/Cryptonite.java | 92 ------ .../src/main/java/bisq/asset/coins/DSTRA.java | 39 --- .../main/java/bisq/asset/coins/DarkNet.java | 28 -- .../main/java/bisq/asset/coins/Decent.java | 36 --- .../main/java/bisq/asset/coins/DeepOnion.java | 39 --- .../main/java/bisq/asset/coins/Devcoin.java | 28 -- .../main/java/bisq/asset/coins/Diamond.java | 56 ---- .../main/java/bisq/asset/coins/DigiMoney.java | 28 -- .../main/java/bisq/asset/coins/Dinero.java | 28 -- .../java/bisq/asset/coins/DynamicCoin.java | 28 -- .../main/java/bisq/asset/coins/Espers.java | 28 -- .../bisq/asset/coins/InfinityEconomics.java | 29 -- .../main/java/bisq/asset/coins/Instacash.java | 61 ---- .../bisq/asset/coins/InternetOfPeople.java | 57 ---- .../main/java/bisq/asset/coins/Kumacoin.java | 39 --- .../src/main/java/bisq/asset/coins/LBRY.java | 28 -- .../src/main/java/bisq/asset/coins/Lisk.java | 28 -- .../bisq/asset/coins/LitecoinExtreme.java | 27 -- .../main/java/bisq/asset/coins/MFCoin.java | 27 -- .../main/java/bisq/asset/coins/Madbyte.java | 28 -- .../main/java/bisq/asset/coins/Madcoin.java | 28 -- .../java/bisq/asset/coins/MaidSafeCoin.java | 28 -- .../main/java/bisq/asset/coins/Mazacoin.java | 56 ---- .../main/java/bisq/asset/coins/NEETCOIN.java | 39 --- .../main/java/bisq/asset/coins/NavCoin.java | 28 -- .../src/main/java/bisq/asset/coins/Nilu.java | 87 ------ .../main/java/bisq/asset/coins/NuBits.java | 28 -- .../src/main/java/bisq/asset/coins/Nxt.java | 227 --------------- .../main/java/bisq/asset/coins/Octocoin.java | 56 ---- .../main/java/bisq/asset/coins/Particl.java | 56 ---- .../main/java/bisq/asset/coins/PepeCash.java | 28 -- .../src/main/java/bisq/asset/coins/Phore.java | 56 ---- .../main/java/bisq/asset/coins/PostCoin.java | 28 -- .../main/java/bisq/asset/coins/Pranacoin.java | 102 ------- .../main/java/bisq/asset/coins/ReddCoin.java | 28 -- .../src/main/java/bisq/asset/coins/Ringo.java | 39 --- .../main/java/bisq/asset/coins/Roicoin.java | 28 -- .../src/main/java/bisq/asset/coins/STEEM.java | 28 -- .../bisq/asset/coins/SafeFileSystemCoin.java | 28 -- .../src/main/java/bisq/asset/coins/Semux.java | 28 -- .../main/java/bisq/asset/coins/Siacoin.java | 28 -- .../main/java/bisq/asset/coins/Sibcoin.java | 28 -- .../main/java/bisq/asset/coins/SpeedCash.java | 39 --- .../main/java/bisq/asset/coins/Stellite.java | 28 -- .../java/bisq/asset/coins/Strayacoin.java | 56 ---- .../main/java/bisq/asset/coins/Tamadcoin.java | 28 -- .../main/java/bisq/asset/coins/Terracoin.java | 40 --- .../src/main/java/bisq/asset/coins/Ubiq.java | 28 -- .../main/java/bisq/asset/coins/VDinar.java | 28 -- .../main/java/bisq/asset/coins/Wacoin.java | 40 --- .../bisq/asset/coins/WorldMobileCoin.java | 269 ------------------ .../main/java/bisq/asset/coins/Wownero.java | 28 -- .../src/main/java/bisq/asset/coins/Xuez.java | 57 ---- .../main/java/bisq/asset/coins/Yenten.java | 87 ------ .../java/bisq/asset/tokens/BetterBetting.java | 27 -- .../java/bisq/asset/tokens/DaiStablecoin.java | 27 -- .../main/java/bisq/asset/tokens/Ellaism.java | 27 -- .../main/java/bisq/asset/tokens/Exceed.java | 27 -- .../main/java/bisq/asset/tokens/GeoCoin.java | 27 -- .../main/java/bisq/asset/tokens/Grans.java | 27 -- .../java/bisq/asset/tokens/Internext.java | 27 -- .../main/java/bisq/asset/tokens/Movement.java | 27 -- .../java/bisq/asset/tokens/MyceliumToken.java | 27 -- .../java/bisq/asset/tokens/PascalCoin.java | 27 -- .../java/bisq/asset/tokens/PiedPiperCoin.java | 27 -- .../main/java/bisq/asset/tokens/Qwark.java | 27 -- .../main/java/bisq/asset/tokens/RefToken.java | 27 -- .../main/java/bisq/asset/tokens/SosCoin.java | 27 -- .../main/java/bisq/asset/tokens/Verify.java | 27 -- .../java/bisq/asset/tokens/WildToken.java | 27 -- .../META-INF/services/bisq.asset.Asset | 82 ------ .../bisq/asset/coins/AchievecoinTest.java | 43 --- .../java/bisq/asset/coins/AngelcoinTest.java | 44 --- .../test/java/bisq/asset/coins/ArtoTest.java | 42 --- .../java/bisq/asset/coins/BitDaricTest.java | 43 --- .../java/bisq/asset/coins/BitZenyTest.java | 42 --- .../bisq/asset/coins/BitcoinGoldTest.java | 43 --- .../java/bisq/asset/coins/BitcoreTest.java | 44 --- .../java/bisq/asset/coins/BurstcoinTest.java | 27 -- .../java/bisq/asset/coins/CagecoinTest.java | 44 --- .../bisq/asset/coins/CassubianDetkTest.java | 46 --- .../java/bisq/asset/coins/ConcealTest.java | 48 ---- .../bisq/asset/coins/CreativecoinTest.java | 43 --- .../java/bisq/asset/coins/CryptoniteTest.java | 49 ---- .../test/java/bisq/asset/coins/DSTRATest.java | 42 --- .../java/bisq/asset/coins/DarkNetTest.java | 27 -- .../java/bisq/asset/coins/DecentTest.java | 46 --- .../java/bisq/asset/coins/DeepOnionTest.java | 43 --- .../java/bisq/asset/coins/DevcoinTest.java | 43 --- .../java/bisq/asset/coins/DiamondTest.java | 44 --- .../java/bisq/asset/coins/DigiMoneyTest.java | 42 --- .../java/bisq/asset/coins/DineroTest.java | 44 --- .../bisq/asset/coins/DynamicCoinTest.java | 27 -- .../java/bisq/asset/coins/EspersTest.java | 27 -- .../asset/coins/InfinityEconomicsTest.java | 48 ---- .../java/bisq/asset/coins/InstacashTest.java | 46 --- .../asset/coins/InternetOfPeopleTest.java | 40 --- .../java/bisq/asset/coins/KumacoinTest.java | 42 --- .../test/java/bisq/asset/coins/LBRYTest.java | 27 -- .../test/java/bisq/asset/coins/LiskTest.java | 27 -- .../bisq/asset/coins/LitecoinExtremeTest.java | 47 --- .../java/bisq/asset/coins/MFCoinTest.java | 47 --- .../java/bisq/asset/coins/MadbyteTest.java | 43 --- .../java/bisq/asset/coins/MadcoinTest.java | 42 --- .../bisq/asset/coins/MaidSafeCoinTest.java | 27 -- .../java/bisq/asset/coins/MazacoinTest.java | 44 --- .../java/bisq/asset/coins/NEETCOINTest.java | 42 --- .../java/bisq/asset/coins/NavCoinTest.java | 27 -- .../test/java/bisq/asset/coins/NiluTest.java | 30 -- .../java/bisq/asset/coins/NuBitsTest.java | 27 -- .../test/java/bisq/asset/coins/NxtTest.java | 45 --- .../java/bisq/asset/coins/OctocoinTest.java | 43 --- .../java/bisq/asset/coins/ParticlTest.java | 44 --- .../java/bisq/asset/coins/PepeCashTest.java | 27 -- .../test/java/bisq/asset/coins/PhoreTest.java | 47 --- .../java/bisq/asset/coins/PostCoinTest.java | 27 -- .../java/bisq/asset/coins/PranacoinTest.java | 43 --- .../java/bisq/asset/coins/ReddCoinTest.java | 27 -- .../test/java/bisq/asset/coins/RingoTest.java | 42 --- .../java/bisq/asset/coins/RoicoinTest.java | 42 --- .../test/java/bisq/asset/coins/STEEMTest.java | 27 -- .../asset/coins/SafeFileSystemCoinTest.java | 28 -- .../test/java/bisq/asset/coins/SemuxTest.java | 43 --- .../java/bisq/asset/coins/SiacoinTest.java | 27 -- .../java/bisq/asset/coins/SibcoinTest.java | 27 -- .../java/bisq/asset/coins/SpeedCashTest.java | 44 --- .../java/bisq/asset/coins/StelliteTest.java | 42 --- .../java/bisq/asset/coins/StrayacoinTest.java | 44 --- .../java/bisq/asset/coins/TamadcoinTest.java | 42 --- .../java/bisq/asset/coins/TerracoinTest.java | 47 --- .../test/java/bisq/asset/coins/UbiqTest.java | 42 --- .../java/bisq/asset/coins/VDinarTest.java | 47 --- .../java/bisq/asset/coins/WacoinTest.java | 44 --- .../bisq/asset/coins/WorldMobileCoinTest.java | 47 --- .../java/bisq/asset/coins/WowneroTest.java | 43 --- .../test/java/bisq/asset/coins/XuezTest.java | 43 --- .../java/bisq/asset/coins/YentenTest.java | 45 --- .../bisq/asset/tokens/BetterBettingTest.java | 42 --- .../bisq/asset/tokens/DaiStablecoinTest.java | 42 --- .../java/bisq/asset/tokens/EllaismTest.java | 42 --- .../java/bisq/asset/tokens/ExceedTest.java | 42 --- .../java/bisq/asset/tokens/GeoCoinTest.java | 42 --- .../java/bisq/asset/tokens/GransTest.java | 42 --- .../java/bisq/asset/tokens/InternextTest.java | 42 --- .../java/bisq/asset/tokens/MovementTest.java | 42 --- .../bisq/asset/tokens/MyceliumTokenTest.java | 42 --- .../bisq/asset/tokens/PascalCoinTest.java | 42 --- .../bisq/asset/tokens/PiedPiperCoinTest.java | 42 --- .../java/bisq/asset/tokens/QwarkTest.java | 42 --- .../java/bisq/asset/tokens/RefTokenTest.java | 42 --- .../java/bisq/asset/tokens/SosCoinTest.java | 42 --- .../java/bisq/asset/tokens/VerifyTest.java | 42 --- .../java/bisq/asset/tokens/WildTokenTest.java | 42 --- 165 files changed, 6834 deletions(-) delete mode 100644 assets/src/main/java/bisq/asset/coins/Achievecoin.java delete mode 100644 assets/src/main/java/bisq/asset/coins/Angelcoin.java delete mode 100644 assets/src/main/java/bisq/asset/coins/Arto.java delete mode 100644 assets/src/main/java/bisq/asset/coins/BitDaric.java delete mode 100644 assets/src/main/java/bisq/asset/coins/BitZeny.java delete mode 100644 assets/src/main/java/bisq/asset/coins/BitcoinGold.java delete mode 100644 assets/src/main/java/bisq/asset/coins/Bitcore.java delete mode 100644 assets/src/main/java/bisq/asset/coins/Burstcoin.java delete mode 100644 assets/src/main/java/bisq/asset/coins/Cagecoin.java delete mode 100644 assets/src/main/java/bisq/asset/coins/CassubianDetk.java delete mode 100644 assets/src/main/java/bisq/asset/coins/Conceal.java delete mode 100644 assets/src/main/java/bisq/asset/coins/Creativecoin.java delete mode 100644 assets/src/main/java/bisq/asset/coins/Cryptonite.java delete mode 100644 assets/src/main/java/bisq/asset/coins/DSTRA.java delete mode 100644 assets/src/main/java/bisq/asset/coins/DarkNet.java delete mode 100644 assets/src/main/java/bisq/asset/coins/Decent.java delete mode 100644 assets/src/main/java/bisq/asset/coins/DeepOnion.java delete mode 100644 assets/src/main/java/bisq/asset/coins/Devcoin.java delete mode 100644 assets/src/main/java/bisq/asset/coins/Diamond.java delete mode 100644 assets/src/main/java/bisq/asset/coins/DigiMoney.java delete mode 100644 assets/src/main/java/bisq/asset/coins/Dinero.java delete mode 100644 assets/src/main/java/bisq/asset/coins/DynamicCoin.java delete mode 100644 assets/src/main/java/bisq/asset/coins/Espers.java delete mode 100644 assets/src/main/java/bisq/asset/coins/InfinityEconomics.java delete mode 100644 assets/src/main/java/bisq/asset/coins/Instacash.java delete mode 100644 assets/src/main/java/bisq/asset/coins/InternetOfPeople.java delete mode 100644 assets/src/main/java/bisq/asset/coins/Kumacoin.java delete mode 100644 assets/src/main/java/bisq/asset/coins/LBRY.java delete mode 100644 assets/src/main/java/bisq/asset/coins/Lisk.java delete mode 100644 assets/src/main/java/bisq/asset/coins/LitecoinExtreme.java delete mode 100644 assets/src/main/java/bisq/asset/coins/MFCoin.java delete mode 100644 assets/src/main/java/bisq/asset/coins/Madbyte.java delete mode 100644 assets/src/main/java/bisq/asset/coins/Madcoin.java delete mode 100644 assets/src/main/java/bisq/asset/coins/MaidSafeCoin.java delete mode 100644 assets/src/main/java/bisq/asset/coins/Mazacoin.java delete mode 100644 assets/src/main/java/bisq/asset/coins/NEETCOIN.java delete mode 100644 assets/src/main/java/bisq/asset/coins/NavCoin.java delete mode 100644 assets/src/main/java/bisq/asset/coins/Nilu.java delete mode 100644 assets/src/main/java/bisq/asset/coins/NuBits.java delete mode 100644 assets/src/main/java/bisq/asset/coins/Nxt.java delete mode 100644 assets/src/main/java/bisq/asset/coins/Octocoin.java delete mode 100644 assets/src/main/java/bisq/asset/coins/Particl.java delete mode 100644 assets/src/main/java/bisq/asset/coins/PepeCash.java delete mode 100644 assets/src/main/java/bisq/asset/coins/Phore.java delete mode 100644 assets/src/main/java/bisq/asset/coins/PostCoin.java delete mode 100644 assets/src/main/java/bisq/asset/coins/Pranacoin.java delete mode 100644 assets/src/main/java/bisq/asset/coins/ReddCoin.java delete mode 100644 assets/src/main/java/bisq/asset/coins/Ringo.java delete mode 100644 assets/src/main/java/bisq/asset/coins/Roicoin.java delete mode 100644 assets/src/main/java/bisq/asset/coins/STEEM.java delete mode 100644 assets/src/main/java/bisq/asset/coins/SafeFileSystemCoin.java delete mode 100644 assets/src/main/java/bisq/asset/coins/Semux.java delete mode 100644 assets/src/main/java/bisq/asset/coins/Siacoin.java delete mode 100644 assets/src/main/java/bisq/asset/coins/Sibcoin.java delete mode 100644 assets/src/main/java/bisq/asset/coins/SpeedCash.java delete mode 100644 assets/src/main/java/bisq/asset/coins/Stellite.java delete mode 100644 assets/src/main/java/bisq/asset/coins/Strayacoin.java delete mode 100644 assets/src/main/java/bisq/asset/coins/Tamadcoin.java delete mode 100644 assets/src/main/java/bisq/asset/coins/Terracoin.java delete mode 100644 assets/src/main/java/bisq/asset/coins/Ubiq.java delete mode 100644 assets/src/main/java/bisq/asset/coins/VDinar.java delete mode 100644 assets/src/main/java/bisq/asset/coins/Wacoin.java delete mode 100644 assets/src/main/java/bisq/asset/coins/WorldMobileCoin.java delete mode 100644 assets/src/main/java/bisq/asset/coins/Wownero.java delete mode 100644 assets/src/main/java/bisq/asset/coins/Xuez.java delete mode 100644 assets/src/main/java/bisq/asset/coins/Yenten.java delete mode 100644 assets/src/main/java/bisq/asset/tokens/BetterBetting.java delete mode 100644 assets/src/main/java/bisq/asset/tokens/DaiStablecoin.java delete mode 100644 assets/src/main/java/bisq/asset/tokens/Ellaism.java delete mode 100644 assets/src/main/java/bisq/asset/tokens/Exceed.java delete mode 100644 assets/src/main/java/bisq/asset/tokens/GeoCoin.java delete mode 100644 assets/src/main/java/bisq/asset/tokens/Grans.java delete mode 100644 assets/src/main/java/bisq/asset/tokens/Internext.java delete mode 100644 assets/src/main/java/bisq/asset/tokens/Movement.java delete mode 100644 assets/src/main/java/bisq/asset/tokens/MyceliumToken.java delete mode 100644 assets/src/main/java/bisq/asset/tokens/PascalCoin.java delete mode 100644 assets/src/main/java/bisq/asset/tokens/PiedPiperCoin.java delete mode 100644 assets/src/main/java/bisq/asset/tokens/Qwark.java delete mode 100644 assets/src/main/java/bisq/asset/tokens/RefToken.java delete mode 100644 assets/src/main/java/bisq/asset/tokens/SosCoin.java delete mode 100644 assets/src/main/java/bisq/asset/tokens/Verify.java delete mode 100644 assets/src/main/java/bisq/asset/tokens/WildToken.java delete mode 100644 assets/src/test/java/bisq/asset/coins/AchievecoinTest.java delete mode 100644 assets/src/test/java/bisq/asset/coins/AngelcoinTest.java delete mode 100644 assets/src/test/java/bisq/asset/coins/ArtoTest.java delete mode 100644 assets/src/test/java/bisq/asset/coins/BitDaricTest.java delete mode 100644 assets/src/test/java/bisq/asset/coins/BitZenyTest.java delete mode 100644 assets/src/test/java/bisq/asset/coins/BitcoinGoldTest.java delete mode 100644 assets/src/test/java/bisq/asset/coins/BitcoreTest.java delete mode 100644 assets/src/test/java/bisq/asset/coins/BurstcoinTest.java delete mode 100644 assets/src/test/java/bisq/asset/coins/CagecoinTest.java delete mode 100644 assets/src/test/java/bisq/asset/coins/CassubianDetkTest.java delete mode 100644 assets/src/test/java/bisq/asset/coins/ConcealTest.java delete mode 100644 assets/src/test/java/bisq/asset/coins/CreativecoinTest.java delete mode 100644 assets/src/test/java/bisq/asset/coins/CryptoniteTest.java delete mode 100644 assets/src/test/java/bisq/asset/coins/DSTRATest.java delete mode 100644 assets/src/test/java/bisq/asset/coins/DarkNetTest.java delete mode 100644 assets/src/test/java/bisq/asset/coins/DecentTest.java delete mode 100644 assets/src/test/java/bisq/asset/coins/DeepOnionTest.java delete mode 100644 assets/src/test/java/bisq/asset/coins/DevcoinTest.java delete mode 100644 assets/src/test/java/bisq/asset/coins/DiamondTest.java delete mode 100644 assets/src/test/java/bisq/asset/coins/DigiMoneyTest.java delete mode 100644 assets/src/test/java/bisq/asset/coins/DineroTest.java delete mode 100644 assets/src/test/java/bisq/asset/coins/DynamicCoinTest.java delete mode 100644 assets/src/test/java/bisq/asset/coins/EspersTest.java delete mode 100644 assets/src/test/java/bisq/asset/coins/InfinityEconomicsTest.java delete mode 100644 assets/src/test/java/bisq/asset/coins/InstacashTest.java delete mode 100644 assets/src/test/java/bisq/asset/coins/InternetOfPeopleTest.java delete mode 100644 assets/src/test/java/bisq/asset/coins/KumacoinTest.java delete mode 100644 assets/src/test/java/bisq/asset/coins/LBRYTest.java delete mode 100644 assets/src/test/java/bisq/asset/coins/LiskTest.java delete mode 100644 assets/src/test/java/bisq/asset/coins/LitecoinExtremeTest.java delete mode 100644 assets/src/test/java/bisq/asset/coins/MFCoinTest.java delete mode 100644 assets/src/test/java/bisq/asset/coins/MadbyteTest.java delete mode 100644 assets/src/test/java/bisq/asset/coins/MadcoinTest.java delete mode 100644 assets/src/test/java/bisq/asset/coins/MaidSafeCoinTest.java delete mode 100644 assets/src/test/java/bisq/asset/coins/MazacoinTest.java delete mode 100644 assets/src/test/java/bisq/asset/coins/NEETCOINTest.java delete mode 100644 assets/src/test/java/bisq/asset/coins/NavCoinTest.java delete mode 100644 assets/src/test/java/bisq/asset/coins/NiluTest.java delete mode 100644 assets/src/test/java/bisq/asset/coins/NuBitsTest.java delete mode 100644 assets/src/test/java/bisq/asset/coins/NxtTest.java delete mode 100644 assets/src/test/java/bisq/asset/coins/OctocoinTest.java delete mode 100644 assets/src/test/java/bisq/asset/coins/ParticlTest.java delete mode 100644 assets/src/test/java/bisq/asset/coins/PepeCashTest.java delete mode 100644 assets/src/test/java/bisq/asset/coins/PhoreTest.java delete mode 100644 assets/src/test/java/bisq/asset/coins/PostCoinTest.java delete mode 100644 assets/src/test/java/bisq/asset/coins/PranacoinTest.java delete mode 100644 assets/src/test/java/bisq/asset/coins/ReddCoinTest.java delete mode 100644 assets/src/test/java/bisq/asset/coins/RingoTest.java delete mode 100644 assets/src/test/java/bisq/asset/coins/RoicoinTest.java delete mode 100644 assets/src/test/java/bisq/asset/coins/STEEMTest.java delete mode 100644 assets/src/test/java/bisq/asset/coins/SafeFileSystemCoinTest.java delete mode 100644 assets/src/test/java/bisq/asset/coins/SemuxTest.java delete mode 100644 assets/src/test/java/bisq/asset/coins/SiacoinTest.java delete mode 100644 assets/src/test/java/bisq/asset/coins/SibcoinTest.java delete mode 100644 assets/src/test/java/bisq/asset/coins/SpeedCashTest.java delete mode 100644 assets/src/test/java/bisq/asset/coins/StelliteTest.java delete mode 100644 assets/src/test/java/bisq/asset/coins/StrayacoinTest.java delete mode 100644 assets/src/test/java/bisq/asset/coins/TamadcoinTest.java delete mode 100644 assets/src/test/java/bisq/asset/coins/TerracoinTest.java delete mode 100644 assets/src/test/java/bisq/asset/coins/UbiqTest.java delete mode 100644 assets/src/test/java/bisq/asset/coins/VDinarTest.java delete mode 100644 assets/src/test/java/bisq/asset/coins/WacoinTest.java delete mode 100644 assets/src/test/java/bisq/asset/coins/WorldMobileCoinTest.java delete mode 100644 assets/src/test/java/bisq/asset/coins/WowneroTest.java delete mode 100644 assets/src/test/java/bisq/asset/coins/XuezTest.java delete mode 100644 assets/src/test/java/bisq/asset/coins/YentenTest.java delete mode 100644 assets/src/test/java/bisq/asset/tokens/BetterBettingTest.java delete mode 100644 assets/src/test/java/bisq/asset/tokens/DaiStablecoinTest.java delete mode 100644 assets/src/test/java/bisq/asset/tokens/EllaismTest.java delete mode 100644 assets/src/test/java/bisq/asset/tokens/ExceedTest.java delete mode 100644 assets/src/test/java/bisq/asset/tokens/GeoCoinTest.java delete mode 100644 assets/src/test/java/bisq/asset/tokens/GransTest.java delete mode 100644 assets/src/test/java/bisq/asset/tokens/InternextTest.java delete mode 100644 assets/src/test/java/bisq/asset/tokens/MovementTest.java delete mode 100644 assets/src/test/java/bisq/asset/tokens/MyceliumTokenTest.java delete mode 100644 assets/src/test/java/bisq/asset/tokens/PascalCoinTest.java delete mode 100644 assets/src/test/java/bisq/asset/tokens/PiedPiperCoinTest.java delete mode 100644 assets/src/test/java/bisq/asset/tokens/QwarkTest.java delete mode 100644 assets/src/test/java/bisq/asset/tokens/RefTokenTest.java delete mode 100644 assets/src/test/java/bisq/asset/tokens/SosCoinTest.java delete mode 100644 assets/src/test/java/bisq/asset/tokens/VerifyTest.java delete mode 100644 assets/src/test/java/bisq/asset/tokens/WildTokenTest.java diff --git a/assets/src/main/java/bisq/asset/coins/Achievecoin.java b/assets/src/main/java/bisq/asset/coins/Achievecoin.java deleted file mode 100644 index 726d0bdc12..0000000000 --- a/assets/src/main/java/bisq/asset/coins/Achievecoin.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.Base58BitcoinAddressValidator; -import bisq.asset.Coin; -import bisq.asset.NetworkParametersAdapter; - -import org.bitcoinj.core.Utils; - -public class Achievecoin extends Coin { - - public Achievecoin() { - super("AchieveCoin", "ACH", new Base58BitcoinAddressValidator(new AchievecoinParams())); - } - - - public static class AchievecoinParams extends NetworkParametersAdapter { - - public AchievecoinParams() { - interval = INTERVAL; - targetTimespan = TARGET_TIMESPAN; - maxTarget = Utils.decodeCompactBits(0x1d00ffffL); - dumpedPrivateKeyHeader = 128; - - // Address format is different to BTC, rest is the same - addressHeader = 23; //BTG 38; - p2shHeader = 34; //BTG 23; - - acceptableAddressCodes = new int[]{addressHeader, p2shHeader}; - port = 7337; //BTC and BTG 8333 - packetMagic = 0x1461de3cL; //BTG 0xe1476d44L, BTC 0xf9beb4d9L; - bip32HeaderPub = 0x02651F71; //BTG and BTC 0x0488B21E; //The 4 byte header that serializes in base58 to "xpub". - bip32HeaderPriv = 0x02355E56; //BTG and BTC 0x0488ADE4; //The 4 byte header that serializes in base58 to "xprv" - - id = ID_MAINNET; - } - } -} diff --git a/assets/src/main/java/bisq/asset/coins/Angelcoin.java b/assets/src/main/java/bisq/asset/coins/Angelcoin.java deleted file mode 100644 index e52ec9675f..0000000000 --- a/assets/src/main/java/bisq/asset/coins/Angelcoin.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.AddressValidationResult; -import bisq.asset.Base58BitcoinAddressValidator; -import bisq.asset.Coin; -import bisq.asset.NetworkParametersAdapter; - -public class Angelcoin extends Coin { - - public Angelcoin() { - super("Angelcoin", "ALC", new AngelcoinAddressValidator()); - } - - - public static class AngelcoinAddressValidator extends Base58BitcoinAddressValidator { - - public AngelcoinAddressValidator() { - super(new AngelcoinParams()); - } - - @Override - public AddressValidationResult validate(String address) { - if (!address.matches("^[A][a-km-zA-HJ-NP-Z1-9]{25,34}$")) - return AddressValidationResult.invalidStructure(); - - return super.validate(address); - } - } - - - public static class AngelcoinParams extends NetworkParametersAdapter { - - public AngelcoinParams() { - addressHeader = 23; - p2shHeader = 5; - acceptableAddressCodes = new int[]{addressHeader, p2shHeader}; - } - } -} diff --git a/assets/src/main/java/bisq/asset/coins/Arto.java b/assets/src/main/java/bisq/asset/coins/Arto.java deleted file mode 100644 index 9e4b75e882..0000000000 --- a/assets/src/main/java/bisq/asset/coins/Arto.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.Coin; -import bisq.asset.RegexAddressValidator; - -public class Arto extends Coin { - - public Arto() { - super("Arto", "RTO", new RegexAddressValidator("^[A][0-9A-Za-z]{94}$")); - } -} diff --git a/assets/src/main/java/bisq/asset/coins/BitDaric.java b/assets/src/main/java/bisq/asset/coins/BitDaric.java deleted file mode 100644 index a035d38181..0000000000 --- a/assets/src/main/java/bisq/asset/coins/BitDaric.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.Coin; -import bisq.asset.RegexAddressValidator; - -public class BitDaric extends Coin { - - public BitDaric() { - super("BitDaric", "DARX", new RegexAddressValidator("^[R][a-km-zA-HJ-NP-Z1-9]{25,34}$")); - } -} diff --git a/assets/src/main/java/bisq/asset/coins/BitZeny.java b/assets/src/main/java/bisq/asset/coins/BitZeny.java deleted file mode 100644 index 0edaf59e02..0000000000 --- a/assets/src/main/java/bisq/asset/coins/BitZeny.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.Base58BitcoinAddressValidator; -import bisq.asset.Coin; -import bisq.asset.NetworkParametersAdapter; - -public class BitZeny extends Coin { - - public BitZeny() { - super("BitZeny", "ZNY", new Base58BitcoinAddressValidator(new BitZenyParams())); - } - - - public static class BitZenyParams extends NetworkParametersAdapter { - - public BitZenyParams() { - addressHeader = 81; - p2shHeader = 5; - acceptableAddressCodes = new int[]{addressHeader, p2shHeader}; - } - } -} diff --git a/assets/src/main/java/bisq/asset/coins/BitcoinGold.java b/assets/src/main/java/bisq/asset/coins/BitcoinGold.java deleted file mode 100644 index 95ad77060f..0000000000 --- a/assets/src/main/java/bisq/asset/coins/BitcoinGold.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.Base58BitcoinAddressValidator; -import bisq.asset.Coin; -import bisq.asset.NetworkParametersAdapter; - -import org.bitcoinj.core.Utils; - -public class BitcoinGold extends Coin { - - public BitcoinGold() { - super("Bitcoin Gold", "BTG", new Base58BitcoinAddressValidator(new BitcoinGoldParams())); - } - - - private static class BitcoinGoldParams extends NetworkParametersAdapter { - - public BitcoinGoldParams() { - interval = INTERVAL; - targetTimespan = TARGET_TIMESPAN; - maxTarget = Utils.decodeCompactBits(0x1d00ffffL); - dumpedPrivateKeyHeader = 128; - - // Address format is different to BTC, rest is the same - addressHeader = 38; - p2shHeader = 23; - - acceptableAddressCodes = new int[]{addressHeader, p2shHeader}; - port = 8333; - packetMagic = 0xf9beb4d9L; - bip32HeaderPub = 0x0488B21E; //The 4 byte header that serializes in base58 to "xpub". - bip32HeaderPriv = 0x0488ADE4; //The 4 byte header that serializes in base58 to "xprv" - - id = ID_MAINNET; - } - } -} diff --git a/assets/src/main/java/bisq/asset/coins/Bitcore.java b/assets/src/main/java/bisq/asset/coins/Bitcore.java deleted file mode 100644 index 6a3f19c13b..0000000000 --- a/assets/src/main/java/bisq/asset/coins/Bitcore.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.Base58BitcoinAddressValidator; -import bisq.asset.Coin; - -public class Bitcore extends Coin { - - public Bitcore() { - super("Bitcore", "BTX", new Base58BitcoinAddressValidator()); - } -} diff --git a/assets/src/main/java/bisq/asset/coins/Burstcoin.java b/assets/src/main/java/bisq/asset/coins/Burstcoin.java deleted file mode 100644 index f3f4bc746a..0000000000 --- a/assets/src/main/java/bisq/asset/coins/Burstcoin.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.Coin; -import bisq.asset.DefaultAddressValidator; - -public class Burstcoin extends Coin { - - public Burstcoin() { - super("Burstcoin", "BURST", new DefaultAddressValidator()); - } -} diff --git a/assets/src/main/java/bisq/asset/coins/Cagecoin.java b/assets/src/main/java/bisq/asset/coins/Cagecoin.java deleted file mode 100644 index 2511ce6291..0000000000 --- a/assets/src/main/java/bisq/asset/coins/Cagecoin.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.AddressValidationResult; -import bisq.asset.Base58BitcoinAddressValidator; -import bisq.asset.Coin; -import bisq.asset.NetworkParametersAdapter; - -public class Cagecoin extends Coin { - - public Cagecoin() { - super("Cagecoin", "CAGE", new CagecoinAddressValidator()); - } - - - public static class CagecoinAddressValidator extends Base58BitcoinAddressValidator { - - public CagecoinAddressValidator() { - super(new CagecoinParams()); - } - - @Override - public AddressValidationResult validate(String address) { - if (!address.matches("^[D][a-zA-Z0-9]{26,34}$")) - return AddressValidationResult.invalidStructure(); - return super.validate(address); - } - } - - - public static class CagecoinParams extends NetworkParametersAdapter { - - public CagecoinParams() { - addressHeader = 31; - p2shHeader = 13; - acceptableAddressCodes = new int[]{addressHeader, p2shHeader}; - } - } -} diff --git a/assets/src/main/java/bisq/asset/coins/CassubianDetk.java b/assets/src/main/java/bisq/asset/coins/CassubianDetk.java deleted file mode 100644 index 786e66e01d..0000000000 --- a/assets/src/main/java/bisq/asset/coins/CassubianDetk.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.Coin; -import bisq.asset.RegexAddressValidator; - -public class CassubianDetk extends Coin { - - public CassubianDetk() { - super("Cassubian Detk", "CDT", new RegexAddressValidator("^D.*")); - } -} diff --git a/assets/src/main/java/bisq/asset/coins/Conceal.java b/assets/src/main/java/bisq/asset/coins/Conceal.java deleted file mode 100644 index 96ee349c72..0000000000 --- a/assets/src/main/java/bisq/asset/coins/Conceal.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.Coin; -import bisq.asset.RegexAddressValidator; - -public class Conceal extends Coin { - - public Conceal() { - super("Conceal", "CCX", new RegexAddressValidator("^ccx7[1-9A-HJ-NP-Za-km-z]{94}$")); - } -} diff --git a/assets/src/main/java/bisq/asset/coins/Creativecoin.java b/assets/src/main/java/bisq/asset/coins/Creativecoin.java deleted file mode 100644 index aebe324b88..0000000000 --- a/assets/src/main/java/bisq/asset/coins/Creativecoin.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.Base58BitcoinAddressValidator; -import bisq.asset.Coin; -import bisq.asset.NetworkParametersAdapter; - -public class Creativecoin extends Coin { - - public Creativecoin() { - super("Creativecoin", "CREA", new Base58BitcoinAddressValidator(new CreativecoinParams())); - } - - - public static class CreativecoinParams extends NetworkParametersAdapter { - - public CreativecoinParams() { - int segwitHeader = 35; - addressHeader = 28; - p2shHeader = 5; - acceptableAddressCodes = new int[]{addressHeader, p2shHeader, segwitHeader}; - } - } -} diff --git a/assets/src/main/java/bisq/asset/coins/Cryptonite.java b/assets/src/main/java/bisq/asset/coins/Cryptonite.java deleted file mode 100644 index 33560f1be7..0000000000 --- a/assets/src/main/java/bisq/asset/coins/Cryptonite.java +++ /dev/null @@ -1,92 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.AddressValidationResult; -import bisq.asset.AddressValidator; -import bisq.asset.Coin; - -import java.security.MessageDigest; -import java.security.NoSuchAlgorithmException; - -import java.util.Arrays; - -public class Cryptonite extends Coin { - - public Cryptonite() { - super("Cryptonite", "XCN", new CryptoniteAddressValidator()); - } - - - public static class CryptoniteAddressValidator implements AddressValidator { - - private final static String ALPHABET = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"; - - @Override - public AddressValidationResult validate(String address) { - // https://bitcointalk.org/index.php?topic=1801595 - if (address.length() != 34) - return AddressValidationResult.invalidAddress("XCN_Addr_Invalid: Length must be 34!"); - - if (!address.startsWith("C")) - return AddressValidationResult.invalidAddress("XCN_Addr_Invalid: must start with 'C'!"); - - byte[] decoded = decodeBase58(address); - if (decoded == null) - return AddressValidationResult.invalidAddress("XCN_Addr_Invalid: Base58 decoder error!"); - - byte[] hash = getSha256(decoded, 21, 2); - if (hash == null || !Arrays.equals(Arrays.copyOfRange(hash, 0, 4), Arrays.copyOfRange(decoded, 21, 25))) - return AddressValidationResult.invalidAddress("XCN_Addr_Invalid: Checksum error!"); - - return AddressValidationResult.validAddress(); - } - - private static byte[] decodeBase58(String input) { - byte[] output = new byte[25]; - for (int i = 0; i < input.length(); i++) { - char t = input.charAt(i); - - int p = ALPHABET.indexOf(t); - if (p == -1) - return null; - for (int j = 25 - 1; j >= 0; j--, p /= 256) { - p += 58 * (output[j] & 0xFF); - output[j] = (byte) (p % 256); - } - if (p != 0) - return null; - } - - return output; - } - - private static byte[] getSha256(byte[] data, int len, int recursion) { - if (recursion == 0) - return data; - - try { - MessageDigest md = MessageDigest.getInstance("SHA-256"); - md.update(Arrays.copyOfRange(data, 0, len)); - return getSha256(md.digest(), 32, recursion - 1); - } catch (NoSuchAlgorithmException e) { - return null; - } - } - } -} diff --git a/assets/src/main/java/bisq/asset/coins/DSTRA.java b/assets/src/main/java/bisq/asset/coins/DSTRA.java deleted file mode 100644 index 334199d009..0000000000 --- a/assets/src/main/java/bisq/asset/coins/DSTRA.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.Base58BitcoinAddressValidator; -import bisq.asset.Coin; -import bisq.asset.NetworkParametersAdapter; - -public class DSTRA extends Coin { - - public DSTRA() { - super("DSTRA", "DST", new Base58BitcoinAddressValidator(new DSTRAParams())); - } - - - public static class DSTRAParams extends NetworkParametersAdapter { - - public DSTRAParams() { - addressHeader = 35; - p2shHeader = 95; - acceptableAddressCodes = new int[]{addressHeader, p2shHeader}; - } - } -} diff --git a/assets/src/main/java/bisq/asset/coins/DarkNet.java b/assets/src/main/java/bisq/asset/coins/DarkNet.java deleted file mode 100644 index 807e9f49b4..0000000000 --- a/assets/src/main/java/bisq/asset/coins/DarkNet.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.Coin; -import bisq.asset.DefaultAddressValidator; - -public class DarkNet extends Coin { - - public DarkNet() { - super("DarkNet", "DNET", new DefaultAddressValidator()); - } -} diff --git a/assets/src/main/java/bisq/asset/coins/Decent.java b/assets/src/main/java/bisq/asset/coins/Decent.java deleted file mode 100644 index 95f70fe232..0000000000 --- a/assets/src/main/java/bisq/asset/coins/Decent.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.Coin; -import bisq.asset.RegexAddressValidator; - -public class Decent extends Coin { - - public Decent() { - super("Decent", "DCT", new DecentAddressValidator()); - } - - - public static class DecentAddressValidator extends RegexAddressValidator { - - public DecentAddressValidator() { - super("^(?=.{5,63}$)([a-z][a-z0-9-]+[a-z0-9])(\\.[a-z][a-z0-9-]+[a-z0-9])*$"); - } - } -} diff --git a/assets/src/main/java/bisq/asset/coins/DeepOnion.java b/assets/src/main/java/bisq/asset/coins/DeepOnion.java deleted file mode 100644 index f811b3a3f4..0000000000 --- a/assets/src/main/java/bisq/asset/coins/DeepOnion.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.Base58BitcoinAddressValidator; -import bisq.asset.Coin; -import bisq.asset.NetworkParametersAdapter; - -public class DeepOnion extends Coin { - - public DeepOnion() { - super("DeepOnion", "ONION", new Base58BitcoinAddressValidator(new DeepOnionParams())); - } - - - public static class DeepOnionParams extends NetworkParametersAdapter { - - public DeepOnionParams() { - addressHeader = 31; - p2shHeader = 78; - acceptableAddressCodes = new int[]{addressHeader, p2shHeader}; - } - } -} diff --git a/assets/src/main/java/bisq/asset/coins/Devcoin.java b/assets/src/main/java/bisq/asset/coins/Devcoin.java deleted file mode 100644 index 6698ad4092..0000000000 --- a/assets/src/main/java/bisq/asset/coins/Devcoin.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.Base58BitcoinAddressValidator; -import bisq.asset.Coin; - -public class Devcoin extends Coin { - - public Devcoin() { - super("Devcoin", "DVC", new Base58BitcoinAddressValidator()); - } -} diff --git a/assets/src/main/java/bisq/asset/coins/Diamond.java b/assets/src/main/java/bisq/asset/coins/Diamond.java deleted file mode 100644 index a46911d22c..0000000000 --- a/assets/src/main/java/bisq/asset/coins/Diamond.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.AddressValidationResult; -import bisq.asset.Base58BitcoinAddressValidator; -import bisq.asset.Coin; -import bisq.asset.NetworkParametersAdapter; - -public class Diamond extends Coin { - - public Diamond() { - super("Diamond", "DMD", new DiamondAddressValidator()); - } - - - public static class DiamondAddressValidator extends Base58BitcoinAddressValidator { - - public DiamondAddressValidator() { - super(new DiamondParams()); - } - - @Override - public AddressValidationResult validate(String address) { - if (!address.matches("^[d][a-km-zA-HJ-NP-Z1-9]{25,34}$")) - return AddressValidationResult.invalidStructure(); - - return super.validate(address); - } - } - - - public static class DiamondParams extends NetworkParametersAdapter { - - public DiamondParams() { - addressHeader = 90; - p2shHeader = 8; - acceptableAddressCodes = new int[]{addressHeader, p2shHeader}; - } - } -} diff --git a/assets/src/main/java/bisq/asset/coins/DigiMoney.java b/assets/src/main/java/bisq/asset/coins/DigiMoney.java deleted file mode 100644 index 37957435d3..0000000000 --- a/assets/src/main/java/bisq/asset/coins/DigiMoney.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.Coin; -import bisq.asset.RegexAddressValidator; - -public class DigiMoney extends Coin { - - public DigiMoney() { - super("DigiMoney", "DGM", new RegexAddressValidator("^[D-E][a-zA-Z0-9]{33}$")); - } -} diff --git a/assets/src/main/java/bisq/asset/coins/Dinero.java b/assets/src/main/java/bisq/asset/coins/Dinero.java deleted file mode 100644 index c043ef114a..0000000000 --- a/assets/src/main/java/bisq/asset/coins/Dinero.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.Coin; -import bisq.asset.RegexAddressValidator; - -public class Dinero extends Coin { - - public Dinero() { - super("Dinero", "DIN", new RegexAddressValidator("^[D][0-9a-zA-Z]{33}$")); - } -} diff --git a/assets/src/main/java/bisq/asset/coins/DynamicCoin.java b/assets/src/main/java/bisq/asset/coins/DynamicCoin.java deleted file mode 100644 index 221c720bbc..0000000000 --- a/assets/src/main/java/bisq/asset/coins/DynamicCoin.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.Coin; -import bisq.asset.DefaultAddressValidator; - -public class DynamicCoin extends Coin { - - public DynamicCoin() { - super("DynamicCoin", "DMC", new DefaultAddressValidator()); - } -} diff --git a/assets/src/main/java/bisq/asset/coins/Espers.java b/assets/src/main/java/bisq/asset/coins/Espers.java deleted file mode 100644 index be981560a2..0000000000 --- a/assets/src/main/java/bisq/asset/coins/Espers.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.Coin; -import bisq.asset.DefaultAddressValidator; - -public class Espers extends Coin { - - public Espers() { - super("Espers", "ESP", new DefaultAddressValidator()); - } -} diff --git a/assets/src/main/java/bisq/asset/coins/InfinityEconomics.java b/assets/src/main/java/bisq/asset/coins/InfinityEconomics.java deleted file mode 100644 index b58a0e6a13..0000000000 --- a/assets/src/main/java/bisq/asset/coins/InfinityEconomics.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.Coin; -import bisq.asset.RegexAddressValidator; - -public class InfinityEconomics extends Coin { - - public InfinityEconomics() { - super("Infinity Economics", "XIN", - new RegexAddressValidator("^XIN-[A-Z0-9]{4}-[A-Z0-9]{4}-[A-Z0-9]{4}-[A-Z0-9]{5}$")); - } -} diff --git a/assets/src/main/java/bisq/asset/coins/Instacash.java b/assets/src/main/java/bisq/asset/coins/Instacash.java deleted file mode 100644 index 3b11eaa229..0000000000 --- a/assets/src/main/java/bisq/asset/coins/Instacash.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.AddressValidationResult; -import bisq.asset.AddressValidator; -import bisq.asset.Coin; -import bisq.asset.NetworkParametersAdapter; - -import org.bitcoinj.core.Address; -import org.bitcoinj.core.AddressFormatException; - -public class Instacash extends Coin { - - public Instacash() { - super("Instacash", "ICH", new InstacashAddressValidator()); - } - - - public static class InstacashAddressValidator implements AddressValidator { - - @Override - public AddressValidationResult validate(String address) { - if (!address.matches("^[A][a-km-zA-HJ-NP-Z1-9]{25,34}$")) - return AddressValidationResult.invalidStructure(); - - try { - Address.fromBase58(new InstacashParams(), address); - } catch (AddressFormatException ex) { - return AddressValidationResult.invalidAddress(ex); - } - - return AddressValidationResult.validAddress(); - } - } - - - public static class InstacashParams extends NetworkParametersAdapter { - - public InstacashParams() { - addressHeader = 23; - p2shHeader = 13; - acceptableAddressCodes = new int[]{addressHeader, p2shHeader}; - } - } -} diff --git a/assets/src/main/java/bisq/asset/coins/InternetOfPeople.java b/assets/src/main/java/bisq/asset/coins/InternetOfPeople.java deleted file mode 100644 index 126cb4341d..0000000000 --- a/assets/src/main/java/bisq/asset/coins/InternetOfPeople.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.AddressValidationResult; -import bisq.asset.Base58BitcoinAddressValidator; -import bisq.asset.Coin; -import bisq.asset.NetworkParametersAdapter; - -public class InternetOfPeople extends Coin { - - public InternetOfPeople() { - super("Internet of People", "IOP", new InternetOfPeopleAddressValidator()); - } - - - public static class InternetOfPeopleAddressValidator extends Base58BitcoinAddressValidator { - - public InternetOfPeopleAddressValidator() { - super(new InternetOfPeopleParams()); - } - - @Override - public AddressValidationResult validate(String address) { - if (!address.matches("^[p][a-km-zA-HJ-NP-Z1-9]{25,34}$")) - return AddressValidationResult.invalidStructure(); - - return super.validate(address); - } - } - - - public static class InternetOfPeopleParams extends NetworkParametersAdapter { - - public InternetOfPeopleParams() { - super(); - addressHeader = 117; - p2shHeader = 174; - acceptableAddressCodes = new int[]{addressHeader, p2shHeader}; - } - } -} diff --git a/assets/src/main/java/bisq/asset/coins/Kumacoin.java b/assets/src/main/java/bisq/asset/coins/Kumacoin.java deleted file mode 100644 index 6e77939996..0000000000 --- a/assets/src/main/java/bisq/asset/coins/Kumacoin.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.Base58BitcoinAddressValidator; -import bisq.asset.Coin; -import bisq.asset.NetworkParametersAdapter; - -public class Kumacoin extends Coin { - - public Kumacoin() { - super("Kumacoin", "KUMA", new Base58BitcoinAddressValidator(new KumacoinParams())); - } - - - public static class KumacoinParams extends NetworkParametersAdapter { - - public KumacoinParams() { - addressHeader = 45; - p2shHeader = 8; - acceptableAddressCodes = new int[]{addressHeader, p2shHeader}; - } - } -} diff --git a/assets/src/main/java/bisq/asset/coins/LBRY.java b/assets/src/main/java/bisq/asset/coins/LBRY.java deleted file mode 100644 index 00cadeb501..0000000000 --- a/assets/src/main/java/bisq/asset/coins/LBRY.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.Coin; -import bisq.asset.DefaultAddressValidator; - -public class LBRY extends Coin { - - public LBRY() { - super("LBRY Credits", "LBC", new DefaultAddressValidator()); - } -} diff --git a/assets/src/main/java/bisq/asset/coins/Lisk.java b/assets/src/main/java/bisq/asset/coins/Lisk.java deleted file mode 100644 index f9ecf5045b..0000000000 --- a/assets/src/main/java/bisq/asset/coins/Lisk.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.Coin; -import bisq.asset.DefaultAddressValidator; - -public class Lisk extends Coin { - - public Lisk() { - super("Lisk", "LSK", new DefaultAddressValidator()); - } -} diff --git a/assets/src/main/java/bisq/asset/coins/LitecoinExtreme.java b/assets/src/main/java/bisq/asset/coins/LitecoinExtreme.java deleted file mode 100644 index 9285b25376..0000000000 --- a/assets/src/main/java/bisq/asset/coins/LitecoinExtreme.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * 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 . - */ -package bisq.asset.coins; - -import bisq.asset.Coin; -import bisq.asset.RegexAddressValidator; - -public class LitecoinExtreme extends Coin { - - public LitecoinExtreme(){ - super("LitecoinExtreme", "LCE", new RegexAddressValidator("^[E][a-km-zA-HJ-NP-Z1-9]{33}$")); - } -} diff --git a/assets/src/main/java/bisq/asset/coins/MFCoin.java b/assets/src/main/java/bisq/asset/coins/MFCoin.java deleted file mode 100644 index 71330a5bca..0000000000 --- a/assets/src/main/java/bisq/asset/coins/MFCoin.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * 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 . - */ -package bisq.asset.coins; - -import bisq.asset.Coin; -import bisq.asset.RegexAddressValidator; - -public class MFCoin extends Coin { - - public MFCoin(){ - super("MFCoin", "MFC", new RegexAddressValidator("^[M][a-km-zA-HJ-NP-Z1-9]{33}$")); - } -} diff --git a/assets/src/main/java/bisq/asset/coins/Madbyte.java b/assets/src/main/java/bisq/asset/coins/Madbyte.java deleted file mode 100644 index 530284f34f..0000000000 --- a/assets/src/main/java/bisq/asset/coins/Madbyte.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.Coin; -import bisq.asset.RegexAddressValidator; - -public class Madbyte extends Coin { - - public Madbyte() { - super("Madbyte", "MBYT", new RegexAddressValidator("^[M][a-zA-Z0-9]{33}$")); - } -} diff --git a/assets/src/main/java/bisq/asset/coins/Madcoin.java b/assets/src/main/java/bisq/asset/coins/Madcoin.java deleted file mode 100644 index 92df10edfa..0000000000 --- a/assets/src/main/java/bisq/asset/coins/Madcoin.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.Coin; -import bisq.asset.RegexAddressValidator; - -public class Madcoin extends Coin { - - public Madcoin() { - super("Madcoin", "MDC", new RegexAddressValidator("^m[a-zA-Z0-9]{26,33}$")); - } -} diff --git a/assets/src/main/java/bisq/asset/coins/MaidSafeCoin.java b/assets/src/main/java/bisq/asset/coins/MaidSafeCoin.java deleted file mode 100644 index 1b9db5743f..0000000000 --- a/assets/src/main/java/bisq/asset/coins/MaidSafeCoin.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.Coin; -import bisq.asset.DefaultAddressValidator; - -public class MaidSafeCoin extends Coin { - - public MaidSafeCoin() { - super("MaidSafeCoin", "MAID", new DefaultAddressValidator()); - } -} diff --git a/assets/src/main/java/bisq/asset/coins/Mazacoin.java b/assets/src/main/java/bisq/asset/coins/Mazacoin.java deleted file mode 100644 index 864a9839ba..0000000000 --- a/assets/src/main/java/bisq/asset/coins/Mazacoin.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.AddressValidationResult; -import bisq.asset.Base58BitcoinAddressValidator; -import bisq.asset.Coin; -import bisq.asset.NetworkParametersAdapter; - -public class Mazacoin extends Coin { - - public Mazacoin() { - super("Mazacoin", "MAZA", new MazacoinAddressValidator()); - } - - - public static class MazacoinAddressValidator extends Base58BitcoinAddressValidator { - - public MazacoinAddressValidator() { - super(new MazacoinParams()); - } - - @Override - public AddressValidationResult validate(String address) { - if (!address.matches("^[M][a-km-zA-HJ-NP-Z1-9]{25,34}$")) - return AddressValidationResult.invalidStructure(); - - return super.validate(address); - } - } - - - public static class MazacoinParams extends NetworkParametersAdapter { - - public MazacoinParams() { - addressHeader = 50; - p2shHeader = 9; - acceptableAddressCodes = new int[]{addressHeader, p2shHeader}; - } - } -} diff --git a/assets/src/main/java/bisq/asset/coins/NEETCOIN.java b/assets/src/main/java/bisq/asset/coins/NEETCOIN.java deleted file mode 100644 index bca852311b..0000000000 --- a/assets/src/main/java/bisq/asset/coins/NEETCOIN.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.Base58BitcoinAddressValidator; -import bisq.asset.Coin; -import bisq.asset.NetworkParametersAdapter; - -public class NEETCOIN extends Coin { - - public NEETCOIN() { - super("NEETCOIN", "NEET", new Base58BitcoinAddressValidator(new NEETCOINParams())); - } - - - public static class NEETCOINParams extends NetworkParametersAdapter { - - public NEETCOINParams() { - addressHeader = 53; - p2shHeader = 112; - acceptableAddressCodes = new int[]{addressHeader, p2shHeader}; - } - } -} diff --git a/assets/src/main/java/bisq/asset/coins/NavCoin.java b/assets/src/main/java/bisq/asset/coins/NavCoin.java deleted file mode 100644 index 9ca4fc1b60..0000000000 --- a/assets/src/main/java/bisq/asset/coins/NavCoin.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.Coin; -import bisq.asset.DefaultAddressValidator; - -public class NavCoin extends Coin { - - public NavCoin() { - super("Nav Coin", "NAV", new DefaultAddressValidator()); - } -} diff --git a/assets/src/main/java/bisq/asset/coins/Nilu.java b/assets/src/main/java/bisq/asset/coins/Nilu.java deleted file mode 100644 index f4ad6109bf..0000000000 --- a/assets/src/main/java/bisq/asset/coins/Nilu.java +++ /dev/null @@ -1,87 +0,0 @@ -package bisq.asset.coins; - -import bisq.asset.AddressValidationResult; -import bisq.asset.AddressValidator; -import bisq.asset.Coin; - -import org.bouncycastle.jcajce.provider.digest.Keccak; - -import java.nio.charset.StandardCharsets; - -public class Nilu extends Coin { - - public Nilu() { - super("Nilu", "NILU", new NiluAddressValidator()); - } - - - private static class NiluAddressValidator implements AddressValidator { - - private static final String upperOrLowerPattern = "(0x)?([0-9a-f]{40}|[0-9A-F]{40})"; - private static final String mixPattern = "(0x)?([0-9a-fA-F]{40})"; - - @Override - public AddressValidationResult validate(String address) { - if (!isValidAddress(address)) - return AddressValidationResult.invalidStructure(); - - return AddressValidationResult.validAddress(); - } - - private boolean isValidAddress(String eip55) { - if (eip55 == null || eip55.isEmpty()) - return false; - - if (eip55.matches(upperOrLowerPattern)) - return true; - - if (!eip55.matches(mixPattern)) - return false; - - String addr = convertToEip55Address(eip55); - return addr.replaceFirst("0x", "").equals(eip55.replaceFirst("0x", "")); - } - - private String convertToEip55Address(String input) { - String addr = input.replaceFirst("0x", "").toLowerCase(); - StringBuilder ret = new StringBuilder("0x"); - String hash = sha3String(addr).substring(2); - for (int i = 0; i < addr.length(); i++) { - String a = addr.charAt(i) + ""; - ret.append(Integer.parseInt(hash.charAt(i) + "", 16) > 7 ? a.toUpperCase() : a); - } - return ret.toString(); - } - - private static byte[] sha3(byte[] input, int offset, int length) { - Keccak.DigestKeccak kecc = new Keccak.Digest256(); - kecc.update(input, offset, length); - return kecc.digest(); - } - - private static byte[] sha3(byte[] input) { - return sha3(input, 0, input.length); - } - - private static String toHexString(byte[] input, int offset, int length, boolean withPrefix) { - StringBuilder stringBuilder = new StringBuilder(); - if (withPrefix) { - stringBuilder.append("0x"); - } - - for (int i = offset; i < offset + length; ++i) { - stringBuilder.append(String.format("%02x", input[i] & 255)); - } - - return stringBuilder.toString(); - } - - private static String toHexString(byte[] input) { - return toHexString(input, 0, input.length, true); - } - - private static String sha3String(String utf8String) { - return toHexString(sha3(utf8String.getBytes(StandardCharsets.UTF_8))); - } - } -} diff --git a/assets/src/main/java/bisq/asset/coins/NuBits.java b/assets/src/main/java/bisq/asset/coins/NuBits.java deleted file mode 100644 index 9d258989d1..0000000000 --- a/assets/src/main/java/bisq/asset/coins/NuBits.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.Coin; -import bisq.asset.DefaultAddressValidator; - -public class NuBits extends Coin { - - public NuBits() { - super("NuBits", "NBT", new DefaultAddressValidator()); - } -} diff --git a/assets/src/main/java/bisq/asset/coins/Nxt.java b/assets/src/main/java/bisq/asset/coins/Nxt.java deleted file mode 100644 index 6e1850c929..0000000000 --- a/assets/src/main/java/bisq/asset/coins/Nxt.java +++ /dev/null @@ -1,227 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.AddressValidationResult; -import bisq.asset.AddressValidator; -import bisq.asset.Coin; - -public class Nxt extends Coin { - - public Nxt() { - super("Nxt", "NXT", new NxtAddressValidator()); - } - - - public static class NxtAddressValidator implements AddressValidator { - - @Override - public AddressValidationResult validate(String address) { - if (!address.startsWith("NXT-") || !address.equals(address.toUpperCase())) - return AddressValidationResult.invalidStructure(); - - try { - long accountId = NxtReedSolomonValidator.decode(address.substring(4)); - if (accountId == 0) - return AddressValidationResult.invalidStructure(); - } catch (NxtReedSolomonValidator.DecodeException e) { - return AddressValidationResult.invalidAddress(e); - } - - return AddressValidationResult.validAddress(); - } - } - - public static final class NxtReedSolomonValidator { - - private static final int[] initial_codeword = {1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - private static final int[] gexp = { - 1, 2, 4, 8, 16, 5, 10, 20, 13, 26, 17, 7, 14, 28, 29, 31, - 27, 19, 3, 6, 12, 24, 21, 15, 30, 25, 23, 11, 22, 9, 18, 1}; - private static final int[] glog = { - 0, 0, 1, 18, 2, 5, 19, 11, 3, 29, 6, 27, 20, 8, 12, 23, 4, - 10, 30, 17, 7, 22, 28, 26, 21, 25, 9, 16, 13, 14, 24, 15}; - private static final int[] codeword_map = {3, 2, 1, 0, 7, 6, 5, 4, 13, 14, 15, 16, 12, 8, 9, 10, 11}; - private static final String alphabet = "23456789ABCDEFGHJKLMNPQRSTUVWXYZ"; - - private static final int base_32_length = 13; - private static final int base_10_length = 20; - - public static String encode(long plain) { - - String plain_string = Long.toUnsignedString(plain); - int length = plain_string.length(); - int[] plain_string_10 = new int[NxtReedSolomonValidator.base_10_length]; - for (int i = 0; i < length; i++) { - plain_string_10[i] = (int) plain_string.charAt(i) - (int) '0'; - } - - int codeword_length = 0; - int[] codeword = new int[NxtReedSolomonValidator.initial_codeword.length]; - - do { // base 10 to base 32 conversion - int new_length = 0; - int digit_32 = 0; - for (int i = 0; i < length; i++) { - digit_32 = digit_32 * 10 + plain_string_10[i]; - if (digit_32 >= 32) { - plain_string_10[new_length] = digit_32 >> 5; - digit_32 &= 31; - new_length += 1; - } else if (new_length > 0) { - plain_string_10[new_length] = 0; - new_length += 1; - } - } - length = new_length; - codeword[codeword_length] = digit_32; - codeword_length += 1; - } while (length > 0); - - int[] p = {0, 0, 0, 0}; - for (int i = NxtReedSolomonValidator.base_32_length - 1; i >= 0; i--) { - final int fb = codeword[i] ^ p[3]; - p[3] = p[2] ^ NxtReedSolomonValidator.gmult(30, fb); - p[2] = p[1] ^ NxtReedSolomonValidator.gmult(6, fb); - p[1] = p[0] ^ NxtReedSolomonValidator.gmult(9, fb); - p[0] = NxtReedSolomonValidator.gmult(17, fb); - } - - System.arraycopy( - p, 0, codeword, NxtReedSolomonValidator.base_32_length, - NxtReedSolomonValidator.initial_codeword.length - NxtReedSolomonValidator.base_32_length); - - StringBuilder cypher_string_builder = new StringBuilder(); - for (int i = 0; i < 17; i++) { - final int codework_index = NxtReedSolomonValidator.codeword_map[i]; - final int alphabet_index = codeword[codework_index]; - cypher_string_builder.append(NxtReedSolomonValidator.alphabet.charAt(alphabet_index)); - - if ((i & 3) == 3 && i < 13) { - cypher_string_builder.append('-'); - } - } - return cypher_string_builder.toString(); - } - - public static long decode(String cypher_string) throws DecodeException { - - int[] codeword = new int[NxtReedSolomonValidator.initial_codeword.length]; - System.arraycopy( - NxtReedSolomonValidator.initial_codeword, 0, codeword, 0, - NxtReedSolomonValidator.initial_codeword.length); - - int codeword_length = 0; - for (int i = 0; i < cypher_string.length(); i++) { - int position_in_alphabet = NxtReedSolomonValidator.alphabet.indexOf(cypher_string.charAt(i)); - - if (position_in_alphabet <= -1 || position_in_alphabet > NxtReedSolomonValidator.alphabet.length()) { - continue; - } - - if (codeword_length > 16) { - throw new CodewordTooLongException(); - } - - int codework_index = NxtReedSolomonValidator.codeword_map[codeword_length]; - codeword[codework_index] = position_in_alphabet; - codeword_length += 1; - } - - if (codeword_length == 17 && !NxtReedSolomonValidator.is_codeword_valid(codeword) || codeword_length != 17) { - throw new CodewordInvalidException(); - } - - int length = NxtReedSolomonValidator.base_32_length; - int[] cypher_string_32 = new int[length]; - for (int i = 0; i < length; i++) { - cypher_string_32[i] = codeword[length - i - 1]; - } - - StringBuilder plain_string_builder = new StringBuilder(); - do { // base 32 to base 10 conversion - int new_length = 0; - int digit_10 = 0; - - for (int i = 0; i < length; i++) { - digit_10 = digit_10 * 32 + cypher_string_32[i]; - - if (digit_10 >= 10) { - cypher_string_32[new_length] = digit_10 / 10; - digit_10 %= 10; - new_length += 1; - } else if (new_length > 0) { - cypher_string_32[new_length] = 0; - new_length += 1; - } - } - length = new_length; - plain_string_builder.append((char) (digit_10 + (int) '0')); - } while (length > 0); - - return Long.parseUnsignedLong(plain_string_builder.reverse().toString()); - } - - private static int gmult(int a, int b) { - if (a == 0 || b == 0) { - return 0; - } - - int idx = (NxtReedSolomonValidator.glog[a] + NxtReedSolomonValidator.glog[b]) % 31; - - return NxtReedSolomonValidator.gexp[idx]; - } - - private static boolean is_codeword_valid(int[] codeword) { - int sum = 0; - - for (int i = 1; i < 5; i++) { - int t = 0; - - for (int j = 0; j < 31; j++) { - if (j > 12 && j < 27) { - continue; - } - - int pos = j; - if (j > 26) { - pos -= 14; - } - - t ^= NxtReedSolomonValidator.gmult(codeword[pos], NxtReedSolomonValidator.gexp[(i * j) % 31]); - } - - sum |= t; - } - - return sum == 0; - } - - public abstract static class DecodeException extends Exception { - } - - static final class CodewordTooLongException extends DecodeException { - } - - static final class CodewordInvalidException extends DecodeException { - } - - private NxtReedSolomonValidator() { - } // never - } -} diff --git a/assets/src/main/java/bisq/asset/coins/Octocoin.java b/assets/src/main/java/bisq/asset/coins/Octocoin.java deleted file mode 100644 index 6801c242cd..0000000000 --- a/assets/src/main/java/bisq/asset/coins/Octocoin.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.AddressValidationResult; -import bisq.asset.Base58BitcoinAddressValidator; -import bisq.asset.Coin; -import bisq.asset.NetworkParametersAdapter; - -public class Octocoin extends Coin { - - public Octocoin() { - super("Octocoin", "888", new OctocoinAddressValidator()); - } - - - public static class OctocoinAddressValidator extends Base58BitcoinAddressValidator { - - public OctocoinAddressValidator() { - super(new OctocoinParams()); - } - - @Override - public AddressValidationResult validate(String address) { - if (!address.matches("^[83][a-km-zA-HJ-NP-Z1-9]{25,34}$")) - return AddressValidationResult.invalidStructure(); - - return super.validate(address); - } - } - - - public static class OctocoinParams extends NetworkParametersAdapter { - - public OctocoinParams() { - addressHeader = 18; - p2shHeader = 5; - acceptableAddressCodes = new int[]{addressHeader, p2shHeader}; - } - } -} diff --git a/assets/src/main/java/bisq/asset/coins/Particl.java b/assets/src/main/java/bisq/asset/coins/Particl.java deleted file mode 100644 index edf26fd575..0000000000 --- a/assets/src/main/java/bisq/asset/coins/Particl.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.AddressValidationResult; -import bisq.asset.Base58BitcoinAddressValidator; -import bisq.asset.Coin; -import bisq.asset.NetworkParametersAdapter; - -public class Particl extends Coin { - - public Particl() { - super("Particl", "PART", new ParticlAddressValidator()); - } - - - public static class ParticlAddressValidator extends Base58BitcoinAddressValidator { - - public ParticlAddressValidator() { - super(new ParticlParams()); - } - - @Override - public AddressValidationResult validate(String address) { - if (!address.matches("^[RP][a-km-zA-HJ-NP-Z1-9]{25,34}$")) - return AddressValidationResult.invalidStructure(); - - return super.validate(address); - } - } - - - public static class ParticlParams extends NetworkParametersAdapter { - - public ParticlParams() { - addressHeader = 56; - p2shHeader = 60; - acceptableAddressCodes = new int[]{addressHeader, p2shHeader}; - } - } -} diff --git a/assets/src/main/java/bisq/asset/coins/PepeCash.java b/assets/src/main/java/bisq/asset/coins/PepeCash.java deleted file mode 100644 index 5fea385cdd..0000000000 --- a/assets/src/main/java/bisq/asset/coins/PepeCash.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.Coin; -import bisq.asset.DefaultAddressValidator; - -public class PepeCash extends Coin { - - public PepeCash() { - super("Pepe Cash", "PEPECASH", new DefaultAddressValidator()); - } -} diff --git a/assets/src/main/java/bisq/asset/coins/Phore.java b/assets/src/main/java/bisq/asset/coins/Phore.java deleted file mode 100644 index 3b1122c9fa..0000000000 --- a/assets/src/main/java/bisq/asset/coins/Phore.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.AddressValidationResult; -import bisq.asset.Base58BitcoinAddressValidator; -import bisq.asset.Coin; -import bisq.asset.NetworkParametersAdapter; - -public class Phore extends Coin { - - public Phore() { - super("Phore", "PHR", new PhoreAddressValidator()); - } - - - public static class PhoreAddressValidator extends Base58BitcoinAddressValidator { - - public PhoreAddressValidator() { - super(new PhoreParams()); - } - - @Override - public AddressValidationResult validate(String address) { - if (!address.matches("^[P][a-km-zA-HJ-NP-Z1-9]{25,34}$")) - return AddressValidationResult.invalidStructure(); - - return super.validate(address); - } - } - - - public static class PhoreParams extends NetworkParametersAdapter { - - public PhoreParams() { - addressHeader = 55; - p2shHeader = 13; - acceptableAddressCodes = new int[]{addressHeader, p2shHeader}; - } - } -} diff --git a/assets/src/main/java/bisq/asset/coins/PostCoin.java b/assets/src/main/java/bisq/asset/coins/PostCoin.java deleted file mode 100644 index 76fb341d5f..0000000000 --- a/assets/src/main/java/bisq/asset/coins/PostCoin.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.Coin; -import bisq.asset.DefaultAddressValidator; - -public class PostCoin extends Coin { - - public PostCoin() { - super("PostCoin", "POST", new DefaultAddressValidator()); - } -} diff --git a/assets/src/main/java/bisq/asset/coins/Pranacoin.java b/assets/src/main/java/bisq/asset/coins/Pranacoin.java deleted file mode 100644 index c56113b27f..0000000000 --- a/assets/src/main/java/bisq/asset/coins/Pranacoin.java +++ /dev/null @@ -1,102 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.AddressValidationResult; -import bisq.asset.Base58BitcoinAddressValidator; -import bisq.asset.Coin; -import bisq.asset.NetworkParametersAdapter; - -import java.security.MessageDigest; -import java.security.NoSuchAlgorithmException; - -import java.util.Arrays; - -public class Pranacoin extends Coin { - - public Pranacoin() { - super("Pranacoin", "PNC", new PranacoinAddressValidator()); - } - - - public static class PranacoinAddressValidator extends Base58BitcoinAddressValidator { - - private final static String ALPHABET = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"; - - public PranacoinAddressValidator() { - super(new Pranacoin.PranacoinParams()); - } - - @Override - public AddressValidationResult validate(String address) { - if (!address.matches("^[P3][a-km-zA-HJ-NP-Z1-9]{25,34}$")) - return AddressValidationResult.invalidStructure(); - if (!validateAddress(address)) - return AddressValidationResult.invalidStructure(); - return super.validate(address); - } - - public static boolean validateAddress(String addr) { - if (addr.length() < 26 || addr.length() > 35) return false; - byte[] decoded = decodeBase58(addr, 58, 25); - if (decoded == null) return false; - - byte[] hash = getSha256(decoded, 0, 21, 2); - return hash != null && Arrays.equals(Arrays.copyOfRange(hash, 0, 4), Arrays.copyOfRange(decoded, 21, 25)); - } - - private static byte[] decodeBase58(String input, int base, int len) { - byte[] output = new byte[len]; - for (int i = 0; i < input.length(); i++) { - char t = input.charAt(i); - - int p = ALPHABET.indexOf(t); - if (p == -1) return null; - for (int j = len - 1; j >= 0; j--, p /= 256) { - p += base * (output[j] & 0xFF); - output[j] = (byte) (p % 256); - } - if (p != 0) return null; - } - - return output; - } - - private static byte[] getSha256(byte[] data, int start, int len, int recursion) { - if (recursion == 0) return data; - - try { - MessageDigest md = MessageDigest.getInstance("SHA-256"); - md.update(Arrays.copyOfRange(data, start, start + len)); - return getSha256(md.digest(), 0, 32, recursion - 1); - } catch (NoSuchAlgorithmException e) { - return null; - } - } - } - - - public static class PranacoinParams extends NetworkParametersAdapter { - - public PranacoinParams() { - addressHeader = 55; - p2shHeader = 5; - acceptableAddressCodes = new int[]{addressHeader, p2shHeader}; - } - } -} diff --git a/assets/src/main/java/bisq/asset/coins/ReddCoin.java b/assets/src/main/java/bisq/asset/coins/ReddCoin.java deleted file mode 100644 index 50f029e370..0000000000 --- a/assets/src/main/java/bisq/asset/coins/ReddCoin.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.Coin; -import bisq.asset.DefaultAddressValidator; - -public class ReddCoin extends Coin { - - public ReddCoin() { - super("ReddCoin", "RDD", new DefaultAddressValidator()); - } -} diff --git a/assets/src/main/java/bisq/asset/coins/Ringo.java b/assets/src/main/java/bisq/asset/coins/Ringo.java deleted file mode 100644 index 82c5deed8d..0000000000 --- a/assets/src/main/java/bisq/asset/coins/Ringo.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.Base58BitcoinAddressValidator; -import bisq.asset.Coin; -import bisq.asset.NetworkParametersAdapter; - -public class Ringo extends Coin { - - public Ringo() { - super("Ringo", "RIN", new Base58BitcoinAddressValidator(new RingoParams())); - } - - - public static class RingoParams extends NetworkParametersAdapter { - - public RingoParams() { - addressHeader = 60; - p2shHeader = 85; - acceptableAddressCodes = new int[]{addressHeader, p2shHeader}; - } - } -} diff --git a/assets/src/main/java/bisq/asset/coins/Roicoin.java b/assets/src/main/java/bisq/asset/coins/Roicoin.java deleted file mode 100644 index 1b115e4558..0000000000 --- a/assets/src/main/java/bisq/asset/coins/Roicoin.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.Coin; -import bisq.asset.RegexAddressValidator; - -public class Roicoin extends Coin { - - public Roicoin() { - super("ROIcoin", "ROI", new RegexAddressValidator("^[R][0-9a-zA-Z]{33}$")); - } -} diff --git a/assets/src/main/java/bisq/asset/coins/STEEM.java b/assets/src/main/java/bisq/asset/coins/STEEM.java deleted file mode 100644 index 6d19a5c575..0000000000 --- a/assets/src/main/java/bisq/asset/coins/STEEM.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.Coin; -import bisq.asset.DefaultAddressValidator; - -public class STEEM extends Coin { - - public STEEM() { - super("STEEM", "STEEM", new DefaultAddressValidator()); - } -} diff --git a/assets/src/main/java/bisq/asset/coins/SafeFileSystemCoin.java b/assets/src/main/java/bisq/asset/coins/SafeFileSystemCoin.java deleted file mode 100644 index 9c1de4c4a5..0000000000 --- a/assets/src/main/java/bisq/asset/coins/SafeFileSystemCoin.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.Coin; -import bisq.asset.DefaultAddressValidator; - -public class SafeFileSystemCoin extends Coin { - - public SafeFileSystemCoin() { - super("Safe FileSystem Coin", "SFSC", new DefaultAddressValidator()); - } -} diff --git a/assets/src/main/java/bisq/asset/coins/Semux.java b/assets/src/main/java/bisq/asset/coins/Semux.java deleted file mode 100644 index 3acff575ae..0000000000 --- a/assets/src/main/java/bisq/asset/coins/Semux.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.Coin; -import bisq.asset.RegexAddressValidator; - -public class Semux extends Coin { - - public Semux() { - super("Semux", "SEM", new RegexAddressValidator("^0x[a-f0-9]{40}$")); - } -} diff --git a/assets/src/main/java/bisq/asset/coins/Siacoin.java b/assets/src/main/java/bisq/asset/coins/Siacoin.java deleted file mode 100644 index 8dbf3418f5..0000000000 --- a/assets/src/main/java/bisq/asset/coins/Siacoin.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.Coin; -import bisq.asset.DefaultAddressValidator; - -public class Siacoin extends Coin { - - public Siacoin() { - super("Siacoin", "SC", new DefaultAddressValidator()); - } -} diff --git a/assets/src/main/java/bisq/asset/coins/Sibcoin.java b/assets/src/main/java/bisq/asset/coins/Sibcoin.java deleted file mode 100644 index 4bda306201..0000000000 --- a/assets/src/main/java/bisq/asset/coins/Sibcoin.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.Coin; -import bisq.asset.DefaultAddressValidator; - -public class Sibcoin extends Coin { - - public Sibcoin() { - super("Sibcoin", "SIB", new DefaultAddressValidator()); - } -} diff --git a/assets/src/main/java/bisq/asset/coins/SpeedCash.java b/assets/src/main/java/bisq/asset/coins/SpeedCash.java deleted file mode 100644 index 3ecb35a123..0000000000 --- a/assets/src/main/java/bisq/asset/coins/SpeedCash.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.Base58BitcoinAddressValidator; -import bisq.asset.Coin; -import bisq.asset.NetworkParametersAdapter; - -public class SpeedCash extends Coin { - - public SpeedCash() { - super("SpeedCash", "SCS", new Base58BitcoinAddressValidator(new SpeedCashParams())); - } - - - public static class SpeedCashParams extends NetworkParametersAdapter { - - public SpeedCashParams() { - addressHeader = 63; - p2shHeader = 85; - acceptableAddressCodes = new int[]{addressHeader, p2shHeader}; - } - } -} diff --git a/assets/src/main/java/bisq/asset/coins/Stellite.java b/assets/src/main/java/bisq/asset/coins/Stellite.java deleted file mode 100644 index 59dd349b5a..0000000000 --- a/assets/src/main/java/bisq/asset/coins/Stellite.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.Coin; -import bisq.asset.RegexAddressValidator; - -public class Stellite extends Coin { - - public Stellite() { - super("Stellite", "STL", new RegexAddressValidator("^(Se)\\d[0-9A-Za-z]{94}$")); - } -} diff --git a/assets/src/main/java/bisq/asset/coins/Strayacoin.java b/assets/src/main/java/bisq/asset/coins/Strayacoin.java deleted file mode 100644 index cedaa60a37..0000000000 --- a/assets/src/main/java/bisq/asset/coins/Strayacoin.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.AddressValidationResult; -import bisq.asset.Base58BitcoinAddressValidator; -import bisq.asset.Coin; -import bisq.asset.NetworkParametersAdapter; - -public class Strayacoin extends Coin { - - public Strayacoin() { - super("Strayacoin", "NAH", new StrayacoinAddressValidator()); - } - - - public static class StrayacoinAddressValidator extends Base58BitcoinAddressValidator { - - public StrayacoinAddressValidator() { - super(new StrayacoinParams()); - } - - @Override - public AddressValidationResult validate(String address) { - if (!address.matches("^[S][a-zA-Z0-9]{26,34}$")) - return AddressValidationResult.invalidStructure(); - - return super.validate(address); - } - } - - - public static class StrayacoinParams extends NetworkParametersAdapter { - - public StrayacoinParams() { - addressHeader = 63; - p2shHeader = 50; - acceptableAddressCodes = new int[]{addressHeader, p2shHeader}; - } - } -} diff --git a/assets/src/main/java/bisq/asset/coins/Tamadcoin.java b/assets/src/main/java/bisq/asset/coins/Tamadcoin.java deleted file mode 100644 index 9cb645a229..0000000000 --- a/assets/src/main/java/bisq/asset/coins/Tamadcoin.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.Coin; -import bisq.asset.RegexAddressValidator; - -public class Tamadcoin extends Coin { - - public Tamadcoin() { - super("Tamadcoin", "TMC", new RegexAddressValidator("^ax[A-Z][0-9ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{1,97}$")); - } -} diff --git a/assets/src/main/java/bisq/asset/coins/Terracoin.java b/assets/src/main/java/bisq/asset/coins/Terracoin.java deleted file mode 100644 index bc8070d1b7..0000000000 --- a/assets/src/main/java/bisq/asset/coins/Terracoin.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.Base58BitcoinAddressValidator; -import bisq.asset.Coin; -import bisq.asset.NetworkParametersAdapter; - -public class Terracoin extends Coin { - - public Terracoin() { - super("Terracoin", "TRC", new Base58BitcoinAddressValidator(new TerracoinParams())); - } - - - public static class TerracoinParams extends NetworkParametersAdapter { - - public TerracoinParams() { - super(); - addressHeader = 0; - p2shHeader = 5; - acceptableAddressCodes = new int[]{addressHeader, p2shHeader}; - } - } -} diff --git a/assets/src/main/java/bisq/asset/coins/Ubiq.java b/assets/src/main/java/bisq/asset/coins/Ubiq.java deleted file mode 100644 index 8c0b87f646..0000000000 --- a/assets/src/main/java/bisq/asset/coins/Ubiq.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.Coin; -import bisq.asset.RegexAddressValidator; - -public class Ubiq extends Coin { - - public Ubiq() { - super("Ubiq", "UBQ", new RegexAddressValidator("^(0x)?[0-9a-fA-F]{40}$")); - } -} diff --git a/assets/src/main/java/bisq/asset/coins/VDinar.java b/assets/src/main/java/bisq/asset/coins/VDinar.java deleted file mode 100644 index 5563d30d49..0000000000 --- a/assets/src/main/java/bisq/asset/coins/VDinar.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.Coin; -import bisq.asset.RegexAddressValidator; - -public class VDinar extends Coin { - - public VDinar() { - super("vDinar", "VDN", new RegexAddressValidator("^[D][0-9a-zA-Z]{33}$")); - } -} diff --git a/assets/src/main/java/bisq/asset/coins/Wacoin.java b/assets/src/main/java/bisq/asset/coins/Wacoin.java deleted file mode 100644 index 055467db8b..0000000000 --- a/assets/src/main/java/bisq/asset/coins/Wacoin.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.Base58BitcoinAddressValidator; -import bisq.asset.Coin; -import bisq.asset.NetworkParametersAdapter; - -public class Wacoin extends Coin { - - public Wacoin() { - super("WACoins", "WAC", new Base58BitcoinAddressValidator(new WacoinParams())); - } - - - public static class WacoinParams extends NetworkParametersAdapter { - - public WacoinParams() { - super(); - addressHeader = 73; - p2shHeader = 3; - acceptableAddressCodes = new int[]{addressHeader, p2shHeader}; - } - } -} diff --git a/assets/src/main/java/bisq/asset/coins/WorldMobileCoin.java b/assets/src/main/java/bisq/asset/coins/WorldMobileCoin.java deleted file mode 100644 index 2c6577f8ce..0000000000 --- a/assets/src/main/java/bisq/asset/coins/WorldMobileCoin.java +++ /dev/null @@ -1,269 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.AddressValidationResult; -import bisq.asset.AddressValidator; -import bisq.asset.Base58BitcoinAddressValidator; -import bisq.asset.Coin; -import bisq.asset.NetworkParametersAdapter; - -import org.bitcoinj.core.AddressFormatException; -import org.bitcoinj.core.NetworkParameters; -import org.bitcoinj.core.VersionedChecksummedBytes; -import org.bitcoinj.params.Networks; - -import java.io.ByteArrayOutputStream; - -import java.util.Arrays; -import java.util.Locale; - -import javax.annotation.Nullable; - -public class WorldMobileCoin extends Coin { - - public WorldMobileCoin() { - super("WorldMobileCoin", "WMCC", new WorldMobileCoinAddressValidator()); - } - - - public static class WorldMobileCoinAddressValidator implements AddressValidator { - - private final Base58BitcoinAddressValidator base58BitcoinAddressValidator; - private final NetworkParameters networkParameters; - - public WorldMobileCoinAddressValidator() { - networkParameters = new WorldMobileCoinParams(); - base58BitcoinAddressValidator = new Base58BitcoinAddressValidator(networkParameters); - } - - public AddressValidationResult validate(String address) { - if (!isLowerCase(address)) { - return base58BitcoinAddressValidator.validate(address); - } - - try { - WitnessAddress.fromBech32(networkParameters, address); - } catch (AddressFormatException ex) { - return AddressValidationResult.invalidAddress(ex); - } - - return AddressValidationResult.validAddress(); - } - - private static boolean isLowerCase(String str) { - char ch; - for (int i = 0; i < str.length(); i++) { - ch = str.charAt(i); - if (Character.isDigit(ch)) - continue; - if (!Character.isLowerCase(ch)) - return false; - } - return true; - } - - } - - - public static class WorldMobileCoinParams extends NetworkParametersAdapter { - - public WorldMobileCoinParams() { - addressHeader = 0x49; - p2shHeader = 0x4b; - acceptableAddressCodes = new int[]{addressHeader, p2shHeader}; - - } - } - - - private static class WitnessAddress extends VersionedChecksummedBytes { - static final int PROGRAM_LENGTH_PKH = 20; - static final int PROGRAM_LENGTH_SH = 32; - static final int PROGRAM_MIN_LENGTH = 2; - static final int PROGRAM_MAX_LENGTH = 40; - static final String WITNESS_ADDRESS_HRP = "wc"; - - private WitnessAddress(NetworkParameters params, byte[] data) throws AddressFormatException { - super(params.getAddressHeader(), data); - if (data.length < 1) - throw new AddressFormatException("Zero data found"); - final int version = getWitnessVersion(); - if (version < 0 || version > 16) - throw new AddressFormatException("Invalid script version: " + version); - byte[] program = getWitnessProgram(); - if (program.length < PROGRAM_MIN_LENGTH || program.length > PROGRAM_MAX_LENGTH) - throw new AddressFormatException("Invalid length: " + program.length); - if (version == 0 && program.length != PROGRAM_LENGTH_PKH - && program.length != PROGRAM_LENGTH_SH) - throw new AddressFormatException( - "Invalid length for address version 0: " + program.length); - } - - int getWitnessVersion() { - return bytes[0] & 0xff; - } - - byte[] getWitnessProgram() { - return convertBits(bytes, 1, bytes.length - 1, 5, 8, false); - } - - static WitnessAddress fromBech32(@Nullable NetworkParameters params, String bech32) - throws AddressFormatException { - Bech32.Bech32Data bechData = Bech32.decode(bech32); - if (params == null) { - for (NetworkParameters p : Networks.get()) { - if (bechData.hrp.equals(WITNESS_ADDRESS_HRP)) - return new WitnessAddress(p, bechData.data); - } - throw new AddressFormatException("Invalid Prefix: No network found for " + bech32); - } else { - if (bechData.hrp.equals(WITNESS_ADDRESS_HRP)) - return new WitnessAddress(params, bechData.data); - throw new AddressFormatException("Wrong Network: " + bechData.hrp); - } - } - - /** - * Helper - */ - private static byte[] convertBits(final byte[] in, final int inStart, final int inLen, final int fromBits, - final int toBits, final boolean pad) throws AddressFormatException { - int acc = 0; - int bits = 0; - ByteArrayOutputStream out = new ByteArrayOutputStream(64); - final int maxv = (1 << toBits) - 1; - final int max_acc = (1 << (fromBits + toBits - 1)) - 1; - for (int i = 0; i < inLen; i++) { - int value = in[i + inStart] & 0xff; - if ((value >>> fromBits) != 0) { - throw new AddressFormatException( - String.format("Input value '%X' exceeds '%d' bit size", value, fromBits)); - } - acc = ((acc << fromBits) | value) & max_acc; - bits += fromBits; - while (bits >= toBits) { - bits -= toBits; - out.write((acc >>> bits) & maxv); - } - } - if (pad) { - if (bits > 0) - out.write((acc << (toBits - bits)) & maxv); - } else if (bits >= fromBits || ((acc << (toBits - bits)) & maxv) != 0) { - throw new AddressFormatException("Could not convert bits, invalid padding"); - } - return out.toByteArray(); - } - } - - - private static class Bech32 { - private static final byte[] CHARSET_REV = { - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 15, -1, 10, 17, - 21, 20, 26, 30, 7, 5, -1, -1, -1, -1, -1, -1, -1, 29, -1, 24, 13, 25, 9, 8, 23, -1, 18, 22, 31, 27, 19, - -1, 1, 0, 3, 16, 11, 28, 12, 14, 6, 4, 2, -1, -1, -1, -1, -1, -1, 29, -1, 24, 13, 25, 9, 8, 23, -1, 18, - 22, 31, 27, 19, -1, 1, 0, 3, 16, 11, 28, 12, 14, 6, 4, 2, -1, -1, -1, -1, -1 - }; - - static class Bech32Data { - final String hrp; - final byte[] data; - - private Bech32Data(final String hrp, final byte[] data) { - this.hrp = hrp; - this.data = data; - } - } - - private static int polymod(final byte[] values) { - int c = 1; - for (byte v_i : values) { - int c0 = (c >>> 25) & 0xff; - c = ((c & 0x1ffffff) << 5) ^ (v_i & 0xff); - if ((c0 & 1) != 0) c ^= 0x3b6a57b2; - if ((c0 & 2) != 0) c ^= 0x26508e6d; - if ((c0 & 4) != 0) c ^= 0x1ea119fa; - if ((c0 & 8) != 0) c ^= 0x3d4233dd; - if ((c0 & 16) != 0) c ^= 0x2a1462b3; - } - return c; - } - - private static byte[] expandHrp(final String hrp) { - int len = hrp.length(); - byte ret[] = new byte[len * 2 + 1]; - for (int i = 0; i < len; ++i) { - int c = hrp.charAt(i) & 0x7f; - ret[i] = (byte) ((c >>> 5) & 0x07); - ret[i + len + 1] = (byte) (c & 0x1f); - } - ret[len] = 0; - return ret; - } - - private static boolean verifyChecksum(final String hrp, final byte[] values) { - byte[] exp = expandHrp(hrp); - byte[] combined = new byte[exp.length + values.length]; - System.arraycopy(exp, 0, combined, 0, exp.length); - System.arraycopy(values, 0, combined, exp.length, values.length); - return polymod(combined) == 1; - } - - public static Bech32Data decode(final String str) throws AddressFormatException { - boolean lower = false, upper = false; - int len = str.length(); - if (len < 8) - throw new AddressFormatException("Input too short: " + len); - if (len > 90) - throw new AddressFormatException("Input too long: " + len); - for (int i = 0; i < len; ++i) { - char c = str.charAt(i); - if (c < 33 || c > 126) throw new AddressFormatException(invalidChar(c, i)); - if (c >= 'a' && c <= 'z') { - if (upper) - throw new AddressFormatException(invalidChar(c, i)); - lower = true; - } - if (c >= 'A' && c <= 'Z') { - if (lower) - throw new AddressFormatException(invalidChar(c, i)); - upper = true; - } - } - final int pos = str.lastIndexOf('1'); - if (pos < 1) throw new AddressFormatException("Invalid Prefix: Missing human-readable part"); - final int dataLen = len - 1 - pos; - if (dataLen < 6) throw new AddressFormatException("Data part too short: " + dataLen); - byte[] values = new byte[dataLen]; - for (int i = 0; i < dataLen; ++i) { - char c = str.charAt(i + pos + 1); - if (CHARSET_REV[c] == -1) throw new AddressFormatException(invalidChar(c, i + pos + 1)); - values[i] = CHARSET_REV[c]; - } - String hrp = str.substring(0, pos).toLowerCase(Locale.ROOT); - if (!verifyChecksum(hrp, values)) throw new AddressFormatException("Invalid Checksum"); - return new Bech32Data(hrp, Arrays.copyOfRange(values, 0, values.length - 6)); - } - - private static String invalidChar(char c, int i) { - return "Invalid character '" + Character.toString(c) + "' at position " + i; - } - } -} diff --git a/assets/src/main/java/bisq/asset/coins/Wownero.java b/assets/src/main/java/bisq/asset/coins/Wownero.java deleted file mode 100644 index b14c7752b8..0000000000 --- a/assets/src/main/java/bisq/asset/coins/Wownero.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * 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 . - */ - -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}$")); - } -} diff --git a/assets/src/main/java/bisq/asset/coins/Xuez.java b/assets/src/main/java/bisq/asset/coins/Xuez.java deleted file mode 100644 index 394223d5dc..0000000000 --- a/assets/src/main/java/bisq/asset/coins/Xuez.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.AddressValidationResult; -import bisq.asset.Base58BitcoinAddressValidator; -import bisq.asset.Coin; -import bisq.asset.NetworkParametersAdapter; - -public class Xuez extends Coin { - - public Xuez() { - super("Xuez", "XUEZ", new XuezAddressValidator()); - } - - - public static class XuezAddressValidator extends Base58BitcoinAddressValidator { - - public XuezAddressValidator() { - super(new XuezParams()); - } - - @Override - public AddressValidationResult validate(String address) { - - if (!address.matches("^[X][a-km-zA-HJ-NP-Z1-9]{25,34}$")) - return AddressValidationResult.invalidStructure(); - - return AddressValidationResult.validAddress(); - } - } - - - public static class XuezParams extends NetworkParametersAdapter { - - public XuezParams() { - addressHeader = 48; - p2shHeader = 12; - acceptableAddressCodes = new int[]{addressHeader, p2shHeader}; - } - } -} diff --git a/assets/src/main/java/bisq/asset/coins/Yenten.java b/assets/src/main/java/bisq/asset/coins/Yenten.java deleted file mode 100644 index 7a8a7fb2ea..0000000000 --- a/assets/src/main/java/bisq/asset/coins/Yenten.java +++ /dev/null @@ -1,87 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.AddressValidationResult; -import bisq.asset.AddressValidator; -import bisq.asset.Coin; - -import java.security.MessageDigest; -import java.security.NoSuchAlgorithmException; - -import java.util.Arrays; - -public class Yenten extends Coin { - - public Yenten() { - super("Yenten", "YTN", new YentenAddressValidator()); - } - - - public static class YentenAddressValidator implements AddressValidator { - - private final static String ALPHABET = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"; - - public AddressValidationResult validate(String addr) { - if (addr.length() != 34) - return AddressValidationResult.invalidAddress("YTN_Addr_Invalid: Length must be 34!"); - if (!addr.startsWith("Y")) - return AddressValidationResult.invalidAddress("YTN_Addr_Invalid: must start with 'Y'!"); - byte[] decoded = decodeBase58(addr); - if (decoded == null) - return AddressValidationResult.invalidAddress("YTN_Addr_Invalid: Base58 decoder error!"); - - byte[] hash = getSha256(decoded, 21, 2); - if (hash == null || !Arrays.equals(Arrays.copyOfRange(hash, 0, 4), Arrays.copyOfRange(decoded, 21, 25))) - return AddressValidationResult.invalidAddress("YTN_Addr_Invalid: Checksum error!"); - return AddressValidationResult.validAddress(); - } - - private static byte[] decodeBase58(String input) { - byte[] output = new byte[25]; - for (int i = 0; i < input.length(); i++) { - char t = input.charAt(i); - - int p = ALPHABET.indexOf(t); - if (p == -1) - return null; - for (int j = 25 - 1; j >= 0; j--, p /= 256) { - p += 58 * (output[j] & 0xFF); - output[j] = (byte) (p % 256); - } - if (p != 0) - return null; - } - - return output; - } - - private static byte[] getSha256(byte[] data, int len, int recursion) { - if (recursion == 0) - return data; - - try { - MessageDigest md = MessageDigest.getInstance("SHA-256"); - md.update(Arrays.copyOfRange(data, 0, len)); - return getSha256(md.digest(), 32, recursion - 1); - } catch (NoSuchAlgorithmException e) { - return null; - } - } - } -} diff --git a/assets/src/main/java/bisq/asset/tokens/BetterBetting.java b/assets/src/main/java/bisq/asset/tokens/BetterBetting.java deleted file mode 100644 index 88021db8d4..0000000000 --- a/assets/src/main/java/bisq/asset/tokens/BetterBetting.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.tokens; - -import bisq.asset.Erc20Token; - -public class BetterBetting extends Erc20Token { - - public BetterBetting() { - super("Better Betting", "BETR"); - } -} diff --git a/assets/src/main/java/bisq/asset/tokens/DaiStablecoin.java b/assets/src/main/java/bisq/asset/tokens/DaiStablecoin.java deleted file mode 100644 index f0f673c527..0000000000 --- a/assets/src/main/java/bisq/asset/tokens/DaiStablecoin.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.tokens; - -import bisq.asset.Erc20Token; - -public class DaiStablecoin extends Erc20Token { - - public DaiStablecoin() { - super("Dai Stablecoin", "DAI"); - } -} diff --git a/assets/src/main/java/bisq/asset/tokens/Ellaism.java b/assets/src/main/java/bisq/asset/tokens/Ellaism.java deleted file mode 100644 index 95dc40b29d..0000000000 --- a/assets/src/main/java/bisq/asset/tokens/Ellaism.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.tokens; - -import bisq.asset.Erc20Token; - -public class Ellaism extends Erc20Token { - - public Ellaism() { - super("Ellaism", "ELLA"); - } -} diff --git a/assets/src/main/java/bisq/asset/tokens/Exceed.java b/assets/src/main/java/bisq/asset/tokens/Exceed.java deleted file mode 100644 index 094bc2ab3b..0000000000 --- a/assets/src/main/java/bisq/asset/tokens/Exceed.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.tokens; - -import bisq.asset.Erc20Token; - -public class Exceed extends Erc20Token { - - public Exceed() { - super("Exceed", "EXC"); - } -} diff --git a/assets/src/main/java/bisq/asset/tokens/GeoCoin.java b/assets/src/main/java/bisq/asset/tokens/GeoCoin.java deleted file mode 100644 index a3e29529df..0000000000 --- a/assets/src/main/java/bisq/asset/tokens/GeoCoin.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.tokens; - -import bisq.asset.Erc20Token; - -public class GeoCoin extends Erc20Token { - - public GeoCoin() { - super("GeoCoin", "GEO"); - } -} diff --git a/assets/src/main/java/bisq/asset/tokens/Grans.java b/assets/src/main/java/bisq/asset/tokens/Grans.java deleted file mode 100644 index 08f9e8adc8..0000000000 --- a/assets/src/main/java/bisq/asset/tokens/Grans.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.tokens; - -import bisq.asset.Erc20Token; - -public class Grans extends Erc20Token { - - public Grans() { - super("10grans", "GRANS"); - } -} diff --git a/assets/src/main/java/bisq/asset/tokens/Internext.java b/assets/src/main/java/bisq/asset/tokens/Internext.java deleted file mode 100644 index 71072e5b8b..0000000000 --- a/assets/src/main/java/bisq/asset/tokens/Internext.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.tokens; - -import bisq.asset.Erc20Token; - -public class Internext extends Erc20Token { - - public Internext() { - super("Internext", "INXT"); - } -} diff --git a/assets/src/main/java/bisq/asset/tokens/Movement.java b/assets/src/main/java/bisq/asset/tokens/Movement.java deleted file mode 100644 index 4594b216c4..0000000000 --- a/assets/src/main/java/bisq/asset/tokens/Movement.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.tokens; - -import bisq.asset.Erc20Token; - -public class Movement extends Erc20Token { - - public Movement() { - super("The Movement", "MVT"); - } -} diff --git a/assets/src/main/java/bisq/asset/tokens/MyceliumToken.java b/assets/src/main/java/bisq/asset/tokens/MyceliumToken.java deleted file mode 100644 index cc6642f49d..0000000000 --- a/assets/src/main/java/bisq/asset/tokens/MyceliumToken.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.tokens; - -import bisq.asset.Erc20Token; - -public class MyceliumToken extends Erc20Token { - - public MyceliumToken() { - super("Mycelium Token", "MT"); - } -} diff --git a/assets/src/main/java/bisq/asset/tokens/PascalCoin.java b/assets/src/main/java/bisq/asset/tokens/PascalCoin.java deleted file mode 100644 index d044112f1f..0000000000 --- a/assets/src/main/java/bisq/asset/tokens/PascalCoin.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.tokens; - -import bisq.asset.Erc20Token; - -public class PascalCoin extends Erc20Token { - - public PascalCoin() { - super("Pascal Coin", "PASC"); - } -} diff --git a/assets/src/main/java/bisq/asset/tokens/PiedPiperCoin.java b/assets/src/main/java/bisq/asset/tokens/PiedPiperCoin.java deleted file mode 100644 index 873c3cb1a5..0000000000 --- a/assets/src/main/java/bisq/asset/tokens/PiedPiperCoin.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.tokens; - -import bisq.asset.Erc20Token; - -public class PiedPiperCoin extends Erc20Token { - - public PiedPiperCoin() { - super("Pied Piper Coin", "PPI"); - } -} diff --git a/assets/src/main/java/bisq/asset/tokens/Qwark.java b/assets/src/main/java/bisq/asset/tokens/Qwark.java deleted file mode 100644 index e09490bb22..0000000000 --- a/assets/src/main/java/bisq/asset/tokens/Qwark.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.tokens; - -import bisq.asset.Erc20Token; - -public class Qwark extends Erc20Token { - - public Qwark() { - super("Qwark", "QWARK"); - } -} diff --git a/assets/src/main/java/bisq/asset/tokens/RefToken.java b/assets/src/main/java/bisq/asset/tokens/RefToken.java deleted file mode 100644 index 5bdadeb1dc..0000000000 --- a/assets/src/main/java/bisq/asset/tokens/RefToken.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.tokens; - -import bisq.asset.Erc20Token; - -public class RefToken extends Erc20Token { - - public RefToken() { - super("RefToken", "REF"); - } -} diff --git a/assets/src/main/java/bisq/asset/tokens/SosCoin.java b/assets/src/main/java/bisq/asset/tokens/SosCoin.java deleted file mode 100644 index 44f6ff2c2b..0000000000 --- a/assets/src/main/java/bisq/asset/tokens/SosCoin.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.tokens; - -import bisq.asset.Erc20Token; - -public class SosCoin extends Erc20Token { - - public SosCoin() { - super("SOS Coin", "SOS"); - } -} diff --git a/assets/src/main/java/bisq/asset/tokens/Verify.java b/assets/src/main/java/bisq/asset/tokens/Verify.java deleted file mode 100644 index bff0aa6250..0000000000 --- a/assets/src/main/java/bisq/asset/tokens/Verify.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.tokens; - -import bisq.asset.Erc20Token; - -public class Verify extends Erc20Token { - - public Verify() { - super("Verify", "CRED"); - } -} diff --git a/assets/src/main/java/bisq/asset/tokens/WildToken.java b/assets/src/main/java/bisq/asset/tokens/WildToken.java deleted file mode 100644 index a289dcad88..0000000000 --- a/assets/src/main/java/bisq/asset/tokens/WildToken.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.tokens; - -import bisq.asset.Erc20Token; - -public class WildToken extends Erc20Token { - - public WildToken() { - super("WILD Token", "WILD"); - } -} diff --git a/assets/src/main/resources/META-INF/services/bisq.asset.Asset b/assets/src/main/resources/META-INF/services/bisq.asset.Asset index 6febb717e9..9811515768 100644 --- a/assets/src/main/resources/META-INF/services/bisq.asset.Asset +++ b/assets/src/main/resources/META-INF/services/bisq.asset.Asset @@ -2,83 +2,48 @@ # Contents are sorted according to the output of `sort --ignore-case --dictionary-order`. # See bisq.asset.Asset and bisq.asset.AssetRegistry for further details. # See https://bisq.network/list-asset for complete instructions. -bisq.asset.coins.Achievecoin bisq.asset.coins.Actinium -bisq.asset.coins.Angelcoin bisq.asset.coins.Aquachain -bisq.asset.coins.Arto bisq.asset.coins.BitCloud bisq.asset.coins.Bitcoin2 bisq.asset.coins.BitcoinCash bisq.asset.coins.BitcoinClashic bisq.asset.coins.BitcoinCore -bisq.asset.coins.BitcoinGold bisq.asset.coins.BitcoinInstant bisq.asset.coins.Bitcoin$Mainnet bisq.asset.coins.Bitcoin$Regtest bisq.asset.coins.Bitcoin$Testnet -bisq.asset.coins.Bitcore -bisq.asset.coins.BitDaric -bisq.asset.coins.BitZeny bisq.asset.coins.Blur bisq.asset.coins.BSQ$Mainnet bisq.asset.coins.BSQ$Regtest bisq.asset.coins.BSQ$Testnet -bisq.asset.coins.Burstcoin bisq.asset.coins.Byteball -bisq.asset.coins.Cagecoin -bisq.asset.coins.CassubianDetk bisq.asset.coins.Chaucha -bisq.asset.coins.Conceal bisq.asset.coins.Counterparty -bisq.asset.coins.Creativecoin bisq.asset.coins.Credits bisq.asset.coins.Croat -bisq.asset.coins.Cryptonite bisq.asset.coins.Cryptonodes bisq.asset.coins.DACash -bisq.asset.coins.DarkNet bisq.asset.coins.Dash$Mainnet bisq.asset.coins.Dash$Regtest bisq.asset.coins.Dash$Testnet -bisq.asset.coins.Decent bisq.asset.coins.Decred -bisq.asset.coins.DeepOnion -bisq.asset.coins.Devcoin -bisq.asset.coins.Diamond -bisq.asset.coins.DigiMoney -bisq.asset.coins.Dinero bisq.asset.coins.Dogecoin bisq.asset.coins.Dragonglass bisq.asset.coins.DRIP -bisq.asset.coins.DSTRA -bisq.asset.coins.DynamicCoin -bisq.asset.coins.Espers bisq.asset.coins.Ether bisq.asset.coins.EtherClassic bisq.asset.coins.FuturoCoin bisq.asset.coins.Graft bisq.asset.coins.Gridcoin -bisq.asset.coins.InfinityEconomics -bisq.asset.coins.Instacash -bisq.asset.coins.InternetOfPeople bisq.asset.coins.Kekcoin -bisq.asset.coins.Kumacoin -bisq.asset.coins.LBRY -bisq.asset.coins.Lisk -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.Loki -bisq.asset.coins.Madbyte -bisq.asset.coins.Madcoin -bisq.asset.coins.MaidSafeCoin bisq.asset.coins.MaxCoin -bisq.asset.coins.Mazacoin bisq.asset.coins.MegaCoin -bisq.asset.coins.MFCoin bisq.asset.coins.MicroCoin bisq.asset.coins.MobitGlobal bisq.asset.coins.Monero @@ -86,79 +51,32 @@ bisq.asset.coins.Motion bisq.asset.coins.Myriadcoin bisq.asset.coins.Namecoin bisq.asset.coins.Nano -bisq.asset.coins.NavCoin -bisq.asset.coins.NEETCOIN bisq.asset.coins.Neos bisq.asset.coins.NewPowerCoin -bisq.asset.coins.Nilu bisq.asset.coins.Nimiq -bisq.asset.coins.NuBits -bisq.asset.coins.Nxt -bisq.asset.coins.Octocoin -bisq.asset.coins.Particl -bisq.asset.coins.PepeCash -bisq.asset.coins.Phore bisq.asset.coins.PIVX -bisq.asset.coins.PostCoin -bisq.asset.coins.Pranacoin bisq.asset.coins.PRiVCY bisq.asset.coins.PZDC bisq.asset.coins.QMCoin bisq.asset.coins.QRL bisq.asset.coins.Radium -bisq.asset.coins.ReddCoin -bisq.asset.coins.Ringo -bisq.asset.coins.Roicoin bisq.asset.coins.Ryo -bisq.asset.coins.SafeFileSystemCoin -bisq.asset.coins.Semux -bisq.asset.coins.Siacoin bisq.asset.coins.Siafund -bisq.asset.coins.Sibcoin bisq.asset.coins.Spectrecoin -bisq.asset.coins.SpeedCash bisq.asset.coins.Starwels -bisq.asset.coins.STEEM -bisq.asset.coins.Stellite -bisq.asset.coins.Strayacoin bisq.asset.coins.SUB1X -bisq.asset.coins.Tamadcoin -bisq.asset.coins.Terracoin bisq.asset.coins.Triton bisq.asset.coins.TurtleCoin -bisq.asset.coins.Ubiq bisq.asset.coins.Unobtanium -bisq.asset.coins.VDinar -bisq.asset.coins.Wacoin bisq.asset.coins.Wavi -bisq.asset.coins.WorldMobileCoin -bisq.asset.coins.Wownero -bisq.asset.coins.Xuez -bisq.asset.coins.Yenten bisq.asset.coins.Zcash bisq.asset.coins.Zcoin bisq.asset.coins.ZenCash bisq.asset.coins.Zero bisq.asset.coins.ZeroOneCoin -bisq.asset.tokens.BetterBetting -bisq.asset.tokens.DaiStablecoin -bisq.asset.tokens.Ellaism bisq.asset.tokens.EtherStone -bisq.asset.tokens.Exceed -bisq.asset.tokens.GeoCoin -bisq.asset.tokens.Grans bisq.asset.tokens.GreenBlockCoin -bisq.asset.tokens.Internext bisq.asset.tokens.LikeCoin -bisq.asset.tokens.Movement -bisq.asset.tokens.MyceliumToken -bisq.asset.tokens.PascalCoin -bisq.asset.tokens.PiedPiperCoin bisq.asset.tokens.Pix bisq.asset.tokens.PixelPropertyToken -bisq.asset.tokens.Qwark -bisq.asset.tokens.RefToken -bisq.asset.tokens.SosCoin bisq.asset.tokens.Tari -bisq.asset.tokens.Verify -bisq.asset.tokens.WildToken diff --git a/assets/src/test/java/bisq/asset/coins/AchievecoinTest.java b/assets/src/test/java/bisq/asset/coins/AchievecoinTest.java deleted file mode 100644 index ccdfe87ccb..0000000000 --- a/assets/src/test/java/bisq/asset/coins/AchievecoinTest.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.AbstractAssetTest; - -import org.junit.Test; - -public class AchievecoinTest extends AbstractAssetTest { - - public AchievecoinTest() { - super(new Achievecoin()); - } - - @Test - public void testValidAddresses() { - assertValidAddress("AciV7ZyJDpCg7kGGmbo97VjgjpVZkXRTMD"); - assertValidAddress("ARhW8anWaZtExdK2cQkBwsvsQZ9TkC9bwH"); - assertValidAddress("AcxpGTWX4zFiD8p8hfYw99RXV7MY2y8hs9"); - } - - @Test - public void testInvalidAddresses() { - assertInvalidAddress("GWaSW6PHfQKBv8EXV3xiqGG2zxKZh4XYNu"); - assertInvalidAddress("AcxpGTWX4zFiD8p8hfY099RXV7MY2y8hs9"); - assertInvalidAddress("17VZNX1SN5NtKa8UQFxwQbFeFc3iqRYhem"); - } -} diff --git a/assets/src/test/java/bisq/asset/coins/AngelcoinTest.java b/assets/src/test/java/bisq/asset/coins/AngelcoinTest.java deleted file mode 100644 index c584261d4d..0000000000 --- a/assets/src/test/java/bisq/asset/coins/AngelcoinTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.AbstractAssetTest; - -import org.junit.Test; - -public class AngelcoinTest extends AbstractAssetTest { - - public AngelcoinTest() { - super(new Angelcoin()); - } - - @Test - public void testValidAddresses() { - assertValidAddress("AQJTNtWcP7opxuR52Lf5vmoQTC8EHQ6GxV"); - assertValidAddress("ALEK7jttmqtx2ZhXHg69Zr426qKBnzYA9E"); - assertValidAddress("AP1egWUthPoYvZL57aBk4RPqUgjG1fJGn6"); - assertValidAddress("AST3zfvPdZ35npxAVC8ABgVCxxDLwTmAHU"); - } - - @Test - public void testInvalidAddresses() { - assertInvalidAddress("1AQJTNtWcP7opxuR52Lf5vmoQTC8EHQ6GxV"); - assertInvalidAddress("1ALEK7jttmqtx2ZhXHg69Zr426qKBnzYA9E"); - assertInvalidAddress("1AP1egWUthPoYvZL57aBk4RPqUgjG1fJGn6"); - } -} diff --git a/assets/src/test/java/bisq/asset/coins/ArtoTest.java b/assets/src/test/java/bisq/asset/coins/ArtoTest.java deleted file mode 100644 index bbd74cbb6d..0000000000 --- a/assets/src/test/java/bisq/asset/coins/ArtoTest.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.AbstractAssetTest; - -import org.junit.Test; - -public class ArtoTest extends AbstractAssetTest { - - public ArtoTest() { - super(new Arto()); - } - - @Test - public void testValidAddresses() { - assertValidAddress("AHT1tiauD1GKvLnSL2RVuug1arn3cvFYw7PX5cUmCkM9MHuBn8yrGoHGHXP8ZV9FUR5Y5ntvhanwCMp8FK5bmLrqKxq7BRj"); - assertValidAddress("AKQqctWaaX3gdtQ54kUZAFhGimquK83i2VEKPituFyZiJnwB5RqRrvtSK24yN8AizhhDvHX8CvkJkRrZtUAYScgRJsDE1jH"); - } - - @Test - public void testInvalidAddresses() { - assertInvalidAddress("AHT1tiauD1GKvLnSL2RVuug1arn3cvFYw7PX5cUmCkM9MHuBn8yrGoHGHXP8ZV9FUR5Y5ntvhanwCMp8FK5bmLrqKxq7BR"); - assertInvalidAddress("BKQqctWaaX3gdtQ54kUZAFhGimquK83i2VEKPituFyZiJnwB5RqRrvtSK24yN8AizhhDvHX8CvkJkRrZtUAYScgRJsDE1jH"); - assertInvalidAddress("AHT1tiauD1GKvLnSL2RVuug1arn3cvFYw7PX5cUmCkM9MHuBn8yrGoHGHXP8ZV9FUR5Y5ntvhanwCMp8FK5bmLrqKxq7BRjy"); - } -} diff --git a/assets/src/test/java/bisq/asset/coins/BitDaricTest.java b/assets/src/test/java/bisq/asset/coins/BitDaricTest.java deleted file mode 100644 index 4face3b721..0000000000 --- a/assets/src/test/java/bisq/asset/coins/BitDaricTest.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.AbstractAssetTest; - -import org.junit.Test; - -public class BitDaricTest extends AbstractAssetTest { - - public BitDaricTest() { - super(new BitDaric()); - } - - @Test - public void testValidAddresses() { - assertValidAddress("RN8spHmkV6ZtRsquaTJMRZJujRQkkDNh2G"); - assertValidAddress("RTD9jtKybd7TeM597t5MkNof84GPka34R7"); - } - - @Test - public void testInvalidAddresses() { - assertInvalidAddress("LAPc1FumbYifKpfBpGbRLuPcLAJwHUxeyu"); - assertInvalidAddress("ROPc1FumbYifKpfBpGbRLuPcLAJwHUxeyu"); - assertInvalidAddress("rN8spHmkV6ZtROquaTJMRZJujRQkkDNh2G"); - assertInvalidAddress("1NxrMzHCjG8X9kqTEZBXUNB5PC58DSXAht"); - } -} diff --git a/assets/src/test/java/bisq/asset/coins/BitZenyTest.java b/assets/src/test/java/bisq/asset/coins/BitZenyTest.java deleted file mode 100644 index 92db58af32..0000000000 --- a/assets/src/test/java/bisq/asset/coins/BitZenyTest.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.AbstractAssetTest; - -import org.junit.Test; - -public class BitZenyTest extends AbstractAssetTest { - - public BitZenyTest() { - super(new BitZeny()); - } - - @Test - public void testValidAddresses() { - assertValidAddress("ZryVTPGwpWMrWiqBhcje9NJJku3RgUmVrH"); - assertValidAddress("3CB2kwzn245gaCSfkc7wbe2Myq2kDuQmpu"); - } - - @Test - public void testInvalidAddresses() { - assertInvalidAddress("ZryVTPGwpWMrWiqBhcje9NJJku3RgUmVrHH"); - assertInvalidAddress("ZryVTPGwpWMrWiqBhcje9NJJku3RgUmVr"); - assertInvalidAddress("3CB2kwzn245gaCSfkc7wbe2Myq2kDuQmpu#"); - } -} diff --git a/assets/src/test/java/bisq/asset/coins/BitcoinGoldTest.java b/assets/src/test/java/bisq/asset/coins/BitcoinGoldTest.java deleted file mode 100644 index d17b8a3c23..0000000000 --- a/assets/src/test/java/bisq/asset/coins/BitcoinGoldTest.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.AbstractAssetTest; - -import org.junit.Test; - -public class BitcoinGoldTest extends AbstractAssetTest { - - public BitcoinGoldTest() { - super(new BitcoinGold()); - } - - @Test - public void testValidAddresses() { - assertValidAddress("AehvQ57Fp168uY592LCUYBbyNEpiRAPufb"); - assertValidAddress("GWaSW6PHfQKBv8EXV3xiqGG2zxKZh4XYNu"); - assertValidAddress("GLpT8yG2kwPMdMfgwekG6tEAa91PSmN4ZC"); - } - - @Test - public void testInvalidAddresses() { - assertInvalidAddress("GVTPWDVJgLxo5ZYSPXPDxE4s7LE5cLRwCc1"); - assertInvalidAddress("1GVTPWDVJgLxo5ZYSPXPDxE4s7LE5cLRwCc"); - assertInvalidAddress("1HQQgsvLTgN9xD9hNmAgAreakzVzQUSLSH"); - } -} diff --git a/assets/src/test/java/bisq/asset/coins/BitcoreTest.java b/assets/src/test/java/bisq/asset/coins/BitcoreTest.java deleted file mode 100644 index 7edc8f0fe7..0000000000 --- a/assets/src/test/java/bisq/asset/coins/BitcoreTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.AbstractAssetTest; - -import org.junit.Test; - -public class BitcoreTest extends AbstractAssetTest { - - public BitcoreTest() { - super(new Bitcore()); - } - - @Test - public void testValidAddresses() { - assertValidAddress("17VZNX1SN5NtKa8UQFxwQbFeFc3iqRYhem"); - assertValidAddress("3EktnHQD7RiAE6uzMj2ZifT9YgRrkSgzQX"); - assertValidAddress("1111111111111111111114oLvT2"); - assertValidAddress("1BitcoinEaterAddressDontSendf59kuE"); - } - - @Test - public void testInvalidAddresses() { - assertInvalidAddress("17VZNX1SN5NtKa8UQFxwQbFeFc3iqRYhemqq"); - assertInvalidAddress("17VZNX1SN5NtKa8UQFxwQbFeFc3iqRYheO"); - assertInvalidAddress("17VZNX1SN5NtKa8UQFxwQbFeFc3iqRYhek#"); - } -} diff --git a/assets/src/test/java/bisq/asset/coins/BurstcoinTest.java b/assets/src/test/java/bisq/asset/coins/BurstcoinTest.java deleted file mode 100644 index b1d6a85443..0000000000 --- a/assets/src/test/java/bisq/asset/coins/BurstcoinTest.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.AbstractAssetWithDefaultValidatorTest; - -public class BurstcoinTest extends AbstractAssetWithDefaultValidatorTest { - - public BurstcoinTest() { - super(new Burstcoin()); - } -} diff --git a/assets/src/test/java/bisq/asset/coins/CagecoinTest.java b/assets/src/test/java/bisq/asset/coins/CagecoinTest.java deleted file mode 100644 index ba1c3227b1..0000000000 --- a/assets/src/test/java/bisq/asset/coins/CagecoinTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.AbstractAssetTest; - -import org.junit.Test; - -public class CagecoinTest extends AbstractAssetTest { - - public CagecoinTest() { - super(new Cagecoin()); - } - - @Test - public void testValidAddresses() { - assertValidAddress("Db97PgfdBDhXk8DmrDhrUPyydTCELn8YSb"); - assertValidAddress("DYV4h7MTsQ91jqzbg94GFAAUbgdK7RZmpG"); - assertValidAddress("Db5y8iKtZ24DqgYpP2G8685vTWEvk3WACC"); - assertValidAddress("DjiQbPuBLJcVYUtzYMuFuzDwDYwb9mVhaK"); - } - - @Test - public void testInvalidAddresses() { - assertInvalidAddress("17VZNX1SN5NtKa8UQFxwQbFeFc3iqRYhemqq"); - assertInvalidAddress("0x2a65Aca4D5fC5B5C859090a6c34d1641353982266"); - assertInvalidAddress("DNkkfdUvkCDiywYE98MTVp9nQJTgeZAiFr"); - } -} diff --git a/assets/src/test/java/bisq/asset/coins/CassubianDetkTest.java b/assets/src/test/java/bisq/asset/coins/CassubianDetkTest.java deleted file mode 100644 index 4ea5f219fe..0000000000 --- a/assets/src/test/java/bisq/asset/coins/CassubianDetkTest.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.AbstractAssetTest; - -import org.junit.Test; - -public class CassubianDetkTest extends AbstractAssetTest { - - public CassubianDetkTest() { - super(new CassubianDetk()); - } - - @Test - public void testValidAddresses() { - assertValidAddress("DM7BjopQ3bGYxSPZ4yhfttxqnDrEkyc3sw"); - assertValidAddress("DB4CaJ81SiT3VtpGC8K1RMirPJZjsmKiZd"); - assertValidAddress("DE7uB1mws1RwYNDPpfEnQ7a4i9tdqqV1Lf"); - assertValidAddress("DJ8FnzVCa8AXEBt5aqPcJubKRzanQKvxkY"); - assertValidAddress("D5QmzfBjwrUyAKtvectJL7kBawfWtwdJqz"); - assertValidAddress("DDRJemKbVtTVV8r2jSG9wevv3JeUj2edAr"); - } - - @Test - public void testInvalidAddresses() { - assertInvalidAddress("17VZNX1SN5NtKa8UQFxwQbFeFc3iqRYhemqq"); - assertInvalidAddress("0x2a65Aca4D5fC5B5C859090a6c34d1641353982266"); - assertInvalidAddress("SSnwqFBiyqK1n4BV7kPX86iesev2NobhEo"); - } -} diff --git a/assets/src/test/java/bisq/asset/coins/ConcealTest.java b/assets/src/test/java/bisq/asset/coins/ConcealTest.java deleted file mode 100644 index 814adb486a..0000000000 --- a/assets/src/test/java/bisq/asset/coins/ConcealTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.AbstractAssetTest; - -import org.junit.Test; - -public class ConcealTest extends AbstractAssetTest { - - public ConcealTest() { - super(new Conceal()); - } - - @Test - public void testValidAddresses() { - assertValidAddress("ccx7EmJzRoQ1CaQKxrJZSL87pT2MEcj2BTVAoznrnaLmUEnvBGSh5RrBngsJS4qa1N8daS7fy6gVgYwj8Ao5H6YQ8vqwDAq8P5"); - assertValidAddress("ccx7Xd3NBbBiQNvv7vMLXmGMHyS8AVB6EhWoHo5EbGfR2Ki9pQnRTfEBt3YxYEVqpUCyJgvPjBYHp8N2yZwA7dqb4PjaGWuvs4"); - assertValidAddress("ccx7XzWDecUfTRKbkXwENTGr53Q9tWNdwGF7C7Nj9ZFybHxEw2DxPeuKgJrzscFKi917SG5wL5AYHGFUrMDqSPnC5Apr8KwbD6"); - } - - @Test - public void testInvalidAddresses() { - assertInvalidAddress("CCX7EmJzRoQ1CaQKxrJZSL87pT2MEcj2BTVAoznrnaLmUEnvBGSh5RrBngsJS4qa1N8daS7fy6gVgYwj8Ao5H6YQ8vqwDAq8P5"); - assertInvalidAddress("ccx6EmJzRoQ1CaQKxrJZSL87pT2MEcj2BTVAoznrnaLmUEnvBGSh5RrBngsJS4qa1N8daS7fy6gVgYwj8Ao5H6YQ8vqwDAq8P5"); - assertInvalidAddress("ccx7EmJzRoQ1CaQKxrJZSL87pT2MEcj2BTVAoznrnaLmUEnvBGSh5RrBngsJS4qa1N8daS7fy6gVgYwj8Ao5H6YQ8vqwDAq8P5x"); - assertInvalidAddress("ccx7EmJzRoQ1CaQKxrJZSL87pT2MEcj2BTVAoznrnaLmUEnvBGSh5RrBngsJS4qa1N8daS7fy6gVgYwj8Ao5H6YQ8vqwDAq8P"); - assertInvalidAddress("ccx7EmJzRoQ1CaQKxrJZSL87pT2MEcj2BTVAoznrnaLmUEnvBGSh5RrBngsJS4qa1N8daS7fy6gVgYwj8Ao5H6YQ8vqwDAq8P0"); - assertInvalidAddress("ccx7EmJzRoQ1CaQKxrJZSL87pT2MEcj2BTVAoznrnaLmUEnvBGSh5RrBngsJS4qa1N8daS7fy6gVgYwj8Ao5H6YQ8vqwDAq8PO"); - assertInvalidAddress("ccx7EmJzRoQ1CaQKxrJZSL87pT2MEcj2BTVAoznrnaLmUEnvBGSh5RrBngsJS4qa1N8daS7fy6gVgYwj8Ao5H6YQ8vqwDAq8PI"); - assertInvalidAddress("ccx7EmJzRoQ1CaQKxrJZSL87pT2MEcj2BTVAoznrnaLmUEnvBGSh5RrBngsJS4qa1N8daS7fy6gVgYwj8Ao5H6YQ8vqwDAq8Pl"); - } -} diff --git a/assets/src/test/java/bisq/asset/coins/CreativecoinTest.java b/assets/src/test/java/bisq/asset/coins/CreativecoinTest.java deleted file mode 100644 index 90d12e4592..0000000000 --- a/assets/src/test/java/bisq/asset/coins/CreativecoinTest.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.AbstractAssetTest; - -import org.junit.Test; - -public class CreativecoinTest extends AbstractAssetTest { - - public CreativecoinTest() { - super(new Creativecoin()); - } - - @Test - public void testValidAddresses() { - assertValidAddress("CGjh99QdHxCE6g9pGUucCJNeUyQPRJr4fE"); - assertValidAddress("FTDYi4GoD3vFYFhEGbuifSZjs6udXVin7B"); - assertValidAddress("361uBxJvmg6f62dMYVM9b7GeR38phkkTyA"); - } - - @Test - public void testInvalidAddresses() { - assertInvalidAddress("C7VZNX1SN5NtKa8UQFxwQbFeFc3iqRYhemqq"); - assertInvalidAddress("F7VZNX1SN5NtKa8UQFxwQbFeFc3iqRYheO"); - assertInvalidAddress("17VZNX1SN5NtKa8UQFxwQbFeFc3iqRYhek#"); - } -} diff --git a/assets/src/test/java/bisq/asset/coins/CryptoniteTest.java b/assets/src/test/java/bisq/asset/coins/CryptoniteTest.java deleted file mode 100644 index 85c3ee7797..0000000000 --- a/assets/src/test/java/bisq/asset/coins/CryptoniteTest.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.AbstractAssetTest; - -import org.junit.Test; - -public class CryptoniteTest extends AbstractAssetTest { - - public CryptoniteTest() { - super(new Cryptonite()); - } - - @Test - public void testValidAddresses() { - assertValidAddress("CT49DTNo5itqYoAD6XTGyTKbe8z5nGY2D5"); - assertValidAddress("CGTta3M4t3yXu8uRgkKvaWd2d8DQvDPnpL"); - assertValidAddress("Cco3zGiEJMyz3wrndEr6wg5cm1oUAbBoR2"); - assertValidAddress("CPzmjGCDEdQuRffmbpkrYQtSiUAm4oZJgt"); - } - - @Test - public void testInvalidAddresses() { - assertInvalidAddress("CT49DTNo5itqYoAD6XTGyTKbe8z5nGY2D4"); - assertInvalidAddress("CGTta3M4t3yXu8uRgkKvaWd2d8DQvDPnpl"); - assertInvalidAddress("Cco3zGiEJMyz3wrndEr6wg5cm1oUAbBoR1"); - assertInvalidAddress("CPzmjGCDEdQuRffmbpkrYQtSiUAm4oZJgT"); - assertInvalidAddress("CT49DTNo5itqYoAD6XTGyTKbe8z5nGY2Da"); - assertInvalidAddress("asdasd"); - assertInvalidAddress("cT49DTNo5itqYoAD6XTGyTKbe8z5nGY2Da"); - assertInvalidAddress("No5itqYoAD6XTGyTKbe8z5nGY2Da"); - } -} diff --git a/assets/src/test/java/bisq/asset/coins/DSTRATest.java b/assets/src/test/java/bisq/asset/coins/DSTRATest.java deleted file mode 100644 index 92a4a69229..0000000000 --- a/assets/src/test/java/bisq/asset/coins/DSTRATest.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.AbstractAssetTest; - -import org.junit.Test; - -public class DSTRATest extends AbstractAssetTest { - - public DSTRATest() { - super(new DSTRA()); - } - - @Test - public void testValidAddresses() { - assertValidAddress("FJ4Mt5BKK3TtB3u1kCHq8TWJ9BZSzbpidY"); - assertValidAddress("fMZictACJc9dKhrMxCKRMkWNpq8Ni2ZBx8"); - } - - @Test - public void testInvalidAddresses() { - assertInvalidAddress("FJ4Mt5BKK3TtB3u1kCHq8TWJ9BZSzbpidYY"); - assertInvalidAddress("FJ4Mt5BKK3TtB3u1kCHq8TWJ9BZSzbpid"); - assertInvalidAddress("fMZictACJc9dKhrMxCKRMkWNpq8Ni2ZBx8#"); - } -} diff --git a/assets/src/test/java/bisq/asset/coins/DarkNetTest.java b/assets/src/test/java/bisq/asset/coins/DarkNetTest.java deleted file mode 100644 index 190854a519..0000000000 --- a/assets/src/test/java/bisq/asset/coins/DarkNetTest.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.AbstractAssetWithDefaultValidatorTest; - -public class DarkNetTest extends AbstractAssetWithDefaultValidatorTest { - - public DarkNetTest() { - super(new DarkNet()); - } -} diff --git a/assets/src/test/java/bisq/asset/coins/DecentTest.java b/assets/src/test/java/bisq/asset/coins/DecentTest.java deleted file mode 100644 index e35b0dcc9a..0000000000 --- a/assets/src/test/java/bisq/asset/coins/DecentTest.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.AbstractAssetTest; - -import org.junit.Test; - -public class DecentTest extends AbstractAssetTest { - - public DecentTest() { - super(new Decent()); - } - - @Test - public void testValidAddresses() { - assertValidAddress("ud6910c2790bda53bcc53cb131f8fa3bf"); - assertValidAddress("decent-account123"); - assertValidAddress("decent.acc-123"); - } - - @Test - public void testInvalidAddresses() { - assertInvalidAddress("my.acc123"); - assertInvalidAddress("123decent"); - assertInvalidAddress("decent_acc"); - assertInvalidAddress("dEcent"); - assertInvalidAddress("dct1"); - assertInvalidAddress("decent-"); - } -} diff --git a/assets/src/test/java/bisq/asset/coins/DeepOnionTest.java b/assets/src/test/java/bisq/asset/coins/DeepOnionTest.java deleted file mode 100644 index d2df11aa38..0000000000 --- a/assets/src/test/java/bisq/asset/coins/DeepOnionTest.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.AbstractAssetTest; - -import org.junit.Test; - -public class DeepOnionTest extends AbstractAssetTest { - - public DeepOnionTest() { - super(new DeepOnion()); - } - - @Test - public void testValidAddresses() { - assertValidAddress("DbkkqXwdiWJNcpfw49f2xzTVEbvL1SYWDm"); - assertValidAddress("DetWWdj7VUTDg1yMhjgRfzvwTf4rRSoywK"); - assertValidAddress("Dr5aiywUzZgYHvrQgrCsk6qhxhFzM8VVUM"); - } - - @Test - public void testInvalidAddresses() { - assertInvalidAddress("17VZNX1SN5NtKa8UQFxwQbFeFc3iqRYhemqq"); - assertInvalidAddress("17VZNX1SN5NtKa8UQFxwQbFeFc3iqRYheO"); - assertInvalidAddress("1HQQgsvLTgN9xD9hNmAgAreakzVzQUSLSH"); - } -} diff --git a/assets/src/test/java/bisq/asset/coins/DevcoinTest.java b/assets/src/test/java/bisq/asset/coins/DevcoinTest.java deleted file mode 100644 index ca8839df88..0000000000 --- a/assets/src/test/java/bisq/asset/coins/DevcoinTest.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.AbstractAssetTest; - -import org.junit.Test; - -public class DevcoinTest extends AbstractAssetTest { - - public DevcoinTest() { - super(new Devcoin()); - } - - @Test - public void testValidAddresses() { - assertValidAddress("1GJt2nDUrVinYyDFJuWMkkK1Urod5nH72F"); - assertValidAddress("1NAU869PAca5sH2ot6UyxxgK6pbTLRknQo"); - assertValidAddress("1HX3cBKe7hYBJd7xh6L4teNT75iLCZsqZJ"); - } - - @Test - public void testInvalidAddresses() { - assertInvalidAddress("21HQQgsvLTgN9xD9hNmAgAreakzVzQUSLSHa"); - assertInvalidAddress("1HQQgsvLTgN9xD9hNmAgAreakzVzQUSLSHs"); - assertInvalidAddress("1HQQgsvLTgN9xD9hNmAgAreakzVzQUSLSH#"); - } -} diff --git a/assets/src/test/java/bisq/asset/coins/DiamondTest.java b/assets/src/test/java/bisq/asset/coins/DiamondTest.java deleted file mode 100644 index 385f30d3e9..0000000000 --- a/assets/src/test/java/bisq/asset/coins/DiamondTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.AbstractAssetTest; - -import org.junit.Test; - -public class DiamondTest extends AbstractAssetTest { - - public DiamondTest() { - super(new Diamond()); - } - - @Test - public void testValidAddresses() { - assertValidAddress("dPZCvVCY9CseU5bhro4Hufh94K27XpMTf7"); - assertValidAddress("dbWDZbHgaK9UzgvdXYibgxgpzkekoQ6fuW"); - assertValidAddress("dGeQ2baUmUA453117VNfTPhQQL7bbfDCwA"); - assertValidAddress("dQqummJgBc5jC1ii1zcbh3dEBHKC3Jpr72"); - } - - @Test - public void testInvalidAddresses() { - assertInvalidAddress("17VZNX1SN5NtKa8UQFxwQbFeFc3iqRYhemqq"); - assertInvalidAddress("17VZNX1SN5NtKa8UQFxwQbFeFc3iqRYheO"); - assertInvalidAddress("17VZNX1SN5NtKa8UQFxwQbFeFc3iqRYhek#"); - } -} diff --git a/assets/src/test/java/bisq/asset/coins/DigiMoneyTest.java b/assets/src/test/java/bisq/asset/coins/DigiMoneyTest.java deleted file mode 100644 index 1db4f9c8e4..0000000000 --- a/assets/src/test/java/bisq/asset/coins/DigiMoneyTest.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.AbstractAssetTest; - -import org.junit.Test; - -public class DigiMoneyTest extends AbstractAssetTest { - - public DigiMoneyTest() { - super(new DigiMoney()); - } - - @Test - public void testValidAddresses() { - assertValidAddress("DvaAgcLKrno2AC7kYhHVDCrkhx2xHFpXUf"); - assertValidAddress("E9p49poRmnuLdnu55bzKe7t48xtYv2bRES"); - } - - @Test - public void testInvalidAddresses() { - assertInvalidAddress("0xmnuL9poRmnuLd55bzKe7t48xtYv2bRES"); - assertInvalidAddress("DvaAgcLKrno2AC7kYhHVDC"); - assertInvalidAddress("19p49poRmnuLdnu55bzKe7t48xtYv2bRES"); - } -} diff --git a/assets/src/test/java/bisq/asset/coins/DineroTest.java b/assets/src/test/java/bisq/asset/coins/DineroTest.java deleted file mode 100644 index fb8789fd46..0000000000 --- a/assets/src/test/java/bisq/asset/coins/DineroTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.AbstractAssetTest; - -import org.junit.Test; - -public class DineroTest extends AbstractAssetTest { - - public DineroTest() { - super(new Dinero()); - } - - @Test - public void testValidAddresses() { - assertValidAddress("DBmvak2TM8GpeiR3ZEVWAHWFZeiw9FG7jK"); - assertValidAddress("DDWit1CcocL2j3CzfmZgz4bx2DE1h8tugv"); - assertValidAddress("DF8D75bjz6i8azUHgmbV3awpn6tni5W43B"); - assertValidAddress("DJquenkkiFVNpF7vVLg2xKnxCjKwnYb6Ay"); - } - - @Test - public void testInvalidAddresses() { - assertInvalidAddress("1QbFeFc3iqRYhemqq7VZNX1SN5NtKa8UQFxw"); - assertInvalidAddress("7rrpfJKZC7t1R2FPKrsvfkcE8KBLuSyVYAjt"); - assertInvalidAddress("QFxwQbFeFc3iqRYhek"); - } -} diff --git a/assets/src/test/java/bisq/asset/coins/DynamicCoinTest.java b/assets/src/test/java/bisq/asset/coins/DynamicCoinTest.java deleted file mode 100644 index 161e8a5134..0000000000 --- a/assets/src/test/java/bisq/asset/coins/DynamicCoinTest.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.AbstractAssetWithDefaultValidatorTest; - -public class DynamicCoinTest extends AbstractAssetWithDefaultValidatorTest { - - public DynamicCoinTest() { - super(new DynamicCoin()); - } -} diff --git a/assets/src/test/java/bisq/asset/coins/EspersTest.java b/assets/src/test/java/bisq/asset/coins/EspersTest.java deleted file mode 100644 index e9eb4cb195..0000000000 --- a/assets/src/test/java/bisq/asset/coins/EspersTest.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.AbstractAssetWithDefaultValidatorTest; - -public class EspersTest extends AbstractAssetWithDefaultValidatorTest { - - public EspersTest() { - super(new Espers()); - } -} diff --git a/assets/src/test/java/bisq/asset/coins/InfinityEconomicsTest.java b/assets/src/test/java/bisq/asset/coins/InfinityEconomicsTest.java deleted file mode 100644 index 44eca8ac6a..0000000000 --- a/assets/src/test/java/bisq/asset/coins/InfinityEconomicsTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.AbstractAssetTest; - -import org.junit.Test; - -public class InfinityEconomicsTest extends AbstractAssetTest { - - public InfinityEconomicsTest() { - super(new InfinityEconomics()); - } - - @Test - public void testValidAddresses() { - assertValidAddress("XIN-FXFA-LR6Y-QZAW-9V4SX"); - assertValidAddress("XIN-JM2U-U4AE-G7WF-3NP9F"); - assertValidAddress("XIN-2223-2222-KB8Y-22222"); - } - - @Test - public void testInvalidAddresses() { - assertInvalidAddress("abcde"); - assertInvalidAddress("XIN-"); - assertInvalidAddress("XIN-FXFA-LR6Y-QZAW-9V4SXA"); - assertInvalidAddress("NIX-FXFA-LR6Y-QZAW-9V4SX"); - assertInvalidAddress("XIN-FXF-LR6Y-QZAW-9V4SX"); - assertInvalidAddress("XIN-FXFA-LR6-QZAW-9V4SX"); - assertInvalidAddress("XIN-FXFA-LR6Y-QZA-9V4SX"); - assertInvalidAddress("XIN-FXFA-LR6Y-QZAW-9V4S"); - } -} diff --git a/assets/src/test/java/bisq/asset/coins/InstacashTest.java b/assets/src/test/java/bisq/asset/coins/InstacashTest.java deleted file mode 100644 index aea01bff90..0000000000 --- a/assets/src/test/java/bisq/asset/coins/InstacashTest.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.AbstractAssetTest; - -import org.junit.Test; - -public class InstacashTest extends AbstractAssetTest { - - public InstacashTest() { - super(new Instacash()); - } - - @Test - public void testValidAddresses() { - assertValidAddress("AYx4EqKhomeMu2CTMx1AHdNMkjv6ygnvji"); - assertValidAddress("AcWyvE7texXcCsPLvW1btXhLimrDMpNdAu"); - assertValidAddress("AMfLeLotcvgaHQW374NmHZgs1qXF8P6kjc"); - } - - @Test - public void testInvalidAddresses() { - assertInvalidAddress("aYzyJYqhnxF738QjqMqTku5Wft7x4GhVCr"); - assertInvalidAddress("DYzyJYqhnxF738QjqMqTku5Wft7x4GhVCr"); - assertInvalidAddress("xYzyJYqhnxF738QjqMqTku5Wft7x4GhVCr"); - assertInvalidAddress("1YzyJYqhnxF738QjqMqTku5Wft7x4GhVCr"); - assertInvalidAddress( - "AYzyJYqhnxF738QjqMqTku5Wft7x4GhVCr5vcz2NZLUDsoXGp5rAFUjKnb7DdkFbLp7aSpejCcC4FTxsVvDxq9YKSprzf"); - } -} diff --git a/assets/src/test/java/bisq/asset/coins/InternetOfPeopleTest.java b/assets/src/test/java/bisq/asset/coins/InternetOfPeopleTest.java deleted file mode 100644 index d607679840..0000000000 --- a/assets/src/test/java/bisq/asset/coins/InternetOfPeopleTest.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.AbstractAssetTest; - -import org.junit.Test; - -public class InternetOfPeopleTest extends AbstractAssetTest { - - public InternetOfPeopleTest() { - super(new InternetOfPeople()); - } - - @Test - public void testValidAddresses() { - assertValidAddress("pKbz7iRUSiUaTgh4UuwQCnc6pWZnyCGWxM"); - assertValidAddress("pAubDQFjUMaR93V4RjHYFh1YW1dzJ9YPW1"); - } - - @Test - public void testInvalidAddresses() { - assertInvalidAddress("17VZNX1SN5NtKa8UQFxwQbFeFc3iqRYhem"); - } -} diff --git a/assets/src/test/java/bisq/asset/coins/KumacoinTest.java b/assets/src/test/java/bisq/asset/coins/KumacoinTest.java deleted file mode 100644 index 7e8e011125..0000000000 --- a/assets/src/test/java/bisq/asset/coins/KumacoinTest.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.AbstractAssetTest; - -import org.junit.Test; - -public class KumacoinTest extends AbstractAssetTest { - - public KumacoinTest() { - super(new Kumacoin()); - } - - @Test - public void testValidAddresses() { - assertValidAddress("KKeZ46ELdrcnB9TT8R7GiU3cdd29gA6mQm"); - assertValidAddress("4FmFUcHecwkepmAtwFZoJGJUnQsLMqKY3k"); - } - - @Test - public void testInvalidAddresses() { - assertInvalidAddress("KKeZ46ELdrcnB9TT8R7GiU3cdd29gA6mQmm"); - assertInvalidAddress("KKeZ46ELdrcnB9TT8R7GiU3cdd29gA6mQ"); - assertInvalidAddress("4FmFUcHecwkepmAtwFZoJGJUnQsLMqKY3k#"); - } -} diff --git a/assets/src/test/java/bisq/asset/coins/LBRYTest.java b/assets/src/test/java/bisq/asset/coins/LBRYTest.java deleted file mode 100644 index d34f134795..0000000000 --- a/assets/src/test/java/bisq/asset/coins/LBRYTest.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.AbstractAssetWithDefaultValidatorTest; - -public class LBRYTest extends AbstractAssetWithDefaultValidatorTest { - - public LBRYTest() { - super(new LBRY()); - } -} diff --git a/assets/src/test/java/bisq/asset/coins/LiskTest.java b/assets/src/test/java/bisq/asset/coins/LiskTest.java deleted file mode 100644 index 50999491ea..0000000000 --- a/assets/src/test/java/bisq/asset/coins/LiskTest.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.AbstractAssetWithDefaultValidatorTest; - -public class LiskTest extends AbstractAssetWithDefaultValidatorTest { - - public LiskTest() { - super(new Lisk()); - } -} diff --git a/assets/src/test/java/bisq/asset/coins/LitecoinExtremeTest.java b/assets/src/test/java/bisq/asset/coins/LitecoinExtremeTest.java deleted file mode 100644 index a3903ef41a..0000000000 --- a/assets/src/test/java/bisq/asset/coins/LitecoinExtremeTest.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * 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 . - */ -package bisq.asset.coins; - -import bisq.asset.AbstractAssetTest; - -import org.junit.Test; - -public class LitecoinExtremeTest extends AbstractAssetTest { - - public LitecoinExtremeTest(){ - super(new LitecoinExtreme()); - } - - @Test - public void testValidAddresses(){ - assertValidAddress("ESLeu9xKjXxNgcTMcgXXZxbSYsMgTtuMN7"); - assertValidAddress("EeC7WvgGovnh1WhuszAs7ywmAdsXhSUNsK"); - assertValidAddress("EX54wDfRkEmhtRhnNvva429UK4W8JAL98j"); - } - - @Test - public void testInvalidAddresses(){ - assertInvalidAddress("EULJtmeDrWpNqNyHy6rhubxY5B8RRF5ZRF1"); - assertInvalidAddress("LEJFUeEcfV5obFAiBsHm2HxJaw3KEb3PD1a"); - assertInvalidAddress(""); - assertInvalidAddress("Ea9XHztCQBTFWNyz4Yneoh7VSFSMF#6oo81"); - assertInvalidAddress("EVCCEVdFNxxbiWDZ7ZGoLEBbi3n2i483ABdsdsdsadfsafdas"); - assertInvalidAddress("EScnDkuPKzhNixJkVrUfytE2U2uVk3nSq9112222"); - assertInvalidAddress("GEc3ZPa5Xza6KuEY8orrfSCTjNGA8cBr6mg"); - assertInvalidAddress("ELwSkdFmd2YMuVtHVk1ywMxY1CiPSXVy9E$%"); - } -} diff --git a/assets/src/test/java/bisq/asset/coins/MFCoinTest.java b/assets/src/test/java/bisq/asset/coins/MFCoinTest.java deleted file mode 100644 index 27fc519a13..0000000000 --- a/assets/src/test/java/bisq/asset/coins/MFCoinTest.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * 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 . - */ -package bisq.asset.coins; - -import bisq.asset.AbstractAssetTest; - -import org.junit.Test; - -public class MFCoinTest extends AbstractAssetTest { - - public MFCoinTest(){ - super(new MFCoin()); - } - - @Test - public void testValidAddresses(){ - assertValidAddress("Mq7aPKf6xrttnB5so1UVpGMpkmbp7hc47r"); - assertValidAddress("MjQdB9QuDj12Mg5steMNyZzWSTBpSbf7nw"); - assertValidAddress("McFK2Tb4TRqzapbfZnwGGRbjGaRogRS8M6"); - } - - @Test - public void testInvalidAddresses(){ - assertInvalidAddress("McFK2Tb4TRqzapbfZnwGGRbjGaRogRS8M"); - assertInvalidAddress("McFK2Tb4TRqzapbfZnwGGRbjGaRogRS8Mwqdwqdqwdqwdqwdwd"); - assertInvalidAddress(""); - assertInvalidAddress("McFK2Tb4TRqzapbfZnwGGRbjGaRogRS8MMMMMM"); - assertInvalidAddress("cFK2Tb4TRqzapbfZnwGGRbjGaRogRS8M"); - assertInvalidAddress("cFK2Tb4TRqzapbfZnwGGRbjGaRog8"); - assertInvalidAddress("McFK2Tb4TRqzapbfZnwGGRbjGaRogRS8M6wefweew"); - assertInvalidAddress("cFK2Tb4TRqzapbfZnwGGRbjGaRogRS8M6wefweew"); - } -} diff --git a/assets/src/test/java/bisq/asset/coins/MadbyteTest.java b/assets/src/test/java/bisq/asset/coins/MadbyteTest.java deleted file mode 100644 index af13b87f0e..0000000000 --- a/assets/src/test/java/bisq/asset/coins/MadbyteTest.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.AbstractAssetTest; - -import org.junit.Test; - -public class MadbyteTest extends AbstractAssetTest { - - public MadbyteTest() { - super(new Madbyte()); - } - - @Test - public void testValidAddresses() { - assertValidAddress("MEvQJ25RDsENWhPHkApDZPXjrFxKUR9mGR"); - assertValidAddress("MMqP3zkuZvHiupEe5DHXjr2NNwhc9EhB2J"); - assertValidAddress("MBegzGWVKWxFk8Eq5NP6veEQAaEnfj3udf"); - } - - @Test - public void testInvalidAddresses() { - assertInvalidAddress("MEvQJ25RDsENWhPHkApDZPXjrFxKUR9mGRs"); - assertInvalidAddress("MMqP3zkuZvHiupEe5DHXjr2NNwhc9EhB2"); - assertInvalidAddress("MBegzGWVKWxFk8Eq5NP6veEQAaEnfj3ud#"); - } -} diff --git a/assets/src/test/java/bisq/asset/coins/MadcoinTest.java b/assets/src/test/java/bisq/asset/coins/MadcoinTest.java deleted file mode 100644 index b618979e90..0000000000 --- a/assets/src/test/java/bisq/asset/coins/MadcoinTest.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.AbstractAssetTest; - -import org.junit.Test; - -public class MadcoinTest extends AbstractAssetTest { - - public MadcoinTest() { - super(new Madcoin()); - } - - @Test - public void testValidAddresses() { - assertValidAddress("mHUisRLQ4vMXrWrVfGfiEHuD3KZqiUNvzH"); - assertValidAddress("mHbicWaTXNJDbeM6KXCit5JcmvMypwpq8T"); - } - - @Test - public void testInvalidAddresses() { - assertInvalidAddress("LzBc4XEFSdzCDcTxAgf6EZXgsZWpztRhe"); - assertInvalidAddress("miCVC7QcY917Cz427qTB"); - assertInvalidAddress("12KYrjTdVGjFMtaxERSk3gphreJ5US8aUP"); - } -} diff --git a/assets/src/test/java/bisq/asset/coins/MaidSafeCoinTest.java b/assets/src/test/java/bisq/asset/coins/MaidSafeCoinTest.java deleted file mode 100644 index dc6306f185..0000000000 --- a/assets/src/test/java/bisq/asset/coins/MaidSafeCoinTest.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.AbstractAssetWithDefaultValidatorTest; - -public class MaidSafeCoinTest extends AbstractAssetWithDefaultValidatorTest { - - public MaidSafeCoinTest() { - super(new MaidSafeCoin()); - } -} diff --git a/assets/src/test/java/bisq/asset/coins/MazacoinTest.java b/assets/src/test/java/bisq/asset/coins/MazacoinTest.java deleted file mode 100644 index 7263dbc943..0000000000 --- a/assets/src/test/java/bisq/asset/coins/MazacoinTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.AbstractAssetTest; - -import org.junit.Test; - -public class MazacoinTest extends AbstractAssetTest { - - public MazacoinTest() { - super(new Mazacoin()); - } - - @Test - public void testValidAddresses() { - assertValidAddress("MQHa9PpncezRRyZ7bMeCi2q5TFgQcxBcxL"); - assertValidAddress("MU7YNFPziMRWxCYG3JXJnSsGjPXQNBfxRa"); - assertValidAddress("MSGqB5FYyaZddVKzEAE4rykvBaLT2XQBb5"); - assertValidAddress("ME8wE7VJTVT8AT4xrB4UM1bBUyEJaqVVh2"); - } - - @Test - public void testInvalidAddresses() { - assertInvalidAddress("17VZNX1SN5NtKa8UQFxwQbFeFc3iqRYhemqq"); - assertInvalidAddress("17VZNX1SN5NtKa8UQFxwQbFeFc3iqRYheO"); - assertInvalidAddress("17VZNX1SN5NtKa8UQFxwQbFeFc3iqRYhek#"); - } -} diff --git a/assets/src/test/java/bisq/asset/coins/NEETCOINTest.java b/assets/src/test/java/bisq/asset/coins/NEETCOINTest.java deleted file mode 100644 index de9dca330d..0000000000 --- a/assets/src/test/java/bisq/asset/coins/NEETCOINTest.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.AbstractAssetTest; - -import org.junit.Test; - -public class NEETCOINTest extends AbstractAssetTest { - - public NEETCOINTest() { - super(new NEETCOIN()); - } - - @Test - public void testValidAddresses() { - assertValidAddress("NW69jcXy7T4cBsjVZ1GVtjNv4XrNa6ZA4o"); - assertValidAddress("nDjqdvK7X7MgPCtyzEukcRm1LxEy7LEZVh"); - } - - @Test - public void testInvalidAddresses() { - assertInvalidAddress("NW69jcXy7T4cBsjVZ1GVtjNv4XrNa6ZA4oo"); - assertInvalidAddress("NW69jcXy7T4cBsjVZ1GVtjNv4XrNa6ZA4"); - assertInvalidAddress("nDjqdvK7X7MgPCtyzEukcRm1LxEy7LEZVh#"); - } -} diff --git a/assets/src/test/java/bisq/asset/coins/NavCoinTest.java b/assets/src/test/java/bisq/asset/coins/NavCoinTest.java deleted file mode 100644 index a03ea2aed2..0000000000 --- a/assets/src/test/java/bisq/asset/coins/NavCoinTest.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.AbstractAssetWithDefaultValidatorTest; - -public class NavCoinTest extends AbstractAssetWithDefaultValidatorTest { - - public NavCoinTest() { - super(new NavCoin()); - } -} diff --git a/assets/src/test/java/bisq/asset/coins/NiluTest.java b/assets/src/test/java/bisq/asset/coins/NiluTest.java deleted file mode 100644 index cf86b279ff..0000000000 --- a/assets/src/test/java/bisq/asset/coins/NiluTest.java +++ /dev/null @@ -1,30 +0,0 @@ -package bisq.asset.coins; - -import bisq.asset.AbstractAssetTest; - -public class NiluTest extends AbstractAssetTest { - - public NiluTest() { - super(new Nilu()); - } - - @Override - public void testValidAddresses() { - assertValidAddress("0x9f5cca390496647b0a9a90803da67af7b9c11eee"); - assertValidAddress("0x9F5CCA390496647B0A9A90803DA67AF7B9C11EEE"); - assertValidAddress("0x9f5cca390496647B0a9A90803Da67af7b9C11EEE"); - assertValidAddress("9f5cca390496647b0a9a90803da67af7b9c11eee"); - assertValidAddress("9F5CCA390496647B0A9A90803DA67AF7B9C11EEE"); - assertValidAddress("9f5cca390496647B0a9A90803Da67af7b9C11EEE"); - } - - @Override - public void testInvalidAddresses() { - assertInvalidAddress("0x9f5xca390496647b0a9a90803da67af7b9c11eee"); - assertInvalidAddress("0x9F5CCA390496647B0A9A90803DA67AF7B9C11EEE22"); - assertInvalidAddress("0x9F5CCA390496647B0A9A90803DA67AF7B9C11EE"); - assertInvalidAddress("0x9F5ccA390496647b0a9A90803Da67AF7B9C11EEe"); - assertInvalidAddress("9F5CCA390496647B0A9A90803DA67AF7B9C11EEE22"); - assertInvalidAddress("9F5CCA390496647B0A9A90803DA67AF7B9C11EE"); - } -} diff --git a/assets/src/test/java/bisq/asset/coins/NuBitsTest.java b/assets/src/test/java/bisq/asset/coins/NuBitsTest.java deleted file mode 100644 index 382ca94cf7..0000000000 --- a/assets/src/test/java/bisq/asset/coins/NuBitsTest.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.AbstractAssetWithDefaultValidatorTest; - -public class NuBitsTest extends AbstractAssetWithDefaultValidatorTest { - - public NuBitsTest() { - super(new NuBits()); - } -} diff --git a/assets/src/test/java/bisq/asset/coins/NxtTest.java b/assets/src/test/java/bisq/asset/coins/NxtTest.java deleted file mode 100644 index a482e0b953..0000000000 --- a/assets/src/test/java/bisq/asset/coins/NxtTest.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.AbstractAssetTest; - -import org.junit.Test; - -public class NxtTest extends AbstractAssetTest { - - public NxtTest() { - super(new Nxt()); - } - - @Test - public void testValidAddresses() { - assertValidAddress("NXT-JM2U-U4AE-G7WF-3NP9F"); - assertValidAddress("NXT-6UNJ-UMFM-Z525-4S24M"); - assertValidAddress("NXT-2223-2222-KB8Y-22222"); - } - - @Test - public void testInvalidAddresses() { - assertInvalidAddress("abcde"); - assertInvalidAddress("NXT-"); - assertInvalidAddress("NXT-JM2U-U4AE-G7WF-3ND9F"); - assertInvalidAddress("NXT-JM2U-U4AE-G7WF-3Np9F"); - assertInvalidAddress("NXT-2222-2222-2222-22222"); - } -} diff --git a/assets/src/test/java/bisq/asset/coins/OctocoinTest.java b/assets/src/test/java/bisq/asset/coins/OctocoinTest.java deleted file mode 100644 index 23029c44a3..0000000000 --- a/assets/src/test/java/bisq/asset/coins/OctocoinTest.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.AbstractAssetTest; - -import org.junit.Test; - -public class OctocoinTest extends AbstractAssetTest { - - public OctocoinTest() { - super(new Octocoin()); - } - - @Test - public void testValidAddresses() { - assertValidAddress("8TP9rh3SH6n9cSLmV22vnSNNw56LKGpLra"); - assertValidAddress("37NwrYsD1HxQW5zfLTuQcUUXGMPvQgzTSn"); - } - - @Test - public void testInvalidAddresses() { - assertInvalidAddress("1ANNa15ZQXAZUgFiqJ2i7Z2DPU2J6hW62i"); - assertInvalidAddress("38NwrYsD1HxQW5zfLT0QcUUXGMPvQgzTSn"); - assertInvalidAddress("8tP9rh3SH6n9cSLmV22vnSNNw56LKGpLrB"); - assertInvalidAddress("8Zbvjr"); - } -} diff --git a/assets/src/test/java/bisq/asset/coins/ParticlTest.java b/assets/src/test/java/bisq/asset/coins/ParticlTest.java deleted file mode 100644 index 9e7a398553..0000000000 --- a/assets/src/test/java/bisq/asset/coins/ParticlTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.AbstractAssetTest; - -import org.junit.Test; - -public class ParticlTest extends AbstractAssetTest { - - public ParticlTest() { - super(new Particl()); - } - - @Test - public void testValidAddresses() { - assertValidAddress("PZdYWHgyhuG7NHVCzEkkx3dcLKurTpvmo6"); - assertValidAddress("RJAPhgckEgRGVPZa9WoGSWW24spskSfLTQ"); - assertValidAddress("PaqMewoBY4vufTkKeSy91su3CNwviGg4EK"); - assertValidAddress("PpWHwrkUKRYvbZbTic57YZ1zjmsV9X9Wu7"); - } - - @Test - public void testInvalidAddresses() { - assertInvalidAddress("17VZNX1SN5NtKa8UQFxwQbFeFc3iqRYhemqq"); - assertInvalidAddress("17VZNX1SN5NtKa8UQFxwQbFeFc3iqRYheO"); - assertInvalidAddress("17VZNX1SN5NtKa8UQFxwQbFeFc3iqRYhek"); - } -} diff --git a/assets/src/test/java/bisq/asset/coins/PepeCashTest.java b/assets/src/test/java/bisq/asset/coins/PepeCashTest.java deleted file mode 100644 index ac5e7c4fcb..0000000000 --- a/assets/src/test/java/bisq/asset/coins/PepeCashTest.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.AbstractAssetWithDefaultValidatorTest; - -public class PepeCashTest extends AbstractAssetWithDefaultValidatorTest { - - public PepeCashTest() { - super(new PepeCash()); - } -} diff --git a/assets/src/test/java/bisq/asset/coins/PhoreTest.java b/assets/src/test/java/bisq/asset/coins/PhoreTest.java deleted file mode 100644 index 2f7ee49c40..0000000000 --- a/assets/src/test/java/bisq/asset/coins/PhoreTest.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.AbstractAssetTest; - -import org.junit.Test; - -public class PhoreTest extends AbstractAssetTest { - - public PhoreTest() { - super(new Phore()); - } - - @Test - public void testValidAddresses() { - assertValidAddress("PJCKDPyvfbf1yV7mYNeJ8Zb47hKRwVPYDj"); - assertValidAddress("PJPmiib7JzMDiMQBBFCz92erB8iUvJqBqt"); - assertValidAddress("PS6yeJnJUD2pe9fpDQvtm4KkLDwCWpa8ub"); - assertValidAddress("PKfuRcjwzKFq3dbqE9gq8Ztxn922W4GZhm"); - } - - @Test - public void testInvalidAddresses() { - assertInvalidAddress("pGXsgFjSMzh1dSqggRvHjPvE3cnwvuXC7s"); - assertInvalidAddress("PKfRRcjwzKFq3dbqE9gq8Ztxn922W4GZhm"); - assertInvalidAddress("PXP75NnwDryYswQb9RaPFBchqLRSvBmDP"); - assertInvalidAddress("PKr3vQ7SkqLELsYGM6qeRumyfPx3366uyU9"); - assertInvalidAddress("PKr3vQ7S"); - assertInvalidAddress("P0r3vQ7SkqLELsYGM6qeRumyfPx3366uyU9"); - } -} diff --git a/assets/src/test/java/bisq/asset/coins/PostCoinTest.java b/assets/src/test/java/bisq/asset/coins/PostCoinTest.java deleted file mode 100644 index 5839b2155d..0000000000 --- a/assets/src/test/java/bisq/asset/coins/PostCoinTest.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.AbstractAssetWithDefaultValidatorTest; - -public class PostCoinTest extends AbstractAssetWithDefaultValidatorTest { - - public PostCoinTest() { - super(new PostCoin()); - } -} diff --git a/assets/src/test/java/bisq/asset/coins/PranacoinTest.java b/assets/src/test/java/bisq/asset/coins/PranacoinTest.java deleted file mode 100644 index d4202f23e6..0000000000 --- a/assets/src/test/java/bisq/asset/coins/PranacoinTest.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.AbstractAssetTest; - -import org.junit.Test; - -public class PranacoinTest extends AbstractAssetTest { - - public PranacoinTest() { - super(new Pranacoin()); - } - - @Test - public void testValidAddresses() { - assertValidAddress("3AB1qXhaU3hK5oAPQfwzN3QkM8LxAgL8vB"); - assertValidAddress("PD57PGdk69yioZ6FD3zFNzVUeJhMf6Kti4"); - } - - @Test - public void testInvalidAddresses() { - assertInvalidAddress("3AB1qXhaU3hK5oAPQfwzN3QkM8LxAgL8v"); - assertInvalidAddress("PD57PGdk69yioZ6FD3zFNzVUeJhMf6Kti42"); - assertInvalidAddress("PD57PGdk69yioZ6FD3zFNzVUeJhMMMKti4"); - assertInvalidAddress("PD57PG"); - } -} diff --git a/assets/src/test/java/bisq/asset/coins/ReddCoinTest.java b/assets/src/test/java/bisq/asset/coins/ReddCoinTest.java deleted file mode 100644 index 3df90a1c4a..0000000000 --- a/assets/src/test/java/bisq/asset/coins/ReddCoinTest.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.AbstractAssetWithDefaultValidatorTest; - -public class ReddCoinTest extends AbstractAssetWithDefaultValidatorTest { - - public ReddCoinTest() { - super(new ReddCoin()); - } -} diff --git a/assets/src/test/java/bisq/asset/coins/RingoTest.java b/assets/src/test/java/bisq/asset/coins/RingoTest.java deleted file mode 100644 index dd59d2e601..0000000000 --- a/assets/src/test/java/bisq/asset/coins/RingoTest.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.AbstractAssetTest; - -import org.junit.Test; - -public class RingoTest extends AbstractAssetTest { - - public RingoTest() { - super(new Ringo()); - } - - @Test - public void testValidAddresses() { - assertValidAddress("RDSLfRn23XQQRDGaPVYCph9zjcHeBPQsXA"); - assertValidAddress("baXqokPfTAqPeGVjP4NWCjg7xohdsrNZ1G"); - } - - @Test - public void testInvalidAddresses() { - assertInvalidAddress("RGZQep8XoEXe6KqZt7rD2YFLxgGTp3nhBTT"); - assertInvalidAddress("RGZQep8XoEXe6KqZt7rD2YFLxgGTp3nhB"); - assertInvalidAddress("baXqokPfTAqPeGVjP4NWCjg7xohdsrNZ1G#"); - } -} diff --git a/assets/src/test/java/bisq/asset/coins/RoicoinTest.java b/assets/src/test/java/bisq/asset/coins/RoicoinTest.java deleted file mode 100644 index 7970354ce9..0000000000 --- a/assets/src/test/java/bisq/asset/coins/RoicoinTest.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.AbstractAssetTest; - -import org.junit.Test; - -public class RoicoinTest extends AbstractAssetTest { - - public RoicoinTest() { - super(new Roicoin()); - } - - @Test - public void testValidAddresses() { - assertValidAddress("RSdzB2mFpQ6cR3HmEopbaRBjrEMWAwXBYn"); - assertValidAddress("RBQN9ybF5JzsPQdsiHMpGfkA5HpwddKvmU"); - } - - @Test - public void testInvalidAddresses() { - assertInvalidAddress("1RBQN9ybF5JzsPQdsiHMpGfkA5HpwddKvmU"); - assertInvalidAddress("RBQN9ybF5JzsPQdsiHMpGfkA5HpwddKvmU1"); - assertInvalidAddress("RBQN9ybF5JzsPQdsiHMpGfkA5HpwddKvmU#"); - } -} diff --git a/assets/src/test/java/bisq/asset/coins/STEEMTest.java b/assets/src/test/java/bisq/asset/coins/STEEMTest.java deleted file mode 100644 index d0f110ff40..0000000000 --- a/assets/src/test/java/bisq/asset/coins/STEEMTest.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.AbstractAssetWithDefaultValidatorTest; - -public class STEEMTest extends AbstractAssetWithDefaultValidatorTest { - - public STEEMTest() { - super(new STEEM()); - } -} diff --git a/assets/src/test/java/bisq/asset/coins/SafeFileSystemCoinTest.java b/assets/src/test/java/bisq/asset/coins/SafeFileSystemCoinTest.java deleted file mode 100644 index d049e89a9f..0000000000 --- a/assets/src/test/java/bisq/asset/coins/SafeFileSystemCoinTest.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.AbstractAssetWithDefaultValidatorTest; - -public class SafeFileSystemCoinTest extends AbstractAssetWithDefaultValidatorTest { - - public SafeFileSystemCoinTest() { - super(new SafeFileSystemCoin()); - } - -} diff --git a/assets/src/test/java/bisq/asset/coins/SemuxTest.java b/assets/src/test/java/bisq/asset/coins/SemuxTest.java deleted file mode 100644 index 2f2ab3c327..0000000000 --- a/assets/src/test/java/bisq/asset/coins/SemuxTest.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.AbstractAssetTest; - -import org.junit.Test; - -public class SemuxTest extends AbstractAssetTest { - - public SemuxTest() { - super(new Semux()); - } - - @Test - public void testValidAddresses() { - assertValidAddress("0x541365fe0818ea0d2d7ab7f7bc79f719f5f72227"); - assertValidAddress("0x1504263ee17446ea5f8b288e1c35d05749c0e47d"); - assertValidAddress("0xe30c510f3efc6e2bf98ff8f725548e6ece568f89"); - } - - @Test - public void testInvalidAddresses() { - assertInvalidAddress("541365fe0818ea0d2d7ab7f7bc79f719f5f72227"); - assertInvalidAddress("0x541365fe0818ea0d2d7ab7f7bc79f719f5f7222"); - assertInvalidAddress("0x541365fe0818ea0d2d7ab7f7bc79f719f5f72227abc"); - } -} diff --git a/assets/src/test/java/bisq/asset/coins/SiacoinTest.java b/assets/src/test/java/bisq/asset/coins/SiacoinTest.java deleted file mode 100644 index 465ba60869..0000000000 --- a/assets/src/test/java/bisq/asset/coins/SiacoinTest.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.AbstractAssetWithDefaultValidatorTest; - -public class SiacoinTest extends AbstractAssetWithDefaultValidatorTest { - - public SiacoinTest() { - super(new Siacoin()); - } -} diff --git a/assets/src/test/java/bisq/asset/coins/SibcoinTest.java b/assets/src/test/java/bisq/asset/coins/SibcoinTest.java deleted file mode 100644 index aa3acea87b..0000000000 --- a/assets/src/test/java/bisq/asset/coins/SibcoinTest.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.AbstractAssetWithDefaultValidatorTest; - -public class SibcoinTest extends AbstractAssetWithDefaultValidatorTest { - - public SibcoinTest() { - super(new Sibcoin()); - } -} diff --git a/assets/src/test/java/bisq/asset/coins/SpeedCashTest.java b/assets/src/test/java/bisq/asset/coins/SpeedCashTest.java deleted file mode 100644 index 9df1f125a3..0000000000 --- a/assets/src/test/java/bisq/asset/coins/SpeedCashTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.AbstractAssetTest; - -import org.junit.Test; - -public class SpeedCashTest extends AbstractAssetTest { - - public SpeedCashTest() { - super(new SpeedCash()); - } - - @Test - public void testValidAddresses() { - assertValidAddress("SNrVzPaFVCQGH4Rdch2EuhoyeWMfgWqk1J"); - assertValidAddress("SXPvGe87gdCFQH8zPU3JdKNGwAa4c6979r"); - assertValidAddress("STGvWjZdkwDeNoYa73cqMrAFFYm5xtJndc"); - assertValidAddress("SVPZMBgDxBVDRisdDZGD1XQwyAz8RBbo3J"); - } - - @Test - public void testInvalidAddresses() { - assertInvalidAddress("SVPZMBgDxBVDRisdDZGD1XQwyAz8RBbo3R"); - assertInvalidAddress("mipcBbFg9gMiCh81Kj8tqqdgoZub1ZJRfn"); - assertInvalidAddress("XLfvvLuwjUrz2kf5gghEmUPFE3vFvwfEiL"); - } -} diff --git a/assets/src/test/java/bisq/asset/coins/StelliteTest.java b/assets/src/test/java/bisq/asset/coins/StelliteTest.java deleted file mode 100644 index 2ea2ec9b95..0000000000 --- a/assets/src/test/java/bisq/asset/coins/StelliteTest.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.AbstractAssetTest; - -import org.junit.Test; - -public class StelliteTest extends AbstractAssetTest { - - public StelliteTest() { - super(new Stellite()); - } - - @Test - public void testValidAddresses() { - assertValidAddress("Se3x7sVdvUnMMn2KoYLyYVHMJGRoB2R3V8K3LYuHAiEXgVac7vsmFiXUC8dSpJnjXDfwytKsQJV6HFH8MjwPagTJ2Aha46RZM"); - assertValidAddress("Se3F51UzpbVVnQRx2VNbcjfBoQJfeuyFF353i1jLnCZda9yVN3vy8csbYCESBvf38TFkchH1C1tMY6XHkC8L678K2vLsVZVMU"); - } - - @Test - public void testInvalidAddresses() { - assertInvalidAddress("Se3x7svUnMMn2KoYLyYVHMJGRoB2R3V8K3LYuHAiEXgVac7vsmFiXUC8dSpJnjXDfwytKsQJV6HFH8MjwPagTJ2Aha46RZM"); - assertInvalidAddress("SX45GjRnvqheAgCpx4nJeKRjDtS5tYawxEP1GaTj79dTEm21Dtdxex6EHyDqBpofoDqW9k9uQWtkGgbbF8kiRSZ27AksBg7G111"); - assertInvalidAddress("Se3F51UzpbVVnQRx2VNbcjfBoQJfeuyFF353i1jLnCZda9yVN3vy8csbYCESBvf38TFkchH1C1tMY6XHkC8L678K2vLsVZVMUII"); - } -} diff --git a/assets/src/test/java/bisq/asset/coins/StrayacoinTest.java b/assets/src/test/java/bisq/asset/coins/StrayacoinTest.java deleted file mode 100644 index 514bf0dac9..0000000000 --- a/assets/src/test/java/bisq/asset/coins/StrayacoinTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.AbstractAssetTest; - -import org.junit.Test; - -public class StrayacoinTest extends AbstractAssetTest { - - public StrayacoinTest() { - super(new Strayacoin()); - } - - @Test - public void testValidAddresses() { - assertValidAddress("SZHa3vS9ctDJwx3BziaqgN3zQMkYpgyP7f"); - assertValidAddress("SefAdKgyqdg7wd1emhFynPs44d1b2Ca2U1"); - assertValidAddress("SSw6555umxHsPZgE96KoyiEVY3CDuJRBQc"); - assertValidAddress("SYwJ6aXQkmt3ExuaXBSCmyiHRn8fUpxXUi"); - } - - @Test - public void testInvalidAddresses() { - assertInvalidAddress("17VZNX1SN5NtKa8UQFxwQbFeFc3iqRYhemqq"); - assertInvalidAddress("0x2a65Aca4D5fC5B5C859090a6c34d1641353982266"); - assertInvalidAddress("DNkkfdUvkCDiywYE98MTVp9nQJTgeZAiFr"); - } -} diff --git a/assets/src/test/java/bisq/asset/coins/TamadcoinTest.java b/assets/src/test/java/bisq/asset/coins/TamadcoinTest.java deleted file mode 100644 index 32989a1c7b..0000000000 --- a/assets/src/test/java/bisq/asset/coins/TamadcoinTest.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.AbstractAssetTest; - -import org.junit.Test; - -public class TamadcoinTest extends AbstractAssetTest { - - public TamadcoinTest() { - super(new Tamadcoin()); - } - - @Test - public void testValidAddresses() { - assertValidAddress("axRpWzdirPe7njtxevGCzhUoDZnsa3ncdHyiebYcDqGwXR6R5CyAa79c3SBHoiuQCYa6aUoARJ3b7FyeGHKDJLoq2es9JwJXd"); - assertValidAddress("axR311K1J6GRmCXmFaegZdc7v4Nv5f3c5Hv6bK84txRMGqeNbuVrr15c3SBHoiuQCYa6aUoARJ3b7FyeGHKDJLoq2es5dqYJy"); - } - - @Test - public void testInvalidAddresses() { - assertInvalidAddress("axxB2nfaZ4WLJYXo1p3oGT7NJW2FozRem4YeXj53cbtYA8LwBtusHEoc3SBHoiuQCYa6aUoAKDJLoq2es7hGxPk"); - assertInvalidAddress("asxbELtSdGgcLos9nW4A8aUezxNykDpoL1hARS2s3NaNWMMyJRSNhEfc3SBHoiuQCYa6aUoARJ3b7FyeGHKDJLoq2es7bfLJ1"); - assertInvalidAddress("SxRSb2PovsKLS4JaVXEdH4gQfEhCLFcykYUnsRPtxa"); - } -} diff --git a/assets/src/test/java/bisq/asset/coins/TerracoinTest.java b/assets/src/test/java/bisq/asset/coins/TerracoinTest.java deleted file mode 100644 index d28a802bb7..0000000000 --- a/assets/src/test/java/bisq/asset/coins/TerracoinTest.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.AbstractAssetTest; - -import org.junit.Test; - -public class TerracoinTest extends AbstractAssetTest { - - public TerracoinTest() { - super(new Terracoin()); - } - - @Test - public void testValidAddresses() { - assertValidAddress("1Bys8pZaKo4GTWcpArMg92cBgYqij8mKXt"); - assertValidAddress("12Ycuof6g5GRyWy56eQ3NvJpwAM8z9pb4g"); - assertValidAddress("1DEBTTVCn1h9bQS9scVP6UjoSsjbtJBvXF"); - assertValidAddress("18s142HdWDfDQXYBpuyMvsU3KHwryLxnCr"); - } - - @Test - public void testInvalidAddresses() { - assertInvalidAddress("18s142HdWDfDQXYBpyuMvsU3KHwryLxnCr"); - assertInvalidAddress("18s142HdWDfDQXYBpuyMvsU3KHwryLxnC"); - assertInvalidAddress("8s142HdWDfDQXYBpuyMvsU3KHwryLxnCr"); - assertInvalidAddress("18s142HdWDfDQXYBuyMvsU3KHwryLxnCr"); - assertInvalidAddress("1asdasd"); - assertInvalidAddress("asdasd"); - } -} diff --git a/assets/src/test/java/bisq/asset/coins/UbiqTest.java b/assets/src/test/java/bisq/asset/coins/UbiqTest.java deleted file mode 100644 index 013891329b..0000000000 --- a/assets/src/test/java/bisq/asset/coins/UbiqTest.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.AbstractAssetTest; - -import org.junit.Test; - -public class UbiqTest extends AbstractAssetTest { - - public UbiqTest() { - super(new Ubiq()); - } - - @Test - public void testValidAddresses() { - assertValidAddress("0x2a65Aca4D5fC5B5C859090a6c34d164135398226"); - assertValidAddress("2a65Aca4D5fC5B5C859090a6c34d164135398226"); - } - - @Test - public void testInvalidAddresses() { - assertInvalidAddress("0x2a65Aca4D5fC5B5C859090a6c34d1641353982266"); - assertInvalidAddress("0x2a65Aca4D5fC5B5C859090a6c34d16413539822g"); - assertInvalidAddress("2a65Aca4D5fC5B5C859090a6c34d16413539822g"); - } -} diff --git a/assets/src/test/java/bisq/asset/coins/VDinarTest.java b/assets/src/test/java/bisq/asset/coins/VDinarTest.java deleted file mode 100644 index 51f83b1bfa..0000000000 --- a/assets/src/test/java/bisq/asset/coins/VDinarTest.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.AbstractAssetTest; - -import org.junit.Test; - -public class VDinarTest extends AbstractAssetTest { - - public VDinarTest() { - super(new VDinar()); - } - - @Test - public void testValidAddresses() { - assertValidAddress("DG1KpSsSXd3uitgwHaA1i6T1Bj1hWEwAxB"); - assertValidAddress("DPEfTj1C9tTKEqkLPUwtUtCZHd7ViedBmZ"); - assertValidAddress("DLzjxv6Rk9hMYEFHBLqvyT8pkfS43u9Md5"); - assertValidAddress("DHexLqYt4ooDDnpmfEMSa1oJBbaZBxURZH"); - assertValidAddress("DHPybrRc2iqeE4aU8mmXKf8v38JTDyH2V9"); - } - - @Test - public void testInvalidAddresses() { - assertInvalidAddress("17VZNX1SN5NtKa8UQFxwQbFeFc3iqRYhemqq"); - assertInvalidAddress("3CDJNfdWX8m2NwuGUV3nhXHXEeLygMXoAj"); - assertInvalidAddress("DG1KpSsSXd3uitgwHaA1i6T1BjSHORTER"); - assertInvalidAddress("DG1KpSsSXd3uitgwHaA1i6T1Bj1hWLONGER"); - assertInvalidAddress("HG1KpSsSXd3uitgwHaA1i6T1Bj1hWEwAxB"); - } -} diff --git a/assets/src/test/java/bisq/asset/coins/WacoinTest.java b/assets/src/test/java/bisq/asset/coins/WacoinTest.java deleted file mode 100644 index 44768a1499..0000000000 --- a/assets/src/test/java/bisq/asset/coins/WacoinTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.AbstractAssetTest; - -import org.junit.Test; - -public class WacoinTest extends AbstractAssetTest { - - public WacoinTest() { - super(new Wacoin()); - } - - @Test - public void testValidAddresses() { - assertValidAddress("WfEnB3VGrBqW7uamJMymymEwxMBYQKELKY"); - assertValidAddress("WTLWtNN5iJJQyTeMfZMMrfrDvdGZrYGP5U"); - assertValidAddress("WemK3MgwREsEaF4vdtYLxmMqAXp49C2LYQ"); - assertValidAddress("WZggcFY5cJdAxx9unBW5CVPAH8VLTxZ6Ym"); - } - - @Test - public void testInvalidAddresses() { - assertInvalidAddress("abcde"); - assertInvalidAddress("mWvZ7nZAUzpRMFp2Bfjxz27Va47nUfB79E"); - assertInvalidAddress("WemK3MgwREsE23fgsadtYLxmMqAX9C2LYQ"); - } -} diff --git a/assets/src/test/java/bisq/asset/coins/WorldMobileCoinTest.java b/assets/src/test/java/bisq/asset/coins/WorldMobileCoinTest.java deleted file mode 100644 index 7bb059d50e..0000000000 --- a/assets/src/test/java/bisq/asset/coins/WorldMobileCoinTest.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.AbstractAssetTest; - -import org.junit.Test; - -public class WorldMobileCoinTest extends AbstractAssetTest { - - public WorldMobileCoinTest() { - super(new WorldMobileCoin()); - } - - @Test - public void testValidAddresses() { - assertValidAddress("wc1qke2es507uz0dcfx7eyvlfuemwys8xem48vp5rw"); - assertValidAddress("wc1qlwsfmqswjnnv20quv203lnksjrgsww3mjhd349"); - assertValidAddress("Wmpfed6ykt9YsFxhGri5KJvKc3r7BC1rVQ"); - assertValidAddress("WSSqzNJvc4X4xWW6WDyUk1oWEeLx45vyRh"); - assertValidAddress("XWJk3GEuNFEn3dGFCi7vTzVuydeGQA9Fnq"); - assertValidAddress("XG1Mc7XvvpR1wQvjeikZwHAjwLvCWQD35u"); - } - - @Test - public void testInvalidAddresses() { - assertInvalidAddress("wc1qke2es507uz0dcfx7eyvlfuemwys8xem48vp5rx"); - assertInvalidAddress("Wmpfed6ykt9YsFxhGri5KJvKc3r7BC1rvq"); - assertInvalidAddress("XWJk3GEuNFEn3dGFCi7vTzVuydeGQA9FNQ"); - assertInvalidAddress("0123456789Abcdefghijklmnopqrstuvwxyz"); - } -} diff --git a/assets/src/test/java/bisq/asset/coins/WowneroTest.java b/assets/src/test/java/bisq/asset/coins/WowneroTest.java deleted file mode 100644 index 9a0d316185..0000000000 --- a/assets/src/test/java/bisq/asset/coins/WowneroTest.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * 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 . - */ - -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"); - } -} diff --git a/assets/src/test/java/bisq/asset/coins/XuezTest.java b/assets/src/test/java/bisq/asset/coins/XuezTest.java deleted file mode 100644 index 48a01e7389..0000000000 --- a/assets/src/test/java/bisq/asset/coins/XuezTest.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.AbstractAssetTest; - -import org.junit.Test; - -public class XuezTest extends AbstractAssetTest { - - public XuezTest() { - super(new Xuez()); - } - - @Test - public void testValidAddresses() { - assertValidAddress("XR2vhweAd6iyJcE7bTc89JdthXL7rLwjUt"); - assertValidAddress("XH1p4v6rzVWvWBCwYeVn5CEyPYrrYVWTih"); - } - - @Test - public void testInvalidAddresses() { - assertInvalidAddress("tH1p4v6rzVWvWBCwYeVn5CEyPYrrYVWTih"); - assertInvalidAddress("38NwrYsD1HxQW5zfLT0QcUUXGMPvQgzTSn"); - assertInvalidAddress("0123456789"); - assertInvalidAddress("6H1p4v6rzVWvWBCwYeVn"); - } -} diff --git a/assets/src/test/java/bisq/asset/coins/YentenTest.java b/assets/src/test/java/bisq/asset/coins/YentenTest.java deleted file mode 100644 index e5a9efeea8..0000000000 --- a/assets/src/test/java/bisq/asset/coins/YentenTest.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.coins; - -import bisq.asset.AbstractAssetTest; - -import org.junit.Test; - -public class YentenTest extends AbstractAssetTest { - - public YentenTest() { - super(new Yenten()); - } - - @Test - public void testValidAddresses() { - assertValidAddress("YTgSv7bk5x5p6te3uf3HbUwgnf7zEJM4Jn"); - assertValidAddress("YVz19KtQUfyTP4AJS8sbRBqi7dkGTL2ovd"); - } - - @Test - public void testInvalidAddresses() { - assertInvalidAddress("YiTwGuv3opowtPF5w8LUWBXFmaxc9S68ha"); - assertInvalidAddress("17VZNX1SN5NtKa8UQFxwQbFeFc3iqRYhemqq"); - assertInvalidAddress("YVZNX1SN5NtKa8UQFxwQbFeFc3iqRYheO"); - assertInvalidAddress("YiTwGuv3opowtPF5w8LUWBlFmaxc9S68hz"); - assertInvalidAddress("YiTwGuv3opowtPF5w8LUWB0Fmaxc9S68hz"); - assertInvalidAddress("YiTwGuv3opowtPF5w8LUWBIFmaxc9S68hz"); - } -} diff --git a/assets/src/test/java/bisq/asset/tokens/BetterBettingTest.java b/assets/src/test/java/bisq/asset/tokens/BetterBettingTest.java deleted file mode 100644 index 56107593d6..0000000000 --- a/assets/src/test/java/bisq/asset/tokens/BetterBettingTest.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.tokens; - -import bisq.asset.AbstractAssetTest; - -import org.junit.Test; - -public class BetterBettingTest extends AbstractAssetTest { - - public BetterBettingTest() { - super(new BetterBetting()); - } - - @Test - public void testValidAddresses() { - assertValidAddress("0x2a65Aca4D5fC5B5C859090a6c34d164135398226"); - assertValidAddress("2a65Aca4D5fC5B5C859090a6c34d164135398226"); - } - - @Test - public void testInvalidAddresses() { - assertInvalidAddress("0x2a65Aca4D5fC5B5C859090a6c34d1641353982266"); - assertInvalidAddress("0x2a65Aca4D5fC5B5C859090a6c34d16413539822g"); - assertInvalidAddress("2a65Aca4D5fC5B5C859090a6c34d16413539822g"); - } -} diff --git a/assets/src/test/java/bisq/asset/tokens/DaiStablecoinTest.java b/assets/src/test/java/bisq/asset/tokens/DaiStablecoinTest.java deleted file mode 100644 index d567cce57d..0000000000 --- a/assets/src/test/java/bisq/asset/tokens/DaiStablecoinTest.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.tokens; - -import bisq.asset.AbstractAssetTest; - -import org.junit.Test; - -public class DaiStablecoinTest extends AbstractAssetTest { - - public DaiStablecoinTest() { - super(new DaiStablecoin()); - } - - @Test - public void testValidAddresses() { - assertValidAddress("0x2a65Aca4D5fC5B5C859090a6c34d164135398226"); - assertValidAddress("2a65Aca4D5fC5B5C859090a6c34d164135398226"); - } - - @Test - public void testInvalidAddresses() { - assertInvalidAddress("0x2a65Aca4D5fC5B5C859090a6c34d1641353982266"); - assertInvalidAddress("0x2a65Aca4D5fC5B5C859090a6c34d16413539822g"); - assertInvalidAddress("2a65Aca4D5fC5B5C859090a6c34d16413539822g"); - } -} diff --git a/assets/src/test/java/bisq/asset/tokens/EllaismTest.java b/assets/src/test/java/bisq/asset/tokens/EllaismTest.java deleted file mode 100644 index c98ae2c881..0000000000 --- a/assets/src/test/java/bisq/asset/tokens/EllaismTest.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.tokens; - -import bisq.asset.AbstractAssetTest; - -import org.junit.Test; - -public class EllaismTest extends AbstractAssetTest { - - public EllaismTest() { - super(new Ellaism()); - } - - @Test - public void testValidAddresses() { - assertValidAddress("0x65767ec6d4d3d18a200842352485cdc37cbf3a21"); - assertValidAddress("65767ec6d4d3d18a200842352485cdc37cbf3a21"); - } - - @Test - public void testInvalidAddresses() { - assertInvalidAddress("0x65767ec6d4d3d18a200842352485cdc37cbf3a216"); - assertInvalidAddress("0x65767ec6d4d3d18a200842352485cdc37cbf3a2g"); - assertInvalidAddress("65767ec6d4d3d18a200842352485cdc37cbf3a2g"); - } -} diff --git a/assets/src/test/java/bisq/asset/tokens/ExceedTest.java b/assets/src/test/java/bisq/asset/tokens/ExceedTest.java deleted file mode 100644 index 1a40fcd805..0000000000 --- a/assets/src/test/java/bisq/asset/tokens/ExceedTest.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.tokens; - -import bisq.asset.AbstractAssetTest; - -import org.junit.Test; - -public class ExceedTest extends AbstractAssetTest { - - public ExceedTest() { - super(new Exceed()); - } - - @Test - public void testValidAddresses() { - assertValidAddress("0x76EB3aacCC812c3a09Cab6E3BdE1aD9e83848D0D"); - assertValidAddress("0x47fb54fdab801d02672fa39e4a3e0073c2182f4e"); - } - - @Test - public void testInvalidAddresses() { - assertInvalidAddress("0x2a65Aca4D5fC5B5C859090a6c34d1641353982266"); - assertInvalidAddress("0x2a65Aca4D5fC5B5C859090a6c34d16413539822g"); - assertInvalidAddress("2a65Aca4D5fC5B5C859090a6c34d16413539822g"); - } -} diff --git a/assets/src/test/java/bisq/asset/tokens/GeoCoinTest.java b/assets/src/test/java/bisq/asset/tokens/GeoCoinTest.java deleted file mode 100644 index 61254211c7..0000000000 --- a/assets/src/test/java/bisq/asset/tokens/GeoCoinTest.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.tokens; - -import bisq.asset.AbstractAssetTest; - -import org.junit.Test; - -public class GeoCoinTest extends AbstractAssetTest { - - public GeoCoinTest() { - super(new GeoCoin()); - } - - @Test - public void testValidAddresses() { - assertValidAddress("0x2a65Aca4D5fC5B5C859090a6c34d164135398226"); - assertValidAddress("2a65Aca4D5fC5B5C859090a6c34d164135398226"); - } - - @Test - public void testInvalidAddresses() { - assertInvalidAddress("0x2a65Aca4D5fC5B5C859090a6c34d1641353982266"); - assertInvalidAddress("0x2a65Aca4D5fC5B5C859090a6c34d16413539822g"); - assertInvalidAddress("2a65Aca4D5fC5B5C859090a6c34d16413539822g"); - } -} diff --git a/assets/src/test/java/bisq/asset/tokens/GransTest.java b/assets/src/test/java/bisq/asset/tokens/GransTest.java deleted file mode 100644 index 28943e864e..0000000000 --- a/assets/src/test/java/bisq/asset/tokens/GransTest.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.tokens; - -import bisq.asset.AbstractAssetTest; - -import org.junit.Test; - -public class GransTest extends AbstractAssetTest { - - public GransTest() { - super(new Grans()); - } - - @Test - public void testValidAddresses() { - assertValidAddress("0x2a65Aca4D5fC5B5C859090a6c34d164135398226"); - assertValidAddress("2a65Aca4D5fC5B5C859090a6c34d164135398226"); - } - - @Test - public void testInvalidAddresses() { - assertInvalidAddress("0x2a65Aca4D5fC5B5C859090a6c34d1641353982266"); - assertInvalidAddress("0x2a65Aca4D5fC5B5C859090a6c34d16413539822g"); - assertInvalidAddress("2a65Aca4D5fC5B5C859090a6c34d16413539822g"); - } -} diff --git a/assets/src/test/java/bisq/asset/tokens/InternextTest.java b/assets/src/test/java/bisq/asset/tokens/InternextTest.java deleted file mode 100644 index 718bbd7e79..0000000000 --- a/assets/src/test/java/bisq/asset/tokens/InternextTest.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.tokens; - -import bisq.asset.AbstractAssetTest; - -import org.junit.Test; - -public class InternextTest extends AbstractAssetTest { - - public InternextTest() { - super(new Internext()); - } - - @Test - public void testValidAddresses() { - assertValidAddress("0x2a65Aca4D5fC5B5C859090a6c34d164135398226"); - assertValidAddress("2a65Aca4D5fC5B5C859090a6c34d164135398226"); - } - - @Test - public void testInvalidAddresses() { - assertInvalidAddress("0x2a65Aca4D5fC5B5C859090a6c34d1641353982266"); - assertInvalidAddress("0x2a65Aca4D5fC5B5C859090a6c34d16413539822g"); - assertInvalidAddress("2a65Aca4D5fC5B5C859090a6c34d16413539822g"); - } -} diff --git a/assets/src/test/java/bisq/asset/tokens/MovementTest.java b/assets/src/test/java/bisq/asset/tokens/MovementTest.java deleted file mode 100644 index c63e59e79b..0000000000 --- a/assets/src/test/java/bisq/asset/tokens/MovementTest.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.tokens; - -import bisq.asset.AbstractAssetTest; - -import org.junit.Test; - -public class MovementTest extends AbstractAssetTest { - - public MovementTest() { - super(new Ellaism()); - } - - @Test - public void testValidAddresses() { - assertValidAddress("0x2a65Aca4D5fC5B5C859090a6c34d164135398226"); - assertValidAddress("2a65Aca4D5fC5B5C859090a6c34d164135398226"); - } - - @Test - public void testInvalidAddresses() { - assertInvalidAddress("0x2a65Aca4D5fC5B5C859090a6c34d1641353982266"); - assertInvalidAddress("0x2a65Aca4D5fC5B5C859090a6c34d16413539822g"); - assertInvalidAddress("2a65Aca4D5fC5B5C859090a6c34d16413539822g"); - } -} diff --git a/assets/src/test/java/bisq/asset/tokens/MyceliumTokenTest.java b/assets/src/test/java/bisq/asset/tokens/MyceliumTokenTest.java deleted file mode 100644 index 4e268a2659..0000000000 --- a/assets/src/test/java/bisq/asset/tokens/MyceliumTokenTest.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.tokens; - -import bisq.asset.AbstractAssetTest; - -import org.junit.Test; - -public class MyceliumTokenTest extends AbstractAssetTest { - - public MyceliumTokenTest() { - super(new MyceliumToken()); - } - - @Test - public void testValidAddresses() { - assertValidAddress("0x65767ec6d4d3d18a200842352485cdc37cbf3a21"); - assertValidAddress("65767ec6d4d3d18a200842352485cdc37cbf3a21"); - } - - @Test - public void testInvalidAddresses() { - assertInvalidAddress("0x65767ec6d4d3d18a200842352485cdc37cbf3a216"); - assertInvalidAddress("0x65767ec6d4d3d18a200842352485cdc37cbf3a2g"); - assertInvalidAddress("65767ec6d4d3d18a200842352485cdc37cbf3a2g"); - } -} diff --git a/assets/src/test/java/bisq/asset/tokens/PascalCoinTest.java b/assets/src/test/java/bisq/asset/tokens/PascalCoinTest.java deleted file mode 100644 index d7ce0f05a9..0000000000 --- a/assets/src/test/java/bisq/asset/tokens/PascalCoinTest.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.tokens; - -import bisq.asset.AbstractAssetTest; - -import org.junit.Test; - -public class PascalCoinTest extends AbstractAssetTest { - - public PascalCoinTest() { - super(new PascalCoin()); - } - - @Test - public void testValidAddresses() { - assertValidAddress("0x65767ec6d4d3d18a200842352485cdc37cbf3a21"); - assertValidAddress("65767ec6d4d3d18a200842352485cdc37cbf3a21"); - } - - @Test - public void testInvalidAddresses() { - assertInvalidAddress("0x65767ec6d4d3d18a200842352485cdc37cbf3a216"); - assertInvalidAddress("0x65767ec6d4d3d18a200842352485cdc37cbf3a2g"); - assertInvalidAddress("65767ec6d4d3d18a200842352485cdc37cbf3a2g"); - } -} diff --git a/assets/src/test/java/bisq/asset/tokens/PiedPiperCoinTest.java b/assets/src/test/java/bisq/asset/tokens/PiedPiperCoinTest.java deleted file mode 100644 index e839d9997c..0000000000 --- a/assets/src/test/java/bisq/asset/tokens/PiedPiperCoinTest.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.tokens; - -import bisq.asset.AbstractAssetTest; - -import org.junit.Test; - -public class PiedPiperCoinTest extends AbstractAssetTest { - - public PiedPiperCoinTest() { - super(new PiedPiperCoin()); - } - - @Test - public void testValidAddresses() { - assertValidAddress("0x2a65Aca4D5fC5B5C859090a6c34d164135398226"); - assertValidAddress("2a65Aca4D5fC5B5C859090a6c34d164135398226"); - } - - @Test - public void testInvalidAddresses() { - assertInvalidAddress("0x2a65Aca4D5fC5B5C859090a6c34d1641353982266"); - assertInvalidAddress("0x2a65Aca4D5fC5B5C859090a6c34d16413539822g"); - assertInvalidAddress("2a65Aca4D5fC5B5C859090a6c34d16413539822g"); - } -} diff --git a/assets/src/test/java/bisq/asset/tokens/QwarkTest.java b/assets/src/test/java/bisq/asset/tokens/QwarkTest.java deleted file mode 100644 index fbf81e64b8..0000000000 --- a/assets/src/test/java/bisq/asset/tokens/QwarkTest.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.tokens; - -import bisq.asset.AbstractAssetTest; - -import org.junit.Test; - -public class QwarkTest extends AbstractAssetTest { - - public QwarkTest() { - super(new Qwark()); - } - - @Test - public void testValidAddresses() { - assertValidAddress("0x2a65Aca4D5fC5B5C859090a6c34d164135398226"); - assertValidAddress("2a65Aca4D5fC5B5C859090a6c34d164135398226"); - } - - @Test - public void testInvalidAddresses() { - assertInvalidAddress("0x2a65Aca4D5fC5B5C859090a6c34d1641353982266"); - assertInvalidAddress("0x2a65Aca4D5fC5B5C859090a6c34d16413539822g"); - assertInvalidAddress("2a65Aca4D5fC5B5C859090a6c34d16413539822g"); - } -} diff --git a/assets/src/test/java/bisq/asset/tokens/RefTokenTest.java b/assets/src/test/java/bisq/asset/tokens/RefTokenTest.java deleted file mode 100644 index 23cc9a6f38..0000000000 --- a/assets/src/test/java/bisq/asset/tokens/RefTokenTest.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.tokens; - -import bisq.asset.AbstractAssetTest; - -import org.junit.Test; - -public class RefTokenTest extends AbstractAssetTest { - - public RefTokenTest() { - super(new BetterBetting()); - } - - @Test - public void testValidAddresses() { - assertValidAddress("0x2a65Aca4D5fC5B5C859090a6c34d164135398226"); - assertValidAddress("2a65Aca4D5fC5B5C859090a6c34d164135398226"); - } - - @Test - public void testInvalidAddresses() { - assertInvalidAddress("0x2a65Aca4D5fC5B5C859090a6c34d1641353982266"); - assertInvalidAddress("0x2a65Aca4D5fC5B5C859090a6c34d16413539822g"); - assertInvalidAddress("2a65Aca4D5fC5B5C859090a6c34d16413539822g"); - } -} diff --git a/assets/src/test/java/bisq/asset/tokens/SosCoinTest.java b/assets/src/test/java/bisq/asset/tokens/SosCoinTest.java deleted file mode 100644 index 7a105e4057..0000000000 --- a/assets/src/test/java/bisq/asset/tokens/SosCoinTest.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.tokens; - -import bisq.asset.AbstractAssetTest; - -import org.junit.Test; - -public class SosCoinTest extends AbstractAssetTest { - - public SosCoinTest() { - super(new SosCoin()); - } - - @Test - public void testValidAddresses() { - assertValidAddress("0x2a65Aca4D5fC5B5C859090a6c34d164135398226"); - assertValidAddress("2a65Aca4D5fC5B5C859090a6c34d164135398226"); - } - - @Test - public void testInvalidAddresses() { - assertInvalidAddress("0x2a65Aca4D5fC5B5C859090a6c34d1641353982266"); - assertInvalidAddress("0x2a65Aca4D5fC5B5C859090a6c34d16413539822g"); - assertInvalidAddress("2a65Aca4D5fC5B5C859090a6c34d16413539822g"); - } -} diff --git a/assets/src/test/java/bisq/asset/tokens/VerifyTest.java b/assets/src/test/java/bisq/asset/tokens/VerifyTest.java deleted file mode 100644 index 352771cb83..0000000000 --- a/assets/src/test/java/bisq/asset/tokens/VerifyTest.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.tokens; - -import bisq.asset.AbstractAssetTest; - -import org.junit.Test; - -public class VerifyTest extends AbstractAssetTest { - - public VerifyTest() { - super(new Verify()); - } - - @Test - public void testValidAddresses() { - assertValidAddress("0x65767ec6d4d3d18a200842352485cdc37cbf3a21"); - assertValidAddress("65767ec6d4d3d18a200842352485cdc37cbf3a21"); - } - - @Test - public void testInvalidAddresses() { - assertInvalidAddress("0x65767ec6d4d3d18a200842352485cdc37cbf3a216"); - assertInvalidAddress("0x65767ec6d4d3d18a200842352485cdc37cbf3a2g"); - assertInvalidAddress("65767ec6d4d3d18a200842352485cdc37cbf3a2g"); - } -} diff --git a/assets/src/test/java/bisq/asset/tokens/WildTokenTest.java b/assets/src/test/java/bisq/asset/tokens/WildTokenTest.java deleted file mode 100644 index d44c83d3cb..0000000000 --- a/assets/src/test/java/bisq/asset/tokens/WildTokenTest.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * 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 . - */ - -package bisq.asset.tokens; - -import bisq.asset.AbstractAssetTest; - -import org.junit.Test; - -public class WildTokenTest extends AbstractAssetTest { - - public WildTokenTest() { - super(new WildToken()); - } - - @Test - public void testValidAddresses() { - assertValidAddress("0x2a65Aca4D5fC5B5C859090a6c34d164135398226"); - assertValidAddress("2a65Aca4D5fC5B5C859090a6c34d164135398226"); - } - - @Test - public void testInvalidAddresses() { - assertInvalidAddress("0x2a65Aca4D5fC5B5C859090a6c34d1641353982266"); - assertInvalidAddress("0x2a65Aca4D5fC5B5C859090a6c34d16413539822g"); - assertInvalidAddress("2a65Aca4D5fC5B5C859090a6c34d16413539822g"); - } -} From 8aca297edfcdf83f651f92e0d57d51810ca35a4a Mon Sep 17 00:00:00 2001 From: diablax Date: Wed, 7 Nov 2018 03:28:34 -0800 Subject: [PATCH 04/16] List Mask (MASK) --- .../asset/CryptonoteAddressValidator.java | 2 +- .../src/main/java/bisq/asset/coins/Mask.java | 27 +++++++++++ .../META-INF/services/bisq.asset.Asset | 1 + .../test/java/bisq/asset/coins/MaskTest.java | 46 +++++++++++++++++++ 4 files changed, 75 insertions(+), 1 deletion(-) create mode 100644 assets/src/main/java/bisq/asset/coins/Mask.java create mode 100644 assets/src/test/java/bisq/asset/coins/MaskTest.java diff --git a/assets/src/main/java/bisq/asset/CryptonoteAddressValidator.java b/assets/src/main/java/bisq/asset/CryptonoteAddressValidator.java index e5ab3c8788..df992f1b05 100644 --- a/assets/src/main/java/bisq/asset/CryptonoteAddressValidator.java +++ b/assets/src/main/java/bisq/asset/CryptonoteAddressValidator.java @@ -60,7 +60,7 @@ public class CryptonoteAddressValidator implements AddressValidator { return AddressValidationResult.validAddress(); } else if (subAddressPrefix.length() == 2 && address.length() == 95 + subAddressPrefix.length()) { - // Aeon & Blur-type subaddress + // Aeon, Mask & Blur-type subaddress return AddressValidationResult.validAddress(); } else { diff --git a/assets/src/main/java/bisq/asset/coins/Mask.java b/assets/src/main/java/bisq/asset/coins/Mask.java new file mode 100644 index 0000000000..9921722215 --- /dev/null +++ b/assets/src/main/java/bisq/asset/coins/Mask.java @@ -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 . + */ + +package bisq.asset.coins; + +import bisq.asset.Coin; +import bisq.asset.CryptonoteAddressValidator; + +public class Mask extends Coin { + public Mask() { + super("Mask", "MASK", new CryptonoteAddressValidator("M", "bT")); + } +} diff --git a/assets/src/main/resources/META-INF/services/bisq.asset.Asset b/assets/src/main/resources/META-INF/services/bisq.asset.Asset index 96349c48e3..3a3f77a9f4 100644 --- a/assets/src/main/resources/META-INF/services/bisq.asset.Asset +++ b/assets/src/main/resources/META-INF/services/bisq.asset.Asset @@ -76,6 +76,7 @@ bisq.asset.coins.Loki bisq.asset.coins.Madbyte bisq.asset.coins.Madcoin bisq.asset.coins.MaidSafeCoin +bisq.asset.coins.Mask bisq.asset.coins.MaxCoin bisq.asset.coins.Mazacoin bisq.asset.coins.MegaCoin diff --git a/assets/src/test/java/bisq/asset/coins/MaskTest.java b/assets/src/test/java/bisq/asset/coins/MaskTest.java new file mode 100644 index 0000000000..66203c5644 --- /dev/null +++ b/assets/src/test/java/bisq/asset/coins/MaskTest.java @@ -0,0 +1,46 @@ +/* + * 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 . + */ + +package bisq.asset.coins; + +import bisq.asset.AbstractAssetTest; + +import org.junit.Test; + +public class MaskTest extends AbstractAssetTest { + + public MaskTest() { + super(new Mask()); + } + + @Test + public void testValidAddresses() { + assertValidAddress("MbxYjp38aUXBuESwsFv8YmRvbQvMhNyJygU6ViLCjM4sUNqFjsHQim9dvzp9p8BVTjdsRkVNrC1Zy3NJRb18hav3CPe5eWn"); + assertValidAddress("MeGcanFnSr4bJFuNoHogCBdDCsqDrNu5njPc1Yh1DfsTUTL5dLbbtE119f4vztxXu6fFCKWRmpqjABdDyGrzMDkhTC38WwS"); + assertValidAddress("bTWEbW8kKVrZkDwyPs5t7BZXotMNyz5UY2QDJ6MjKT7ihA8kNKhoHDqPUiUB7jPxNpXLFkJsgL6TA1fo7yAzVUdm1hTopCocf"); + assertValidAddress("bTXejHgtfTLWzhyz9fHHBDKTWrsM8MKnebZCKeue8mbDWaKRhnQ8VisGRXUgTvUhsDiwX6PxeP5A22DFf5UVEk431Vjt8m3GM"); + } + + @Test + public void testInvalidAddresses() { + assertInvalidAddress(""); + assertInvalidAddress("MsopefFnSr4bJFuNoHogCBdDCsqDrNu5Pc1Yh1DfsTUTL5dLbbtE119f4vztxXu6fFCKWRmpqjABdDyGrzMDkhTC38gWw"); + assertInvalidAddress("MeGcanuyt4bJFuNoHogCBdDCsqDrNu5njPc1Yh1DfsTUTL5dLbbtE119f4vztxXu6fFCKWRmpqujABdDyGrzMDkhTC38WwSx"); + assertInvalidAddress("MrtcanFnSr4bJFuNoHogCBdDCsqDrNu5Pc1Yh1DfsTUTL5dLbbtE119f4vztxXu6fFCKWRmpqjABdDyGrzMDkhTC3rt4vb8Ww"); + assertInvalidAddress("bBXejHgtfTLWzhyz9fHKBDKTWrsM8MKnebZCKeue8mbDWaKRhnQ8VisGRXUgTvUhsDiwX6PxeP5A22DFf5UVEk431Vjt8m3GM"); + } +} From 73fc35413b7ae5291b08fe8751b3f31a4da70b22 Mon Sep 17 00:00:00 2001 From: Florian Reimair Date: Tue, 6 Nov 2018 14:15:00 +0100 Subject: [PATCH 05/16] bumped netlayer to 0.4.7 --- build.gradle | 2 +- gradle/witness/gradle-witness.gradle | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/build.gradle b/build.gradle index 1f75f98c45..0e310a4e30 100644 --- a/build.gradle +++ b/build.gradle @@ -125,7 +125,7 @@ configure(project(':common')) { configure(project(':p2p')) { dependencies { compile project(':common') - compile('com.github.JesusMcCloud.netlayer:tor.native:0.4.2') { + compile('com.github.JesusMcCloud.netlayer:tor.native:0.4.7') { exclude(module: 'slf4j-api') } compile('org.apache.httpcomponents:httpclient:4.5.3') { diff --git a/gradle/witness/gradle-witness.gradle b/gradle/witness/gradle-witness.gradle index 35725cd558..376b0a8cef 100644 --- a/gradle/witness/gradle-witness.gradle +++ b/gradle/witness/gradle-witness.gradle @@ -20,7 +20,7 @@ dependencyVerification { 'de.jensd:fontawesomefx-commons:5539bb3335ecb822dbf928546f57766eeb9f1516cc1417a064b5709629612149', 'com.googlecode.jcsv:jcsv:73ca7d715e90c8d2c2635cc284543b038245a34f70790660ed590e157b8714a2', 'com.github.sarxos:webcam-capture:d960b7ea8ec3ddf2df0725ef214c3fccc9699ea7772df37f544e1f8e4fd665f6', - 'com.github.JesusMcCloud.netlayer:tor.native:de44e782b21838d3426dbff99abbfd1cbb8e5d3f6d5e997441ff4fd8354934fa', + 'com.github.JesusMcCloud.netlayer:tor.native:c4c1ca96e6fbef3325db5d1cf9d6593ede4e6799b9242959fcce6f322cf5713c', 'org.apache.httpcomponents:httpclient:db3d1b6c2d6a5e5ad47577ad61854e2f0e0936199b8e05eb541ed52349263135', 'net.sf.jopt-simple:jopt-simple:6f45c00908265947c39221035250024f2caec9a15c1c8cf553ebeecee289f342', 'org.fxmisc.easybind:easybind:666af296dda6de68751668a62661571b5238ac6f1c07c8a204fc6f902b222aaf', @@ -37,11 +37,11 @@ dependencyVerification { 'com.google.code.findbugs:jsr305:c885ce34249682bc0236b4a7d56efcc12048e6135a5baf7a9cde8ad8cda13fcd', 'com.google.guava:guava:36a666e3b71ae7f0f0dca23654b67e086e6c93d192f60ba5dfd5519db6c288c8', 'com.google.inject:guice:9b9df27a5b8c7864112b4137fd92b36c3f1395bfe57be42fedf2f520ead1a93e', - 'com.github.JesusMcCloud.netlayer:tor:3896950c56a41985f901ff9475524ac162cba18b2d5a0ed39810b20ddaf5128a', - 'org.jetbrains.kotlin:kotlin-stdlib-jdk8:841b021d62fc007ce2883963ff9440d5393fb1f6a0604ed68cd016afcaf02967', - 'com.github.MicroUtils:kotlin-logging:7dbd501cc210d721f730d480c53ee2a6e3c154ae89b07dc7dee224b9c5aca9eb', - 'org.jetbrains.kotlin:kotlin-stdlib-jdk7:bd8cd4e3ef391cd468434747b7939c49e80f8bf4ae10355a65382bfb54fd633c', - 'org.jetbrains.kotlin:kotlin-stdlib:e1c39d27f23a7fe2d3e4ac65e80a53e98fdcf60e07de9d53b8b841c5944fc810', + 'com.github.JesusMcCloud.netlayer:tor:6341e4097534d500218320ba5e9dc1e926df0d913b7c949adc842db815cc8e1f', + 'org.jetbrains.kotlin:kotlin-stdlib-jdk8:b306e0e6735841e31e320bf3260c71d60fc35057cfa87895f23251ee260a64a8', + 'org.jetbrains.kotlin:kotlin-stdlib-jdk7:169ee5879cba8444499243ceea5e6a2cb6ecea5424211cc819f0704501154b35', + 'io.github.microutils:kotlin-logging:4992504fd3c6ecdf9ed10874b9508e758bb908af9e9d7af19a61e9afb6b7e27a', + 'org.jetbrains.kotlin:kotlin-stdlib:f0595b9ed88ddc6fd66bddf68c56c6f2f6c4b17faa51e43e478acad32b05303e', 'org.jetbrains:annotations:ace2a10dc8e2d5fd34925ecac03e4988b2c0f851650c94b8cef49ba1bd111478', 'org.bouncycastle:bcpg-jdk15on:de3355b821fc81dd32e1f3f560d5b3eca1c678fd2400011d0bfc69fb91bcde85', 'commons-io:commons-io:cc6a41dc3eaacc9e440a6bd0d2890b20d36b4ee408fe2d67122f328bb6e01581', From a46328fa4151c091b84ca53ea19174671765072c Mon Sep 17 00:00:00 2001 From: Florian Reimair Date: Wed, 7 Nov 2018 10:07:28 +0100 Subject: [PATCH 06/16] custom torrc file available --- .../network/p2p/network/TorNetworkNode.java | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/p2p/src/main/java/bisq/network/p2p/network/TorNetworkNode.java b/p2p/src/main/java/bisq/network/p2p/network/TorNetworkNode.java index 16adbecdb4..fcd8a08e18 100644 --- a/p2p/src/main/java/bisq/network/p2p/network/TorNetworkNode.java +++ b/p2p/src/main/java/bisq/network/p2p/network/TorNetworkNode.java @@ -32,6 +32,7 @@ import org.berndpruenster.netlayer.tor.NativeTor; import org.berndpruenster.netlayer.tor.Tor; import org.berndpruenster.netlayer.tor.TorCtlException; import org.berndpruenster.netlayer.tor.TorSocket; +import org.berndpruenster.netlayer.tor.Torrc; import com.runjva.sourceforge.jsocks.protocol.Socks5Proxy; @@ -51,6 +52,7 @@ import java.net.Socket; import java.nio.file.Paths; import java.io.File; +import java.io.FileInputStream; import java.io.IOException; import java.util.Date; @@ -242,8 +244,21 @@ public class TorNetworkNode extends NetworkNode { ListenableFuture future = executorService.submit(() -> { try { long ts1 = new Date().getTime(); + + Torrc override = null; + + // check if the user wants to provide his own torrc file + String torrcfile = System.getProperty("torrcfile"); + if(null != torrcfile) { + try { + override = new Torrc(new FileInputStream(new File(torrcfile))); + } catch(IOException e) { + log.error("custom torrc file not found (" + torrcfile + "). Proceeding with defaults."); + } + } + log.info("Starting tor"); - Tor.setDefault(new NativeTor(torDir, bridgeEntries)); + Tor.setDefault(new NativeTor(torDir, bridgeEntries, override)); log.info("\n################################################################\n" + "Tor started after {} ms. Start publishing hidden service.\n" + "################################################################", From 7b07a1585b266a55bfd9796429c8c5d734bbf70e Mon Sep 17 00:00:00 2001 From: Florian Reimair Date: Wed, 7 Nov 2018 10:51:14 +0100 Subject: [PATCH 07/16] custom override of torrc --- .../bisq/network/p2p/network/TorNetworkNode.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/p2p/src/main/java/bisq/network/p2p/network/TorNetworkNode.java b/p2p/src/main/java/bisq/network/p2p/network/TorNetworkNode.java index fcd8a08e18..e9040cd634 100644 --- a/p2p/src/main/java/bisq/network/p2p/network/TorNetworkNode.java +++ b/p2p/src/main/java/bisq/network/p2p/network/TorNetworkNode.java @@ -56,6 +56,7 @@ import java.io.FileInputStream; import java.io.IOException; import java.util.Date; +import java.util.LinkedHashMap; import java.util.List; import java.util.concurrent.TimeUnit; import java.util.stream.Collectors; @@ -257,6 +258,20 @@ public class TorNetworkNode extends NetworkNode { } } + // check if the user wants to temporarily add to the default torrc file + LinkedHashMap tmp = new LinkedHashMap<>(); + System.getProperties().forEach((k, v) -> { + if(((String) k).startsWith("torrc:")) + tmp.put(((String) k).substring(6), (String) v); + }); + if(!tmp.isEmpty()) + // check for custom torrcfile + if(null != override) + // and merge the contents + override = new Torrc(override.getInputStream$tor(), tmp); + else + override = new Torrc(tmp); + log.info("Starting tor"); Tor.setDefault(new NativeTor(torDir, bridgeEntries, override)); log.info("\n################################################################\n" + From 03683a7ecd678baa27c2b8438936cd67076fe70d Mon Sep 17 00:00:00 2001 From: Florian Reimair Date: Wed, 7 Nov 2018 10:53:18 +0100 Subject: [PATCH 08/16] got rid of magic strings --- .../java/bisq/network/p2p/network/TorNetworkNode.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/p2p/src/main/java/bisq/network/p2p/network/TorNetworkNode.java b/p2p/src/main/java/bisq/network/p2p/network/TorNetworkNode.java index e9040cd634..a6cd8757fa 100644 --- a/p2p/src/main/java/bisq/network/p2p/network/TorNetworkNode.java +++ b/p2p/src/main/java/bisq/network/p2p/network/TorNetworkNode.java @@ -71,11 +71,15 @@ import static com.google.common.base.Preconditions.checkArgument; // Run in UserThread public class TorNetworkNode extends NetworkNode { + private static final Logger log = LoggerFactory.getLogger(TorNetworkNode.class); private static final int MAX_RESTART_ATTEMPTS = 5; private static final long SHUT_DOWN_TIMEOUT = 5; + private static final String CONFIG_TORRCPREFIX = "torrc:"; + private static final String CONFIG_TORRCFILE = "torrcfile"; + private HiddenServiceSocket hiddenServiceSocket; private final File torDir; private final BridgeAddressProvider bridgeAddressProvider; @@ -249,7 +253,7 @@ public class TorNetworkNode extends NetworkNode { Torrc override = null; // check if the user wants to provide his own torrc file - String torrcfile = System.getProperty("torrcfile"); + String torrcfile = System.getProperty(CONFIG_TORRCFILE); if(null != torrcfile) { try { override = new Torrc(new FileInputStream(new File(torrcfile))); @@ -261,8 +265,8 @@ public class TorNetworkNode extends NetworkNode { // check if the user wants to temporarily add to the default torrc file LinkedHashMap tmp = new LinkedHashMap<>(); System.getProperties().forEach((k, v) -> { - if(((String) k).startsWith("torrc:")) - tmp.put(((String) k).substring(6), (String) v); + if(((String) k).startsWith(CONFIG_TORRCPREFIX)) + tmp.put(((String) k).substring(CONFIG_TORRCPREFIX.length()), (String) v); }); if(!tmp.isEmpty()) // check for custom torrcfile From 3d53c2584a9159667c96bdea081a667b62cb82f9 Mon Sep 17 00:00:00 2001 From: Florian Reimair Date: Wed, 7 Nov 2018 19:44:17 +0100 Subject: [PATCH 09/16] comply to coding conventions --- .../java/bisq/network/p2p/network/TorNetworkNode.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/p2p/src/main/java/bisq/network/p2p/network/TorNetworkNode.java b/p2p/src/main/java/bisq/network/p2p/network/TorNetworkNode.java index a6cd8757fa..3ec67b5922 100644 --- a/p2p/src/main/java/bisq/network/p2p/network/TorNetworkNode.java +++ b/p2p/src/main/java/bisq/network/p2p/network/TorNetworkNode.java @@ -253,12 +253,12 @@ public class TorNetworkNode extends NetworkNode { Torrc override = null; // check if the user wants to provide his own torrc file - String torrcfile = System.getProperty(CONFIG_TORRCFILE); - if(null != torrcfile) { + String torrcFile = System.getProperty(CONFIG_TORRCFILE); + if(null != torrcFile) { try { - override = new Torrc(new FileInputStream(new File(torrcfile))); + override = new Torrc(new FileInputStream(new File(torrcFile))); } catch(IOException e) { - log.error("custom torrc file not found (" + torrcfile + "). Proceeding with defaults."); + log.error("custom torrc file not found (" + torrcFile + "). Proceeding with defaults."); } } @@ -269,7 +269,7 @@ public class TorNetworkNode extends NetworkNode { tmp.put(((String) k).substring(CONFIG_TORRCPREFIX.length()), (String) v); }); if(!tmp.isEmpty()) - // check for custom torrcfile + // check for custom torrcFile if(null != override) // and merge the contents override = new Torrc(override.getInputStream$tor(), tmp); From 8982f108cb7a62439bac89f637f2394ec77eae46 Mon Sep 17 00:00:00 2001 From: Manfred Karrer Date: Wed, 7 Nov 2018 14:01:58 -0500 Subject: [PATCH 10/16] Support handling of removed assets. - cross check the isCryptoCurrency method if the symbol matches any fiat currency and of both not match consider it still a CC. In case of a removed asset it was returning false before which caused an issue in the trade currency pair showing both sides as BTC. - Show N/A for name in case the asset is not available. The code mostly operates with the ticker symbol which gets stored in the offer, so even an asset is removed traders who have that asset in their account list can trade without problems. Tested create offer, take offer and executing a trade. --- .../java/bisq/core/locale/CurrencyUtil.java | 22 ++++++++++++------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/core/src/main/java/bisq/core/locale/CurrencyUtil.java b/core/src/main/java/bisq/core/locale/CurrencyUtil.java index d9468d634f..f89570a810 100644 --- a/core/src/main/java/bisq/core/locale/CurrencyUtil.java +++ b/core/src/main/java/bisq/core/locale/CurrencyUtil.java @@ -31,7 +31,6 @@ import java.util.List; import java.util.Locale; import java.util.Objects; import java.util.Optional; -import java.util.Set; import java.util.stream.Collectors; import lombok.Getter; @@ -73,12 +72,11 @@ public class CurrencyUtil { } private static List createAllSortedFiatCurrenciesList() { - Set set = CountryUtil.getAllCountries().stream() + return CountryUtil.getAllCountries().stream() .map(country -> getCurrencyByCountryCode(country.code)) - .collect(Collectors.toSet()); - List list = new ArrayList<>(set); - list.sort(TradeCurrency::compareTo); - return list; + .distinct() + .sorted(TradeCurrency::compareTo) + .collect(Collectors.toList()); } public static List getMainFiatCurrencies() { @@ -324,7 +322,14 @@ public class CurrencyUtil { @SuppressWarnings("WeakerAccess") public static boolean isCryptoCurrency(String currencyCode) { - return getCryptoCurrency(currencyCode).isPresent(); + boolean isCCPresent = getCryptoCurrency(currencyCode).isPresent(); + // If we found it we can be sue its a cc + if (isCCPresent) + return true; + + // If we don't have it might be that it was removed from the assetsRegistry, so we cross check if there is + // fiat currency, otherwise we treat it as cc. + return !getFiatCurrency(currencyCode).isPresent(); } public static Optional getCryptoCurrency(String currencyCode) { @@ -351,9 +356,10 @@ public class CurrencyUtil { return new FiatCurrency(currency.getCurrencyCode()); } + public static String getNameByCode(String currencyCode) { if (isCryptoCurrency(currencyCode)) - return getCryptoCurrency(currencyCode).get().getName(); + return getCryptoCurrency(currencyCode).map(TradeCurrency::getName).orElse(Res.get("shared.na")); try { return Currency.getInstance(currencyCode).getDisplayName(); From 4fd86c64e39a5a7d4465310ca1fc0ee598a68cc3 Mon Sep 17 00:00:00 2001 From: Manfred Karrer Date: Wed, 7 Nov 2018 16:31:32 -0500 Subject: [PATCH 11/16] Fix tests and improve the isCryptoCurrency method. - We return true at isCryptoCurrency in those cases: - The code is BTC - The code is found in assetRegistry - If not found we check if we have a fiat currency for that code, if not we treat it as crypto (case of a removed asset) --- .../java/bisq/core/locale/CurrencyUtil.java | 46 +++++++++++++++---- core/src/main/java/bisq/core/offer/Offer.java | 6 +-- .../java/bisq/core/offer/OfferPayload.java | 4 ++ .../offerbook/OfferBookChartViewModel.java | 34 +++++++------- .../main/java/bisq/desktop/util/GUIUtil.java | 19 ++++---- .../OfferBookChartViewModelTest.java | 24 +++++----- .../offerbook/OfferBookListItemMaker.java | 7 ++- .../bisq/desktop/util/BSFormatterTest.java | 2 +- .../java/bisq/desktop/util/GUIUtilTest.java | 4 +- 9 files changed, 91 insertions(+), 55 deletions(-) diff --git a/core/src/main/java/bisq/core/locale/CurrencyUtil.java b/core/src/main/java/bisq/core/locale/CurrencyUtil.java index f89570a810..a0d0547c7c 100644 --- a/core/src/main/java/bisq/core/locale/CurrencyUtil.java +++ b/core/src/main/java/bisq/core/locale/CurrencyUtil.java @@ -321,15 +321,40 @@ public class CurrencyUtil { } @SuppressWarnings("WeakerAccess") + /** + * We return true if it is BTC or any of our currencies available in the assetRegistry. + * For removed assets it would fail as they are not found but we don't want to conclude that they are fiat then. + * As the caller might not deal with the case that a currency can be neither a cryptoCurrency nor Fiat if not found + * we return true as well in case we have no fiat currency for the code. + * + * As we use a boolean result for isCryptoCurrency and isFiatCurrency we do not treat missing currencies correctly. + * To throw an exception might be an option but that will require quite a lot of code change, so we don't do that + * for the moment, but could be considered for the future. Another maybe better option is to introduce a enum which + * contains 3 entries (CryptoCurrency, Fiat, Undefined). + */ public static boolean isCryptoCurrency(String currencyCode) { - boolean isCCPresent = getCryptoCurrency(currencyCode).isPresent(); - // If we found it we can be sue its a cc - if (isCCPresent) + // Some tests call that method with null values. Should be fixed in the tests but to not break them return false. + if (currencyCode == null) + return false; + + // BTC is not part of our assetRegistry so treat it extra here. Other old base currencies (LTC, DOGE, DASH) + // are not supported anymore so we can ignore that case. + if (currencyCode.equals("BTC")) return true; - // If we don't have it might be that it was removed from the assetsRegistry, so we cross check if there is - // fiat currency, otherwise we treat it as cc. - return !getFiatCurrency(currencyCode).isPresent(); + // If we find the code in our assetRegistry we return true. + // It might be that an asset was removed from the assetsRegistry, we deal with such cases below by checking if + // it is a fiat currency + if (getCryptoCurrency(currencyCode).isPresent()) + return true; + + // In case the code is from a removed asset we cross check if there exist a fiat currency with that code, + // if we don't find a fiat currency we treat it as a crypto currency. + if (!getFiatCurrency(currencyCode).isPresent()) + return true; + + // If we would have found a fiat currency we return false + return false; } public static Optional getCryptoCurrency(String currencyCode) { @@ -358,9 +383,12 @@ public class CurrencyUtil { public static String getNameByCode(String currencyCode) { - if (isCryptoCurrency(currencyCode)) - return getCryptoCurrency(currencyCode).map(TradeCurrency::getName).orElse(Res.get("shared.na")); - + if (isCryptoCurrency(currencyCode)) { + // We might not find the name in case we have a call for a removed asset. + // If BTC is the code (used in tests) we also want return Bitcoin as name. + String btcOrRemovedAsset = "BTC".equals(currencyCode) ? "Bitcoin" : Res.get("shared.na"); + return getCryptoCurrency(currencyCode).map(TradeCurrency::getName).orElse(btcOrRemovedAsset); + } try { return Currency.getInstance(currencyCode).getDisplayName(); } catch (Throwable t) { diff --git a/core/src/main/java/bisq/core/offer/Offer.java b/core/src/main/java/bisq/core/offer/Offer.java index 94dee4e058..249080fcf7 100644 --- a/core/src/main/java/bisq/core/offer/Offer.java +++ b/core/src/main/java/bisq/core/offer/Offer.java @@ -418,9 +418,9 @@ public class Offer implements NetworkPayload, PersistablePayload { } public String getCurrencyCode() { - return CurrencyUtil.isCryptoCurrency(offerPayload.getBaseCurrencyCode()) ? - offerPayload.getBaseCurrencyCode() : - offerPayload.getCounterCurrencyCode(); + return offerPayload.getBaseCurrencyCode().equals("BTC") ? + offerPayload.getCounterCurrencyCode() : + offerPayload.getBaseCurrencyCode(); } public long getProtocolVersion() { diff --git a/core/src/main/java/bisq/core/offer/OfferPayload.java b/core/src/main/java/bisq/core/offer/OfferPayload.java index 2988b2f792..d1611b55b6 100644 --- a/core/src/main/java/bisq/core/offer/OfferPayload.java +++ b/core/src/main/java/bisq/core/offer/OfferPayload.java @@ -101,8 +101,12 @@ public final class OfferPayload implements ProtectedStoragePayload, ExpirablePay private final boolean useMarketBasedPrice; private final long amount; private final long minAmount; + + // For fiat offer the baseCurrencyCode is BTC and the counterCurrencyCode is the fiat currency + // For altcoin offers it is the opposite. baseCurrencyCode is the altcoin and the counterCurrencyCode is BTC. private final String baseCurrencyCode; private final String counterCurrencyCode; + private final List arbitratorNodeAddresses; private final List mediatorNodeAddresses; private final String paymentMethodId; diff --git a/desktop/src/main/java/bisq/desktop/main/market/offerbook/OfferBookChartViewModel.java b/desktop/src/main/java/bisq/desktop/main/market/offerbook/OfferBookChartViewModel.java index 4b4c3b22ff..ce4f4d447f 100644 --- a/desktop/src/main/java/bisq/desktop/main/market/offerbook/OfferBookChartViewModel.java +++ b/desktop/src/main/java/bisq/desktop/main/market/offerbook/OfferBookChartViewModel.java @@ -59,6 +59,7 @@ import javafx.collections.ObservableList; import java.util.ArrayList; import java.util.Comparator; import java.util.List; +import java.util.Objects; import java.util.Optional; import java.util.stream.Collectors; @@ -102,10 +103,15 @@ class OfferBookChartViewModel extends ActivatableViewModel { this.formatter = formatter; this.accountAgeWitnessService = accountAgeWitnessService; - Optional tradeCurrencyOptional = CurrencyUtil.getTradeCurrency(preferences.getOfferBookChartScreenCurrencyCode()); - if (tradeCurrencyOptional.isPresent()) - selectedTradeCurrencyProperty.set(tradeCurrencyOptional.get()); - else { + String code = preferences.getOfferBookChartScreenCurrencyCode(); + if (code != null) { + Optional tradeCurrencyOptional = CurrencyUtil.getTradeCurrency(code); + if (tradeCurrencyOptional.isPresent()) + selectedTradeCurrencyProperty.set(tradeCurrencyOptional.get()); + else { + selectedTradeCurrencyProperty.set(GlobalSettings.getDefaultTradeCurrency()); + } + } else { selectedTradeCurrencyProperty.set(GlobalSettings.getDefaultTradeCurrency()); } @@ -117,9 +123,7 @@ class OfferBookChartViewModel extends ActivatableViewModel { list.addAll(c.getAddedSubList()); if (list.stream() .map(OfferBookListItem::getOffer) - .filter(e -> e.getOfferPayload().getCurrencyCode().equals(selectedTradeCurrencyProperty.get().getCode())) - .findAny() - .isPresent()) + .anyMatch(e -> e.getOfferPayload().getCurrencyCode().equals(selectedTradeCurrencyProperty.get().getCode()))) updateChartData(); } @@ -144,15 +148,11 @@ class OfferBookChartViewModel extends ActivatableViewModel { // Don't use a set as we need all entries List tradeCurrencyList = offerBookListItems.stream() .map(e -> { - Optional tradeCurrencyOptional = - CurrencyUtil.getTradeCurrency(e.getOffer().getCurrencyCode()); - if (tradeCurrencyOptional.isPresent()) - return tradeCurrencyOptional.get(); - else - return null; - + String currencyCode = e.getOffer().getCurrencyCode(); + Optional tradeCurrencyOptional = CurrencyUtil.getTradeCurrency(currencyCode); + return tradeCurrencyOptional.orElse(null); }) - .filter(e -> e != null) + .filter(Objects::nonNull) .collect(Collectors.toList()); currencyListItems.updateWithCurrencies(tradeCurrencyList, null); @@ -275,7 +275,7 @@ class OfferBookChartViewModel extends ActivatableViewModel { } private boolean isAnyPricePresent() { - return offerBookListItems.stream().filter(item -> item.getOffer().getPrice() == null).findAny().isPresent(); + return offerBookListItems.stream().anyMatch(item -> item.getOffer().getPrice() == null); } private void updateChartData() { @@ -306,6 +306,8 @@ class OfferBookChartViewModel extends ActivatableViewModel { if (highestBuyPriceOffer.isPresent()) { final Offer offer = highestBuyPriceOffer.get(); maxPlacesForBuyPrice.set(formatPrice(offer, false).length()); + } else { + log.debug("highestBuyPriceOffer not present"); } final Optional highestBuyVolumeOffer = allBuyOffers.stream() diff --git a/desktop/src/main/java/bisq/desktop/util/GUIUtil.java b/desktop/src/main/java/bisq/desktop/util/GUIUtil.java index 75db15a50a..1b2eb5c85d 100644 --- a/desktop/src/main/java/bisq/desktop/util/GUIUtil.java +++ b/desktop/src/main/java/bisq/desktop/util/GUIUtil.java @@ -294,22 +294,19 @@ public class GUIUtil { }; } - public static StringConverter getTradeCurrencyConverter( - String postFixSingle, - String postFixMulti, - Map offerCounts) { - return new StringConverter() { + public static StringConverter getTradeCurrencyConverter(String postFixSingle, + String postFixMulti, + Map offerCounts) { + return new StringConverter<>() { @Override public String toString(TradeCurrency tradeCurrency) { String code = tradeCurrency.getCode(); Optional offerCountOptional = Optional.ofNullable(offerCounts.get(code)); final String displayString; - if (offerCountOptional.isPresent()) { - displayString = CurrencyUtil.getNameAndCode(code) - + " - " + offerCountOptional.get() + " " + (offerCountOptional.get() == 1 ? postFixSingle : postFixMulti); - } else { - displayString = CurrencyUtil.getNameAndCode(code); - } + displayString = offerCountOptional + .map(offerCount -> CurrencyUtil.getNameAndCode(code) + + " - " + offerCount + " " + (offerCount == 1 ? postFixSingle : postFixMulti)) + .orElseGet(() -> CurrencyUtil.getNameAndCode(code)); // http://boschista.deviantart.com/journal/Cool-ASCII-Symbols-214218618 if (code.equals(GUIUtil.SHOW_ALL_FLAG)) return "▶ " + Res.get("list.currency.showAll"); diff --git a/desktop/src/test/java/bisq/desktop/main/market/offerbook/OfferBookChartViewModelTest.java b/desktop/src/test/java/bisq/desktop/main/market/offerbook/OfferBookChartViewModelTest.java index a13b1ce946..b1d83665ed 100644 --- a/desktop/src/test/java/bisq/desktop/main/market/offerbook/OfferBookChartViewModelTest.java +++ b/desktop/src/test/java/bisq/desktop/main/market/offerbook/OfferBookChartViewModelTest.java @@ -91,7 +91,7 @@ public class OfferBookChartViewModelTest { } @Test - public void testMaxCharactersForBuyPrice() { + public void testMaxCharactersForFiatBuyPrice() { OfferBook offerBook = mock(OfferBook.class); PriceFeedService service = mock(PriceFeedService.class); final ObservableList offerBookListItems = FXCollections.observableArrayList(); @@ -103,9 +103,9 @@ public class OfferBookChartViewModelTest { model.activate(); assertEquals(7, model.maxPlacesForBuyPrice.intValue()); offerBookListItems.addAll(make(btcBuyItem.but(with(OfferBookListItemMaker.price, 94016475L)))); - assertEquals(9, model.maxPlacesForBuyPrice.intValue()); + assertEquals(7, model.maxPlacesForBuyPrice.intValue()); offerBookListItems.addAll(make(btcBuyItem.but(with(OfferBookListItemMaker.price, 101016475L)))); - assertEquals(10, model.maxPlacesForBuyPrice.intValue()); + assertEquals(7, model.maxPlacesForBuyPrice.intValue()); } @Test @@ -120,7 +120,7 @@ public class OfferBookChartViewModelTest { } @Test - public void testMaxCharactersForBuyVolume() { + public void testMaxCharactersForFiatBuyVolume() { OfferBook offerBook = mock(OfferBook.class); PriceFeedService service = mock(PriceFeedService.class); final ObservableList offerBookListItems = FXCollections.observableArrayList(); @@ -132,9 +132,9 @@ public class OfferBookChartViewModelTest { model.activate(); assertEquals(4, model.maxPlacesForBuyVolume.intValue()); //0.01 offerBookListItems.addAll(make(btcBuyItem.but(with(OfferBookListItemMaker.amount, 100000000L)))); - assertEquals(5, model.maxPlacesForBuyVolume.intValue()); //10.00 + assertEquals(4, model.maxPlacesForBuyVolume.intValue()); //10.00 offerBookListItems.addAll(make(btcBuyItem.but(with(OfferBookListItemMaker.amount, 22128600000L)))); - assertEquals(7, model.maxPlacesForBuyVolume.intValue()); //2212.86 + assertEquals(4, model.maxPlacesForBuyVolume.intValue()); //2212.86 } @Test @@ -169,7 +169,7 @@ public class OfferBookChartViewModelTest { } @Test - public void testMaxCharactersForSellPrice() { + public void testMaxCharactersForFiatSellPrice() { OfferBook offerBook = mock(OfferBook.class); PriceFeedService service = mock(PriceFeedService.class); final ObservableList offerBookListItems = FXCollections.observableArrayList(); @@ -181,9 +181,9 @@ public class OfferBookChartViewModelTest { model.activate(); assertEquals(7, model.maxPlacesForSellPrice.intValue()); offerBookListItems.addAll(make(btcSellItem.but(with(OfferBookListItemMaker.price, 94016475L)))); - assertEquals(9, model.maxPlacesForSellPrice.intValue()); + assertEquals(7, model.maxPlacesForSellPrice.intValue()); offerBookListItems.addAll(make(btcSellItem.but(with(OfferBookListItemMaker.price, 101016475L)))); - assertEquals(10, model.maxPlacesForSellPrice.intValue()); + assertEquals(7, model.maxPlacesForSellPrice.intValue()); } @Test @@ -198,7 +198,7 @@ public class OfferBookChartViewModelTest { } @Test - public void testMaxCharactersForSellVolume() { + public void testMaxCharactersForFiatSellVolume() { OfferBook offerBook = mock(OfferBook.class); PriceFeedService service = mock(PriceFeedService.class); final ObservableList offerBookListItems = FXCollections.observableArrayList(); @@ -210,8 +210,8 @@ public class OfferBookChartViewModelTest { model.activate(); assertEquals(4, model.maxPlacesForSellVolume.intValue()); //0.01 offerBookListItems.addAll(make(btcSellItem.but(with(OfferBookListItemMaker.amount, 100000000L)))); - assertEquals(5, model.maxPlacesForSellVolume.intValue()); //10.00 + assertEquals(4, model.maxPlacesForSellVolume.intValue()); //10.00 offerBookListItems.addAll(make(btcSellItem.but(with(OfferBookListItemMaker.amount, 22128600000L)))); - assertEquals(7, model.maxPlacesForSellVolume.intValue()); //2212.86 + assertEquals(4, model.maxPlacesForSellVolume.intValue()); //2212.86 } } diff --git a/desktop/src/test/java/bisq/desktop/main/offer/offerbook/OfferBookListItemMaker.java b/desktop/src/test/java/bisq/desktop/main/offer/offerbook/OfferBookListItemMaker.java index e6e7790a64..55b243aa82 100644 --- a/desktop/src/test/java/bisq/desktop/main/offer/offerbook/OfferBookListItemMaker.java +++ b/desktop/src/test/java/bisq/desktop/main/offer/offerbook/OfferBookListItemMaker.java @@ -40,6 +40,8 @@ public class OfferBookListItemMaker { public static final Property direction = new Property<>(); public static final Property useMarketBasedPrice = new Property<>(); public static final Property marketPriceMargin = new Property<>(); + public static final Property baseCurrencyCode = new Property<>(); + public static final Property counterCurrencyCode = new Property<>(); public static final Instantiator OfferBookListItem = lookup -> new OfferBookListItem(make(btcUsdOffer.but( @@ -49,7 +51,10 @@ public class OfferBookListItemMaker { with(OfferMaker.direction, lookup.valueOf(direction, OfferPayload.Direction.BUY)), with(OfferMaker.useMarketBasedPrice, lookup.valueOf(useMarketBasedPrice, false)), with(OfferMaker.marketPriceMargin, lookup.valueOf(marketPriceMargin, 0.0)), - with(OfferMaker.id, lookup.valueOf(id, "1234"))))); + with(OfferMaker.baseCurrencyCode, lookup.valueOf(baseCurrencyCode, "BTC")), + with(OfferMaker.counterCurrencyCode, lookup.valueOf(counterCurrencyCode, "USD")), + with(OfferMaker.id, lookup.valueOf(id, "1234")) + ))); public static final Instantiator OfferBookListItemWithRange = lookup -> new OfferBookListItem(make(btcUsdOffer.but( diff --git a/desktop/src/test/java/bisq/desktop/util/BSFormatterTest.java b/desktop/src/test/java/bisq/desktop/util/BSFormatterTest.java index f33474703b..58ec574b9f 100644 --- a/desktop/src/test/java/bisq/desktop/util/BSFormatterTest.java +++ b/desktop/src/test/java/bisq/desktop/util/BSFormatterTest.java @@ -114,7 +114,7 @@ public class BSFormatterTest { @Test public void testFormatVolume() { - assertEquals(" 1.00", formatter.formatVolume(make(btcUsdOffer), true, 8)); + assertEquals("0.01", formatter.formatVolume(make(btcUsdOffer), true, 4)); assertEquals("100.00", formatter.formatVolume(make(usdVolume))); assertEquals("1774.62", formatter.formatVolume(make(usdVolume.but(with(volumeString, "1774.62"))))); } diff --git a/desktop/src/test/java/bisq/desktop/util/GUIUtilTest.java b/desktop/src/test/java/bisq/desktop/util/GUIUtilTest.java index b7073cb791..fcc4d68b18 100644 --- a/desktop/src/test/java/bisq/desktop/util/GUIUtilTest.java +++ b/desktop/src/test/java/bisq/desktop/util/GUIUtilTest.java @@ -60,7 +60,7 @@ public class GUIUtilTest { offerCounts ); - assertEquals("✦ BTC (BTC) - 11 offers", tradeCurrencyConverter.toString(bitcoin)); + assertEquals("✦ Bitcoin (BTC) - 11 offers", tradeCurrencyConverter.toString(bitcoin)); assertEquals("★ Euro (EUR) - 10 offers", tradeCurrencyConverter.toString(euro)); } @@ -72,7 +72,7 @@ public class GUIUtilTest { Res.get("shared.multipleOffers"), empty); - assertEquals("✦ BTC (BTC) - 10 offers", currencyListItemConverter.toString(make(bitcoinItem.but(with(numberOfTrades, 10))))); + assertEquals("✦ Bitcoin (BTC) - 10 offers", currencyListItemConverter.toString(make(bitcoinItem.but(with(numberOfTrades, 10))))); assertEquals("★ Euro (EUR) - 0 offers", currencyListItemConverter.toString(make(euroItem))); assertEquals("★ Euro (EUR) - 1 offer", currencyListItemConverter.toString(make(euroItem.but(with(numberOfTrades, 1))))); From 64c4522e88f0e945b03e8b7ab1dfaf2bcecabccc Mon Sep 17 00:00:00 2001 From: Manfred Karrer Date: Wed, 7 Nov 2018 17:25:22 -0500 Subject: [PATCH 12/16] Decrease required trade volume. Add better log for not traded assets --- .../statistics/TradeStatisticsManager.java | 70 ++++++++++++++++--- 1 file changed, 60 insertions(+), 10 deletions(-) diff --git a/core/src/main/java/bisq/core/trade/statistics/TradeStatisticsManager.java b/core/src/main/java/bisq/core/trade/statistics/TradeStatisticsManager.java index b47cb5dad4..f3f0f00add 100644 --- a/core/src/main/java/bisq/core/trade/statistics/TradeStatisticsManager.java +++ b/core/src/main/java/bisq/core/trade/statistics/TradeStatisticsManager.java @@ -42,14 +42,19 @@ import org.bitcoinj.core.Coin; import com.google.inject.Inject; import com.google.inject.name.Named; +import com.google.common.base.Joiner; + import javafx.collections.FXCollections; import javafx.collections.ObservableSet; import java.time.Duration; +import java.text.SimpleDateFormat; + import java.io.File; import java.util.ArrayList; +import java.util.Comparator; import java.util.Date; import java.util.HashMap; import java.util.HashSet; @@ -200,7 +205,7 @@ public class TradeStatisticsManager { private void checkTradeActivity() { Date compareDate = new Date(new Date().getTime() - Duration.ofDays(120).toMillis()); - long minTradeAmount = Coin.parseCoin("0.01").value; + long minTradeAmount = Coin.parseCoin("0.001").value; long minNumOfTrades = 3; Map> tradeStatMap = new HashMap<>(); @@ -214,6 +219,7 @@ public class TradeStatisticsManager { int numTrades = tuple2.second + 1; tradeStatMap.put(e.getBaseCurrency(), new Tuple2<>(accumulatedTradeAmount, numTrades)); }); + StringBuilder newAssets = new StringBuilder("\nNew assets (in warming up phase):"); StringBuilder sufficientlyTraded = new StringBuilder("\nSufficiently traded assets:"); StringBuilder insufficientlyTraded = new StringBuilder("\nInsufficiently traded assets:"); StringBuilder notTraded = new StringBuilder("\nNot traded assets:"); @@ -221,12 +227,26 @@ public class TradeStatisticsManager { Set assetsToRemove = new HashSet<>(whiteListedSortedCryptoCurrencies); whiteListedSortedCryptoCurrencies.forEach(e -> { String code = e.getCode(); + String nameAndCode = CurrencyUtil.getNameAndCode(code); + long tradeAmount = 0; + int numTrades = 0; + boolean isInTradeStatMap = tradeStatMap.containsKey(code); + if (isInTradeStatMap) { + Tuple2 tuple = tradeStatMap.get(code); + tradeAmount = tuple.first; + numTrades = tuple.second; + } + if (isWarmingUp(code)) { + assetsToRemove.remove(e); + newAssets.append("\n") + .append(nameAndCode) + .append(": Trade amount: ") + .append(Coin.valueOf(tradeAmount).toFriendlyString()) + .append(", number of trades: ") + .append(numTrades); + } if (!isWarmingUp(code) && !hasPaidBSQFee(code)) { - String nameAndCode = CurrencyUtil.getNameAndCode(code); - if (tradeStatMap.containsKey(code)) { - Tuple2 tuple = tradeStatMap.get(code); - Long tradeAmount = tuple.first; - Integer numTrades = tuple.second; + if (isInTradeStatMap) { if (tradeAmount >= minTradeAmount || numTrades >= minNumOfTrades) { assetsToRemove.remove(e); sufficientlyTraded.append("\n") @@ -244,15 +264,22 @@ public class TradeStatisticsManager { .append(numTrades); } } else { - assetsToRemove.remove(e); notTraded.append("\n").append(nameAndCode); } } }); + List assetsToRemoveList = assetsToRemove.stream() + .sorted(Comparator.comparing(CryptoCurrency::getCode)) + .collect(Collectors.toList()); - log.debug(sufficientlyTraded.toString()); - log.debug(insufficientlyTraded.toString()); - log.debug(notTraded.toString()); + String result = "Date for checking trade activity: " + new SimpleDateFormat("yyyy-MM-dd'T'").format(compareDate) + + "\n\nAssets to remove (" + assetsToRemoveList.size() + "):\n" + Joiner.on("\n").join(assetsToRemoveList) + + "\n\n" + insufficientlyTraded.toString() + + "\n\n" + notTraded.toString() + + "\n\n" + newAssets.toString() + + "\n\n" + sufficientlyTraded.toString(); + // Utilities.copyToClipboard(result); + log.debug(result); } private boolean hasPaidBSQFee(String code) { @@ -294,6 +321,29 @@ public class TradeStatisticsManager { // v0.8.0 Aug 22 2018 // none added + // v0.9.0 (Date TBD) + newlyAdded.add("ACM"); + newlyAdded.add("BTC2"); + newlyAdded.add("BLUR"); + newlyAdded.add("CHA"); + newlyAdded.add("CROAT"); + newlyAdded.add("DRGL"); + newlyAdded.add("ETHS"); + newlyAdded.add("GBK"); + newlyAdded.add("KEK"); + newlyAdded.add("LOKI"); + newlyAdded.add("MBGL"); + newlyAdded.add("NEOS"); + newlyAdded.add("PZDC"); + newlyAdded.add("QMCoin"); + newlyAdded.add("QRL"); + newlyAdded.add("RADS"); + newlyAdded.add("RYO"); + newlyAdded.add("SUB1X"); + newlyAdded.add("MAI"); + newlyAdded.add("TRTL"); + newlyAdded.add("ZER"); + return newlyAdded.contains(code); } } From f59bbefe213e5c4d95f13cfeddeafa76f07a63e6 Mon Sep 17 00:00:00 2001 From: Manfred Karrer Date: Wed, 7 Nov 2018 17:32:54 -0500 Subject: [PATCH 13/16] Move asset trade activity code to new class --- .../main/java/bisq/core/app/BisqSetup.java | 5 + .../dao/governance/asset/AssetService.java | 7 +- .../java/bisq/core/trade/TradeModule.java | 2 + .../statistics/AssetTradeActivityCheck.java | 201 ++++++++++++++++++ .../statistics/TradeStatisticsManager.java | 184 +--------------- 5 files changed, 220 insertions(+), 179 deletions(-) create mode 100644 core/src/main/java/bisq/core/trade/statistics/AssetTradeActivityCheck.java diff --git a/core/src/main/java/bisq/core/app/BisqSetup.java b/core/src/main/java/bisq/core/app/BisqSetup.java index e7511c6bd7..08ae08ac16 100644 --- a/core/src/main/java/bisq/core/app/BisqSetup.java +++ b/core/src/main/java/bisq/core/app/BisqSetup.java @@ -49,6 +49,7 @@ import bisq.core.provider.fee.FeeService; import bisq.core.provider.price.PriceFeedService; import bisq.core.trade.Trade; import bisq.core.trade.TradeManager; +import bisq.core.trade.statistics.AssetTradeActivityCheck; import bisq.core.trade.statistics.TradeStatisticsManager; import bisq.core.user.Preferences; import bisq.core.user.User; @@ -150,6 +151,7 @@ public class BisqSetup { private final PriceAlert priceAlert; private final MarketAlerts marketAlerts; private final VoteResultService voteResultService; + private final AssetTradeActivityCheck tradeActivityCheck; private final BSFormatter formatter; @Setter @Nullable @@ -223,6 +225,7 @@ public class BisqSetup { PriceAlert priceAlert, MarketAlerts marketAlerts, VoteResultService voteResultService, + AssetTradeActivityCheck tradeActivityCheck, BSFormatter formatter) { @@ -259,6 +262,7 @@ public class BisqSetup { this.priceAlert = priceAlert; this.marketAlerts = marketAlerts; this.voteResultService = voteResultService; + this.tradeActivityCheck = tradeActivityCheck; this.formatter = formatter; } @@ -624,6 +628,7 @@ public class BisqSetup { } tradeStatisticsManager.onAllServicesInitialized(); + tradeActivityCheck.onAllServicesInitialized(); accountAgeWitnessService.onAllServicesInitialized(); diff --git a/core/src/main/java/bisq/core/dao/governance/asset/AssetService.java b/core/src/main/java/bisq/core/dao/governance/asset/AssetService.java index 892df5ea61..1ac69f94c1 100644 --- a/core/src/main/java/bisq/core/dao/governance/asset/AssetService.java +++ b/core/src/main/java/bisq/core/dao/governance/asset/AssetService.java @@ -18,7 +18,6 @@ package bisq.core.dao.governance.asset; import bisq.core.app.BisqEnvironment; -import bisq.core.dao.state.DaoStateService; import bisq.core.locale.CurrencyUtil; import bisq.common.proto.persistable.PersistedDataHost; @@ -34,10 +33,7 @@ import lombok.extern.slf4j.Slf4j; @Slf4j public class AssetService implements PersistedDataHost { - - private final Storage storage; - private final DaoStateService daoStateService; @Getter private final RemovedAssetsList removedAssetsList = new RemovedAssetsList(); @@ -47,9 +43,8 @@ public class AssetService implements PersistedDataHost { /////////////////////////////////////////////////////////////////////////////////////////// @Inject - public AssetService(Storage storage, DaoStateService daoStateService) { + public AssetService(Storage storage) { this.storage = storage; - this.daoStateService = daoStateService; } diff --git a/core/src/main/java/bisq/core/trade/TradeModule.java b/core/src/main/java/bisq/core/trade/TradeModule.java index 183de9cccd..7d0ed2ce4c 100644 --- a/core/src/main/java/bisq/core/trade/TradeModule.java +++ b/core/src/main/java/bisq/core/trade/TradeModule.java @@ -22,6 +22,7 @@ import bisq.core.payment.AccountAgeWitnessService; import bisq.core.payment.AccountAgeWitnessStorageService; import bisq.core.trade.closed.ClosedTradableManager; import bisq.core.trade.failed.FailedTradesManager; +import bisq.core.trade.statistics.AssetTradeActivityCheck; import bisq.core.trade.statistics.ReferralIdService; import bisq.core.trade.statistics.TradeStatistics2StorageService; import bisq.core.trade.statistics.TradeStatisticsManager; @@ -50,6 +51,7 @@ public class TradeModule extends AppModule { bind(AccountAgeWitnessService.class).in(Singleton.class); bind(ReferralIdService.class).in(Singleton.class); bind(AccountAgeWitnessStorageService.class).in(Singleton.class); + bind(AssetTradeActivityCheck.class).in(Singleton.class); bindConstant().annotatedWith(named(AppOptionKeys.DUMP_STATISTICS)).to(environment.getRequiredProperty(AppOptionKeys.DUMP_STATISTICS)); } } diff --git a/core/src/main/java/bisq/core/trade/statistics/AssetTradeActivityCheck.java b/core/src/main/java/bisq/core/trade/statistics/AssetTradeActivityCheck.java new file mode 100644 index 0000000000..1eaa6f13a0 --- /dev/null +++ b/core/src/main/java/bisq/core/trade/statistics/AssetTradeActivityCheck.java @@ -0,0 +1,201 @@ +/* + * 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 . + */ + +package bisq.core.trade.statistics; + +import bisq.core.dao.governance.asset.AssetService; +import bisq.core.locale.CryptoCurrency; +import bisq.core.locale.CurrencyUtil; + +import bisq.common.util.Tuple2; + +import org.bitcoinj.core.Coin; + +import javax.inject.Inject; + +import com.google.common.base.Joiner; + +import java.time.Duration; + +import java.text.SimpleDateFormat; + +import java.util.Comparator; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.stream.Collectors; + +import lombok.extern.slf4j.Slf4j; + +@Slf4j +public class AssetTradeActivityCheck { + private final AssetService assetService; + private final TradeStatisticsManager tradeStatisticsManager; + + @Inject + public AssetTradeActivityCheck(AssetService assetService, TradeStatisticsManager tradeStatisticsManager) { + this.assetService = assetService; + this.tradeStatisticsManager = tradeStatisticsManager; + } + + public void onAllServicesInitialized() { + Date compareDate = new Date(new Date().getTime() - Duration.ofDays(120).toMillis()); + long minTradeAmount = Coin.parseCoin("0.001").value; + long minNumOfTrades = 3; + + Map> tradeStatMap = new HashMap<>(); + tradeStatisticsManager.getObservableTradeStatisticsSet().stream() + .filter(e -> CurrencyUtil.isCryptoCurrency(e.getBaseCurrency())) + .filter(e -> e.getTradeDate().getTime() > compareDate.getTime()) + .forEach(e -> { + tradeStatMap.putIfAbsent(e.getBaseCurrency(), new Tuple2<>(0L, 0)); + Tuple2 tuple2 = tradeStatMap.get(e.getBaseCurrency()); + long accumulatedTradeAmount = tuple2.first + e.getTradeAmount().getValue(); + int numTrades = tuple2.second + 1; + tradeStatMap.put(e.getBaseCurrency(), new Tuple2<>(accumulatedTradeAmount, numTrades)); + }); + StringBuilder newAssets = new StringBuilder("\nNew assets (in warming up phase):"); + StringBuilder sufficientlyTraded = new StringBuilder("\nSufficiently traded assets:"); + StringBuilder insufficientlyTraded = new StringBuilder("\nInsufficiently traded assets:"); + StringBuilder notTraded = new StringBuilder("\nNot traded assets:"); + List whiteListedSortedCryptoCurrencies = CurrencyUtil.getWhiteListedSortedCryptoCurrencies(assetService); + Set assetsToRemove = new HashSet<>(whiteListedSortedCryptoCurrencies); + whiteListedSortedCryptoCurrencies.forEach(e -> { + String code = e.getCode(); + String nameAndCode = CurrencyUtil.getNameAndCode(code); + long tradeAmount = 0; + int numTrades = 0; + boolean isInTradeStatMap = tradeStatMap.containsKey(code); + if (isInTradeStatMap) { + Tuple2 tuple = tradeStatMap.get(code); + tradeAmount = tuple.first; + numTrades = tuple.second; + } + if (isWarmingUp(code)) { + assetsToRemove.remove(e); + newAssets.append("\n") + .append(nameAndCode) + .append(": Trade amount: ") + .append(Coin.valueOf(tradeAmount).toFriendlyString()) + .append(", number of trades: ") + .append(numTrades); + } + if (!isWarmingUp(code) && !hasPaidBSQFee(code)) { + if (isInTradeStatMap) { + if (tradeAmount >= minTradeAmount || numTrades >= minNumOfTrades) { + assetsToRemove.remove(e); + sufficientlyTraded.append("\n") + .append(nameAndCode) + .append(": Trade amount: ") + .append(Coin.valueOf(tradeAmount).toFriendlyString()) + .append(", number of trades: ") + .append(numTrades); + } else { + insufficientlyTraded.append("\n") + .append(nameAndCode) + .append(": Trade amount: ") + .append(Coin.valueOf(tradeAmount).toFriendlyString()) + .append(", number of trades: ") + .append(numTrades); + } + } else { + notTraded.append("\n").append(nameAndCode); + } + } + }); + List assetsToRemoveList = assetsToRemove.stream() + .sorted(Comparator.comparing(CryptoCurrency::getCode)) + .collect(Collectors.toList()); + + String result = "Date for checking trade activity: " + new SimpleDateFormat("yyyy-MM-dd'T'").format(compareDate) + + "\n\nAssets to remove (" + assetsToRemoveList.size() + "):\n" + Joiner.on("\n").join(assetsToRemoveList) + + "\n\n" + insufficientlyTraded.toString() + + "\n\n" + notTraded.toString() + + "\n\n" + newAssets.toString() + + "\n\n" + sufficientlyTraded.toString(); + // Utilities.copyToClipboard(result); + log.debug(result); + } + + private boolean hasPaidBSQFee(String code) { + return assetService.hasPaidBSQFee(code); + } + + private boolean isWarmingUp(String code) { + Set newlyAdded = new HashSet<>(); + + // v0.7.1 Jul 4 2018 + newlyAdded.add("ZOC"); + newlyAdded.add("AQUA"); + newlyAdded.add("BTDX"); + newlyAdded.add("BTCC"); + newlyAdded.add("BTI"); + newlyAdded.add("CRDS"); + newlyAdded.add("CNMC"); + newlyAdded.add("TARI"); + newlyAdded.add("DAC"); + newlyAdded.add("DRIP"); + newlyAdded.add("FTO"); + newlyAdded.add("GRFT"); + newlyAdded.add("LIKE"); + newlyAdded.add("LOBS"); + newlyAdded.add("MAX"); + newlyAdded.add("MEC"); + newlyAdded.add("MCC"); + newlyAdded.add("XMN"); + newlyAdded.add("XMY"); + newlyAdded.add("NANO"); + newlyAdded.add("NPW"); + newlyAdded.add("NIM"); + newlyAdded.add("PIX"); + newlyAdded.add("PXL"); + newlyAdded.add("PRIV"); + newlyAdded.add("TRIT"); + newlyAdded.add("WAVI"); + + // v0.8.0 Aug 22 2018 + // none added + + // v0.9.0 (Date TBD) + newlyAdded.add("ACM"); + newlyAdded.add("BTC2"); + newlyAdded.add("BLUR"); + newlyAdded.add("CHA"); + newlyAdded.add("CROAT"); + newlyAdded.add("DRGL"); + newlyAdded.add("ETHS"); + newlyAdded.add("GBK"); + newlyAdded.add("KEK"); + newlyAdded.add("LOKI"); + newlyAdded.add("MBGL"); + newlyAdded.add("NEOS"); + newlyAdded.add("PZDC"); + newlyAdded.add("QMCoin"); + newlyAdded.add("QRL"); + newlyAdded.add("RADS"); + newlyAdded.add("RYO"); + newlyAdded.add("SUB1X"); + newlyAdded.add("MAI"); + newlyAdded.add("TRTL"); + newlyAdded.add("ZER"); + + return newlyAdded.contains(code); + } +} diff --git a/core/src/main/java/bisq/core/trade/statistics/TradeStatisticsManager.java b/core/src/main/java/bisq/core/trade/statistics/TradeStatisticsManager.java index f3f0f00add..a1632ab249 100644 --- a/core/src/main/java/bisq/core/trade/statistics/TradeStatisticsManager.java +++ b/core/src/main/java/bisq/core/trade/statistics/TradeStatisticsManager.java @@ -18,8 +18,6 @@ package bisq.core.trade.statistics; import bisq.core.app.AppOptionKeys; -import bisq.core.dao.governance.asset.AssetService; -import bisq.core.locale.CryptoCurrency; import bisq.core.locale.CurrencyTuple; import bisq.core.locale.CurrencyUtil; import bisq.core.locale.Res; @@ -34,33 +32,21 @@ import bisq.network.p2p.storage.persistence.AppendOnlyDataStoreService; import bisq.common.UserThread; import bisq.common.storage.JsonFileManager; import bisq.common.storage.Storage; -import bisq.common.util.Tuple2; import bisq.common.util.Utilities; -import org.bitcoinj.core.Coin; - import com.google.inject.Inject; import com.google.inject.name.Named; -import com.google.common.base.Joiner; - import javafx.collections.FXCollections; import javafx.collections.ObservableSet; -import java.time.Duration; - -import java.text.SimpleDateFormat; - import java.io.File; import java.util.ArrayList; -import java.util.Comparator; import java.util.Date; import java.util.HashMap; -import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Set; import java.util.concurrent.TimeUnit; import java.util.stream.Collectors; @@ -75,7 +61,6 @@ public class TradeStatisticsManager { private final P2PService p2PService; private final PriceFeedService priceFeedService; private final ReferralIdService referralIdService; - private final AssetService assetService; private final boolean dumpStatistics; private final ObservableSet observableTradeStatisticsSet = FXCollections.observableSet(); @@ -85,13 +70,11 @@ public class TradeStatisticsManager { TradeStatistics2StorageService tradeStatistics2StorageService, AppendOnlyDataStoreService appendOnlyDataStoreService, ReferralIdService referralIdService, - AssetService assetService, @Named(Storage.STORAGE_DIR) File storageDir, @Named(AppOptionKeys.DUMP_STATISTICS) boolean dumpStatistics) { this.p2PService = p2PService; this.priceFeedService = priceFeedService; this.referralIdService = referralIdService; - this.assetService = assetService; this.dumpStatistics = dumpStatistics; jsonFileManager = new JsonFileManager(storageDir); @@ -100,14 +83,14 @@ public class TradeStatisticsManager { public void onAllServicesInitialized() { if (dumpStatistics) { - ArrayList fiatCurrencyList = new ArrayList<>(CurrencyUtil.getAllSortedFiatCurrencies().stream() + ArrayList fiatCurrencyList = CurrencyUtil.getAllSortedFiatCurrencies().stream() .map(e -> new CurrencyTuple(e.getCode(), e.getName(), 8)) - .collect(Collectors.toList())); + .collect(Collectors.toCollection(ArrayList::new)); jsonFileManager.writeToDisc(Utilities.objectToJson(fiatCurrencyList), "fiat_currency_list"); - ArrayList cryptoCurrencyList = new ArrayList<>(CurrencyUtil.getAllSortedCryptoCurrencies().stream() + ArrayList cryptoCurrencyList = CurrencyUtil.getAllSortedCryptoCurrencies().stream() .map(e -> new CurrencyTuple(e.getCode(), e.getName(), 8)) - .collect(Collectors.toList())); + .collect(Collectors.toCollection(ArrayList::new)); cryptoCurrencyList.add(0, new CurrencyTuple(Res.getBaseCurrencyCode(), Res.getBaseCurrencyName(), 8)); jsonFileManager.writeToDisc(Utilities.objectToJson(cryptoCurrencyList), "crypto_currency_list"); } @@ -124,9 +107,8 @@ public class TradeStatisticsManager { observableTradeStatisticsSet.addAll(map.values()); priceFeedService.applyLatestBisqMarketPrice(observableTradeStatisticsSet); - dump(); - checkTradeActivity(); + dump(); } public void publishTradeStatistics(List trades) { @@ -161,7 +143,11 @@ public class TradeStatisticsManager { } } - public void addToMap(TradeStatistics2 tradeStatistics, boolean storeLocally) { + public ObservableSet getObservableTradeStatisticsSet() { + return observableTradeStatisticsSet; + } + + private void addToMap(TradeStatistics2 tradeStatistics, boolean storeLocally) { if (!observableTradeStatisticsSet.contains(tradeStatistics)) { boolean itemAlreadyAdded = observableTradeStatisticsSet.stream() .anyMatch(e -> (e.getOfferId().equals(tradeStatistics.getOfferId()))); @@ -177,16 +163,12 @@ public class TradeStatisticsManager { } } - public void addToMap(TradeStatistics2 tradeStatistics, Map map) { + private void addToMap(TradeStatistics2 tradeStatistics, Map map) { TradeStatistics2 prevValue = map.putIfAbsent(tradeStatistics.getOfferId(), tradeStatistics); if (prevValue != null) log.debug("We have already an item with the same offer ID. That might happen if both the maker and the taker published the tradeStatistics"); } - public ObservableSet getObservableTradeStatisticsSet() { - return observableTradeStatisticsSet; - } - private void dump() { if (dumpStatistics) { // We store the statistics as json so it is easy for further processing (e.g. for web based services) @@ -202,148 +184,4 @@ public class TradeStatisticsManager { jsonFileManager.writeToDisc(Utilities.objectToJson(array), "trade_statistics"); } } - - private void checkTradeActivity() { - Date compareDate = new Date(new Date().getTime() - Duration.ofDays(120).toMillis()); - long minTradeAmount = Coin.parseCoin("0.001").value; - long minNumOfTrades = 3; - - Map> tradeStatMap = new HashMap<>(); - observableTradeStatisticsSet.stream() - .filter(e -> CurrencyUtil.isCryptoCurrency(e.getBaseCurrency())) - .filter(e -> e.getTradeDate().getTime() > compareDate.getTime()) - .forEach(e -> { - tradeStatMap.putIfAbsent(e.getBaseCurrency(), new Tuple2<>(0L, 0)); - Tuple2 tuple2 = tradeStatMap.get(e.getBaseCurrency()); - long accumulatedTradeAmount = tuple2.first + e.getTradeAmount().getValue(); - int numTrades = tuple2.second + 1; - tradeStatMap.put(e.getBaseCurrency(), new Tuple2<>(accumulatedTradeAmount, numTrades)); - }); - StringBuilder newAssets = new StringBuilder("\nNew assets (in warming up phase):"); - StringBuilder sufficientlyTraded = new StringBuilder("\nSufficiently traded assets:"); - StringBuilder insufficientlyTraded = new StringBuilder("\nInsufficiently traded assets:"); - StringBuilder notTraded = new StringBuilder("\nNot traded assets:"); - List whiteListedSortedCryptoCurrencies = CurrencyUtil.getWhiteListedSortedCryptoCurrencies(assetService); - Set assetsToRemove = new HashSet<>(whiteListedSortedCryptoCurrencies); - whiteListedSortedCryptoCurrencies.forEach(e -> { - String code = e.getCode(); - String nameAndCode = CurrencyUtil.getNameAndCode(code); - long tradeAmount = 0; - int numTrades = 0; - boolean isInTradeStatMap = tradeStatMap.containsKey(code); - if (isInTradeStatMap) { - Tuple2 tuple = tradeStatMap.get(code); - tradeAmount = tuple.first; - numTrades = tuple.second; - } - if (isWarmingUp(code)) { - assetsToRemove.remove(e); - newAssets.append("\n") - .append(nameAndCode) - .append(": Trade amount: ") - .append(Coin.valueOf(tradeAmount).toFriendlyString()) - .append(", number of trades: ") - .append(numTrades); - } - if (!isWarmingUp(code) && !hasPaidBSQFee(code)) { - if (isInTradeStatMap) { - if (tradeAmount >= minTradeAmount || numTrades >= minNumOfTrades) { - assetsToRemove.remove(e); - sufficientlyTraded.append("\n") - .append(nameAndCode) - .append(": Trade amount: ") - .append(Coin.valueOf(tradeAmount).toFriendlyString()) - .append(", number of trades: ") - .append(numTrades); - } else { - insufficientlyTraded.append("\n") - .append(nameAndCode) - .append(": Trade amount: ") - .append(Coin.valueOf(tradeAmount).toFriendlyString()) - .append(", number of trades: ") - .append(numTrades); - } - } else { - notTraded.append("\n").append(nameAndCode); - } - } - }); - List assetsToRemoveList = assetsToRemove.stream() - .sorted(Comparator.comparing(CryptoCurrency::getCode)) - .collect(Collectors.toList()); - - String result = "Date for checking trade activity: " + new SimpleDateFormat("yyyy-MM-dd'T'").format(compareDate) + - "\n\nAssets to remove (" + assetsToRemoveList.size() + "):\n" + Joiner.on("\n").join(assetsToRemoveList) + - "\n\n" + insufficientlyTraded.toString() + - "\n\n" + notTraded.toString() + - "\n\n" + newAssets.toString() + - "\n\n" + sufficientlyTraded.toString(); - // Utilities.copyToClipboard(result); - log.debug(result); - } - - private boolean hasPaidBSQFee(String code) { - return assetService.hasPaidBSQFee(code); - } - - private boolean isWarmingUp(String code) { - Set newlyAdded = new HashSet<>(); - - // v0.7.1 Jul 4 2018 - newlyAdded.add("ZOC"); - newlyAdded.add("AQUA"); - newlyAdded.add("BTDX"); - newlyAdded.add("BTCC"); - newlyAdded.add("BTI"); - newlyAdded.add("CRDS"); - newlyAdded.add("CNMC"); - newlyAdded.add("TARI"); - newlyAdded.add("DAC"); - newlyAdded.add("DRIP"); - newlyAdded.add("FTO"); - newlyAdded.add("GRFT"); - newlyAdded.add("LIKE"); - newlyAdded.add("LOBS"); - newlyAdded.add("MAX"); - newlyAdded.add("MEC"); - newlyAdded.add("MCC"); - newlyAdded.add("XMN"); - newlyAdded.add("XMY"); - newlyAdded.add("NANO"); - newlyAdded.add("NPW"); - newlyAdded.add("NIM"); - newlyAdded.add("PIX"); - newlyAdded.add("PXL"); - newlyAdded.add("PRIV"); - newlyAdded.add("TRIT"); - newlyAdded.add("WAVI"); - - // v0.8.0 Aug 22 2018 - // none added - - // v0.9.0 (Date TBD) - newlyAdded.add("ACM"); - newlyAdded.add("BTC2"); - newlyAdded.add("BLUR"); - newlyAdded.add("CHA"); - newlyAdded.add("CROAT"); - newlyAdded.add("DRGL"); - newlyAdded.add("ETHS"); - newlyAdded.add("GBK"); - newlyAdded.add("KEK"); - newlyAdded.add("LOKI"); - newlyAdded.add("MBGL"); - newlyAdded.add("NEOS"); - newlyAdded.add("PZDC"); - newlyAdded.add("QMCoin"); - newlyAdded.add("QRL"); - newlyAdded.add("RADS"); - newlyAdded.add("RYO"); - newlyAdded.add("SUB1X"); - newlyAdded.add("MAI"); - newlyAdded.add("TRTL"); - newlyAdded.add("ZER"); - - return newlyAdded.contains(code); - } } From 36df44db33334690d84e79cd507b05032b746b92 Mon Sep 17 00:00:00 2001 From: Manfred Karrer Date: Wed, 7 Nov 2018 17:35:21 -0500 Subject: [PATCH 14/16] Add comment --- core/src/main/java/bisq/core/locale/CurrencyUtil.java | 1 + .../bisq/core/trade/statistics/AssetTradeActivityCheck.java | 2 ++ 2 files changed, 3 insertions(+) diff --git a/core/src/main/java/bisq/core/locale/CurrencyUtil.java b/core/src/main/java/bisq/core/locale/CurrencyUtil.java index a0d0547c7c..a235ab973f 100644 --- a/core/src/main/java/bisq/core/locale/CurrencyUtil.java +++ b/core/src/main/java/bisq/core/locale/CurrencyUtil.java @@ -487,6 +487,7 @@ public class CurrencyUtil { .findAny(); } + // Excludes all assets which got removed by DAO voting public static List getWhiteListedSortedCryptoCurrencies(AssetService assetService) { return getAllSortedCryptoCurrencies().stream() .filter(e -> !assetService.isAssetRemoved(e.getCode())) diff --git a/core/src/main/java/bisq/core/trade/statistics/AssetTradeActivityCheck.java b/core/src/main/java/bisq/core/trade/statistics/AssetTradeActivityCheck.java index 1eaa6f13a0..8127260c74 100644 --- a/core/src/main/java/bisq/core/trade/statistics/AssetTradeActivityCheck.java +++ b/core/src/main/java/bisq/core/trade/statistics/AssetTradeActivityCheck.java @@ -88,6 +88,7 @@ public class AssetTradeActivityCheck { tradeAmount = tuple.first; numTrades = tuple.second; } + if (isWarmingUp(code)) { assetsToRemove.remove(e); newAssets.append("\n") @@ -97,6 +98,7 @@ public class AssetTradeActivityCheck { .append(", number of trades: ") .append(numTrades); } + if (!isWarmingUp(code) && !hasPaidBSQFee(code)) { if (isInTradeStatMap) { if (tradeAmount >= minTradeAmount || numTrades >= minNumOfTrades) { From 5ab801cad2b2058d42a9fe7352866b1eed5efcbd Mon Sep 17 00:00:00 2001 From: Florian Reimair Date: Thu, 8 Nov 2018 10:13:29 +0100 Subject: [PATCH 15/16] readability --- p2p/src/main/java/bisq/network/p2p/network/TorNetworkNode.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/p2p/src/main/java/bisq/network/p2p/network/TorNetworkNode.java b/p2p/src/main/java/bisq/network/p2p/network/TorNetworkNode.java index 3ec67b5922..220cfd8c12 100644 --- a/p2p/src/main/java/bisq/network/p2p/network/TorNetworkNode.java +++ b/p2p/src/main/java/bisq/network/p2p/network/TorNetworkNode.java @@ -254,7 +254,7 @@ public class TorNetworkNode extends NetworkNode { // check if the user wants to provide his own torrc file String torrcFile = System.getProperty(CONFIG_TORRCFILE); - if(null != torrcFile) { + if(torrcFile != null) { try { override = new Torrc(new FileInputStream(new File(torrcFile))); } catch(IOException e) { From 7b98445eb982af53e8a6856131cb49914d9bdedd Mon Sep 17 00:00:00 2001 From: Florian Reimair Date: Thu, 8 Nov 2018 14:56:44 +0100 Subject: [PATCH 16/16] use program arguments instead of system properties --- .../java/bisq/core/app/BisqEnvironment.java | 9 ++++ .../java/bisq/core/app/BisqExecutable.java | 11 +++++ .../java/bisq/network/NetworkOptionKeys.java | 2 + .../bisq/network/p2p/NetworkNodeProvider.java | 6 ++- .../main/java/bisq/network/p2p/P2PModule.java | 2 + .../network/p2p/network/TorNetworkNode.java | 45 ++++++++++++------- .../p2p/network/TorNetworkNodeTest.java | 8 ++-- 7 files changed, 61 insertions(+), 22 deletions(-) diff --git a/core/src/main/java/bisq/core/app/BisqEnvironment.java b/core/src/main/java/bisq/core/app/BisqEnvironment.java index b75074c5b5..96846c5167 100644 --- a/core/src/main/java/bisq/core/app/BisqEnvironment.java +++ b/core/src/main/java/bisq/core/app/BisqEnvironment.java @@ -193,6 +193,7 @@ public class BisqEnvironment extends StandardEnvironment { protected final String btcNodes, seedNodes, ignoreDevMsg, useDevPrivilegeKeys, useDevMode, useTorForBtc, rpcUser, rpcPassword, rpcPort, rpcBlockNotificationPort, dumpBlockchainData, fullDaoNode, myAddress, banList, dumpStatistics, maxMemory, socks5ProxyBtcAddress, + torRcFile, torRcOptions, socks5ProxyHttpAddress, useAllProvidedNodes, numConnectionForBtc, genesisTxId, genesisBlockHeight, referralId, daoActivated; @@ -267,6 +268,12 @@ public class BisqEnvironment extends StandardEnvironment { socks5ProxyHttpAddress = commandLineProperties.containsProperty(NetworkOptionKeys.SOCKS_5_PROXY_HTTP_ADDRESS) ? (String) commandLineProperties.getProperty(NetworkOptionKeys.SOCKS_5_PROXY_HTTP_ADDRESS) : ""; + torRcFile = commandLineProperties.containsProperty(NetworkOptionKeys.TORRC_FILE) ? + (String) commandLineProperties.getProperty(NetworkOptionKeys.TORRC_FILE) : + ""; + torRcOptions = commandLineProperties.containsProperty(NetworkOptionKeys.TORRC_OPTIONS) ? + (String) commandLineProperties.getProperty(NetworkOptionKeys.TORRC_OPTIONS) : + ""; //RpcOptionKeys rpcUser = commandLineProperties.containsProperty(DaoOptionKeys.RPC_USER) ? @@ -435,6 +442,8 @@ public class BisqEnvironment extends StandardEnvironment { setProperty(NetworkOptionKeys.NETWORK_ID, String.valueOf(baseCurrencyNetwork.ordinal())); setProperty(NetworkOptionKeys.SOCKS_5_PROXY_BTC_ADDRESS, socks5ProxyBtcAddress); setProperty(NetworkOptionKeys.SOCKS_5_PROXY_HTTP_ADDRESS, socks5ProxyHttpAddress); + setProperty(NetworkOptionKeys.TORRC_FILE, torRcFile); + setProperty(NetworkOptionKeys.TORRC_OPTIONS, torRcOptions); setProperty(AppOptionKeys.APP_DATA_DIR_KEY, appDataDir); setProperty(AppOptionKeys.DESKTOP_WITH_HTTP_API, desktopWithHttpApi); diff --git a/core/src/main/java/bisq/core/app/BisqExecutable.java b/core/src/main/java/bisq/core/app/BisqExecutable.java index 57c9dd4cd4..63db8bd407 100644 --- a/core/src/main/java/bisq/core/app/BisqExecutable.java +++ b/core/src/main/java/bisq/core/app/BisqExecutable.java @@ -53,6 +53,9 @@ import org.springframework.util.StringUtils; import joptsimple.OptionException; import joptsimple.OptionParser; import joptsimple.OptionSet; +import joptsimple.util.PathConverter; +import joptsimple.util.PathProperties; +import joptsimple.util.RegexMatcher; import com.google.inject.Guice; import com.google.inject.Injector; @@ -330,6 +333,14 @@ public abstract class BisqExecutable implements GracefulShutDownHandler { parser.accepts(NetworkOptionKeys.SOCKS_5_PROXY_HTTP_ADDRESS, description("A proxy address to be used for Http requests (should be non-Tor). [host:port]", "")) .withRequiredArg(); + parser.accepts(NetworkOptionKeys.TORRC_FILE, + description("An existing torrc-file to be sourced for Tor. Note that torrc-entries, which are critical to Bisqs flawless operation, cannot be overwritten.", "")) + .withRequiredArg(); +// .withValuesConvertedBy(new PathConverter(PathProperties.FILE_EXISTING, PathProperties.READABLE)); + parser.accepts(NetworkOptionKeys.TORRC_OPTIONS, + description("A list of torrc-entries to amend to Bisqs torrc. Note that torrc-entries, which are critical to Bisqs flawless operation, cannot be overwritten. [torrc options line, torrc option, ...]", "")) + .withRequiredArg(); +// .withValuesConvertedBy(RegexMatcher.regex("^([^\\s,]+\\s[^,]+,?\\s*)+$")); //AppOptionKeys parser.accepts(AppOptionKeys.USER_DATA_DIR_KEY, diff --git a/p2p/src/main/java/bisq/network/NetworkOptionKeys.java b/p2p/src/main/java/bisq/network/NetworkOptionKeys.java index c152441e9b..2d2bb0f641 100644 --- a/p2p/src/main/java/bisq/network/NetworkOptionKeys.java +++ b/p2p/src/main/java/bisq/network/NetworkOptionKeys.java @@ -29,4 +29,6 @@ public class NetworkOptionKeys { //SOCKS_5_PROXY_BTC_ADDRESS used in network module so dont move it to BtcOptionKeys public static final String SOCKS_5_PROXY_BTC_ADDRESS = "socks5ProxyBtcAddress"; public static final String SOCKS_5_PROXY_HTTP_ADDRESS = "socks5ProxyHttpAddress"; + public static final String TORRC_OPTIONS = "torrcOptions"; + public static final String TORRC_FILE = "torrcFile"; } diff --git a/p2p/src/main/java/bisq/network/p2p/NetworkNodeProvider.java b/p2p/src/main/java/bisq/network/p2p/NetworkNodeProvider.java index 53493d1e82..20938753ae 100644 --- a/p2p/src/main/java/bisq/network/p2p/NetworkNodeProvider.java +++ b/p2p/src/main/java/bisq/network/p2p/NetworkNodeProvider.java @@ -42,10 +42,12 @@ public class NetworkNodeProvider implements Provider { @Named(NetworkOptionKeys.USE_LOCALHOST_FOR_P2P) boolean useLocalhostForP2P, @Named(NetworkOptionKeys.MY_ADDRESS) String address, @Named(NetworkOptionKeys.PORT_KEY) int port, - @Named(NetworkOptionKeys.TOR_DIR) File torDir) { + @Named(NetworkOptionKeys.TOR_DIR) File torDir, + @Named(NetworkOptionKeys.TORRC_FILE) String torrcFile, + @Named(NetworkOptionKeys.TORRC_OPTIONS) String torrcOptions) { networkNode = useLocalhostForP2P ? new LocalhostNetworkNode(address, port, networkProtoResolver) : - new TorNetworkNode(port, torDir, networkProtoResolver, bridgeAddressProvider); + new TorNetworkNode(port, torDir, networkProtoResolver, bridgeAddressProvider, torrcFile, torrcOptions); } @Override diff --git a/p2p/src/main/java/bisq/network/p2p/P2PModule.java b/p2p/src/main/java/bisq/network/p2p/P2PModule.java index dbac9d03df..4e0d090334 100644 --- a/p2p/src/main/java/bisq/network/p2p/P2PModule.java +++ b/p2p/src/main/java/bisq/network/p2p/P2PModule.java @@ -88,5 +88,7 @@ public class P2PModule extends AppModule { bindConstant().annotatedWith(named(NetworkOptionKeys.BAN_LIST)).to(environment.getRequiredProperty(NetworkOptionKeys.BAN_LIST)); bindConstant().annotatedWith(named(NetworkOptionKeys.SOCKS_5_PROXY_BTC_ADDRESS)).to(environment.getRequiredProperty(NetworkOptionKeys.SOCKS_5_PROXY_BTC_ADDRESS)); bindConstant().annotatedWith(named(NetworkOptionKeys.SOCKS_5_PROXY_HTTP_ADDRESS)).to(environment.getRequiredProperty(NetworkOptionKeys.SOCKS_5_PROXY_HTTP_ADDRESS)); + bindConstant().annotatedWith(named(NetworkOptionKeys.TORRC_FILE)).to(environment.getRequiredProperty(NetworkOptionKeys.TORRC_FILE)); + bindConstant().annotatedWith(named(NetworkOptionKeys.TORRC_OPTIONS)).to(environment.getRequiredProperty(NetworkOptionKeys.TORRC_OPTIONS)); } } diff --git a/p2p/src/main/java/bisq/network/p2p/network/TorNetworkNode.java b/p2p/src/main/java/bisq/network/p2p/network/TorNetworkNode.java index 220cfd8c12..1ea3945618 100644 --- a/p2p/src/main/java/bisq/network/p2p/network/TorNetworkNode.java +++ b/p2p/src/main/java/bisq/network/p2p/network/TorNetworkNode.java @@ -54,7 +54,7 @@ import java.nio.file.Paths; import java.io.File; import java.io.FileInputStream; import java.io.IOException; - +import java.util.Arrays; import java.util.Date; import java.util.LinkedHashMap; import java.util.List; @@ -77,8 +77,6 @@ public class TorNetworkNode extends NetworkNode { private static final int MAX_RESTART_ATTEMPTS = 5; private static final long SHUT_DOWN_TIMEOUT = 5; - private static final String CONFIG_TORRCPREFIX = "torrc:"; - private static final String CONFIG_TORRCFILE = "torrcfile"; private HiddenServiceSocket hiddenServiceSocket; private final File torDir; @@ -89,15 +87,20 @@ public class TorNetworkNode extends NetworkNode { private MonadicBinding allShutDown; private Tor tor; + private String torrcFile = ""; + private String torrcOptions = ""; + /////////////////////////////////////////////////////////////////////////////////////////// // Constructor /////////////////////////////////////////////////////////////////////////////////////////// - public TorNetworkNode(int servicePort, File torDir, NetworkProtoResolver networkProtoResolver, BridgeAddressProvider bridgeAddressProvider) { + public TorNetworkNode(int servicePort, File torDir, NetworkProtoResolver networkProtoResolver, BridgeAddressProvider bridgeAddressProvider, String torrcFile, String torrcOptions) { super(servicePort, networkProtoResolver); this.torDir = torDir; this.bridgeAddressProvider = bridgeAddressProvider; + this.torrcFile = torrcFile; + this.torrcOptions = torrcOptions; } @@ -253,28 +256,38 @@ public class TorNetworkNode extends NetworkNode { Torrc override = null; // check if the user wants to provide his own torrc file - String torrcFile = System.getProperty(CONFIG_TORRCFILE); - if(torrcFile != null) { + if(!"".equals(torrcFile)) { try { override = new Torrc(new FileInputStream(new File(torrcFile))); } catch(IOException e) { - log.error("custom torrc file not found (" + torrcFile + "). Proceeding with defaults."); + log.error("custom torrc file not found ('{}'). Proceeding with defaults.", torrcFile); } } // check if the user wants to temporarily add to the default torrc file - LinkedHashMap tmp = new LinkedHashMap<>(); - System.getProperties().forEach((k, v) -> { - if(((String) k).startsWith(CONFIG_TORRCPREFIX)) - tmp.put(((String) k).substring(CONFIG_TORRCPREFIX.length()), (String) v); - }); - if(!tmp.isEmpty()) + LinkedHashMap torrcOptionsMap = new LinkedHashMap<>(); + if(!"".equals(torrcOptions)) { + Arrays.asList(torrcOptions.split(",")).forEach(line -> { + line = line.trim(); + if(line.matches("^[^\\s]+\\s.+")) { + String[] tmp = line.split("\\s", 2); + torrcOptionsMap.put(tmp[0].trim(), tmp[1].trim()); + } + else { + log.error("custom torrc override parse error ('{}'). Proceeding without custom overrides.", line); + torrcOptionsMap.clear(); + } + }); + } + + // assemble final override options + if(!torrcOptionsMap.isEmpty()) // check for custom torrcFile - if(null != override) + if(override != null) // and merge the contents - override = new Torrc(override.getInputStream$tor(), tmp); + override = new Torrc(override.getInputStream$tor(), torrcOptionsMap); else - override = new Torrc(tmp); + override = new Torrc(torrcOptionsMap); log.info("Starting tor"); Tor.setDefault(new NativeTor(torDir, bridgeEntries, override)); diff --git a/p2p/src/test/java/bisq/network/p2p/network/TorNetworkNodeTest.java b/p2p/src/test/java/bisq/network/p2p/network/TorNetworkNodeTest.java index 2245a3ebd9..720c5ceb32 100644 --- a/p2p/src/test/java/bisq/network/p2p/network/TorNetworkNodeTest.java +++ b/p2p/src/test/java/bisq/network/p2p/network/TorNetworkNodeTest.java @@ -53,7 +53,7 @@ public class TorNetworkNodeTest { public void testTorNodeBeforeSecondReady() throws InterruptedException, IOException { latch = new CountDownLatch(1); int port = 9001; - TorNetworkNode node1 = new TorNetworkNode(port, new File("torNode_" + port), TestUtils.getNetworkProtoResolver(), null); + TorNetworkNode node1 = new TorNetworkNode(port, new File("torNode_" + port), TestUtils.getNetworkProtoResolver(), null, "", ""); node1.start(new SetupListener() { @Override public void onTorNodeReady() { @@ -79,7 +79,7 @@ public class TorNetworkNodeTest { latch = new CountDownLatch(1); int port2 = 9002; - TorNetworkNode node2 = new TorNetworkNode(port2, new File("torNode_" + port2), TestUtils.getNetworkProtoResolver(), null); + TorNetworkNode node2 = new TorNetworkNode(port2, new File("torNode_" + port2), TestUtils.getNetworkProtoResolver(), null, "", ""); node2.start(new SetupListener() { @Override public void onTorNodeReady() { @@ -136,7 +136,7 @@ public class TorNetworkNodeTest { public void testTorNodeAfterBothReady() throws InterruptedException, IOException { latch = new CountDownLatch(2); int port = 9001; - TorNetworkNode node1 = new TorNetworkNode(port, new File("torNode_" + port), TestUtils.getNetworkProtoResolver(), null); + TorNetworkNode node1 = new TorNetworkNode(port, new File("torNode_" + port), TestUtils.getNetworkProtoResolver(), null, "", ""); node1.start(new SetupListener() { @Override public void onTorNodeReady() { @@ -161,7 +161,7 @@ public class TorNetworkNodeTest { }); int port2 = 9002; - TorNetworkNode node2 = new TorNetworkNode(port2, new File("torNode_" + port), TestUtils.getNetworkProtoResolver(), null); + TorNetworkNode node2 = new TorNetworkNode(port2, new File("torNode_" + port), TestUtils.getNetworkProtoResolver(), null, "", ""); node2.start(new SetupListener() { @Override public void onTorNodeReady() {