List RSK Smart Bitcoin (R-BTC)

This commit is contained in:
Martin Harrigan 2021-06-20 12:19:53 +01:00
parent 6c4f97ce7f
commit 639f6ee337
No known key found for this signature in database
GPG Key ID: D9B843E1D0E9901F
5 changed files with 75 additions and 1 deletions

View File

@ -0,0 +1,29 @@
/*
* This file is part of Bisq.
*
* Bisq is free software: you can redistribute it and/or modify it
* under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or (at
* your option) any later version.
*
* Bisq is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
* License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.asset.coins;
import bisq.asset.Coin;
import bisq.asset.EtherAddressValidator;
import bisq.asset.I18n;
public class RSKSmartBitcoin extends Coin {
public RSKSmartBitcoin() {
super("RSK Smart Bitcoin", "R-BTC", new EtherAddressValidator(I18n.DISPLAY_STRINGS.getString("account.altcoin.popup.validation.RBTC")));
}
}

View File

@ -94,6 +94,7 @@ bisq.asset.coins.QMCoin
bisq.asset.coins.Qwertycoin bisq.asset.coins.Qwertycoin
bisq.asset.coins.Radium bisq.asset.coins.Radium
bisq.asset.coins.Remix bisq.asset.coins.Remix
bisq.asset.coins.RSKSmartBitcoin
bisq.asset.coins.Ryo bisq.asset.coins.Ryo
bisq.asset.coins.Siafund bisq.asset.coins.Siafund
bisq.asset.coins.SiaPrimeCoin bisq.asset.coins.SiaPrimeCoin

View File

@ -23,6 +23,7 @@ account.altcoin.popup.validation.XCP=XCP address must start with '1' and must ha
account.altcoin.popup.validation.DCR=DCR address must start with 'Dk' or 'Ds' or 'De' or 'DS' or 'Dc' or 'Pm' and must have 34 characters. account.altcoin.popup.validation.DCR=DCR address must start with 'Dk' or 'Ds' or 'De' or 'DS' or 'Dc' or 'Pm' and must have 34 characters.
account.altcoin.popup.validation.ETC=ETC address must start with '0x' and made up of letters A to F and numbers which are 40 characters long. account.altcoin.popup.validation.ETC=ETC address must start with '0x' and made up of letters A to F and numbers which are 40 characters long.
account.altcoin.popup.validation.NMC=NMC address must start with 'N' or 'M' and must be 34 characters long. account.altcoin.popup.validation.NMC=NMC address must start with 'N' or 'M' and must be 34 characters long.
account.altcoin.popup.validation.RBTC=RSK Smart Bitcoin address must start with '0x' and must be made up of letters 'A' to 'F' and numbers which are 40 characters long.
account.altcoin.popup.validation.SF= Siafund address must be made up of letters A to F and numbers which are 76 characters long. account.altcoin.popup.validation.SF= Siafund address must be made up of letters A to F and numbers which are 76 characters long.
account.altcoin.popup.validation.UNO=UNO address must start with 'u' and must have 34 characters. account.altcoin.popup.validation.UNO=UNO address must start with 'u' and must have 34 characters.
account.altcoin.popup.validation.XZC=XZC address must start with 'a' and must have 34 characters. account.altcoin.popup.validation.XZC=XZC address must start with 'a' and must have 34 characters.

View File

@ -0,0 +1,42 @@
/*
* This file is part of Bisq.
*
* Bisq is free software: you can redistribute it and/or modify it
* under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or (at
* your option) any later version.
*
* Bisq is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
* License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.asset.coins;
import bisq.asset.AbstractAssetTest;
public class RSKSmartBitcoinTest extends AbstractAssetTest {
public RSKSmartBitcoinTest() {
super(new RSKSmartBitcoin());
}
@Override
public void testValidAddresses() {
assertValidAddress("0x353c13b940aa5eed75aa97d477954289e7880bb8");
assertValidAddress("0x9f5304DA62A5408416Ea58A17a92611019bD5ce3");
assertValidAddress("0x180826b05452ce96E157F0708c43381Fee64a6B8");
}
@Override
public void testInvalidAddresses() {
assertInvalidAddress("MxmFPEPzF19JFPU3VPrRXvUbPjMQXnQerY");
assertInvalidAddress("N22FRU9f3fx7Hty641D5cg95kRK6S3sbf3");
assertInvalidAddress("MxmFPEPzF19JFPU3VPrRXvUbPjMQXnQerY");
}
}

View File

@ -151,6 +151,7 @@ public class CurrencyUtil {
result.add(new CryptoCurrency("LTC", "Litecoin")); result.add(new CryptoCurrency("LTC", "Litecoin"));
result.add(new CryptoCurrency("XMR", "Monero")); result.add(new CryptoCurrency("XMR", "Monero"));
result.add(new CryptoCurrency("NMC", "Namecoin")); result.add(new CryptoCurrency("NMC", "Namecoin"));
result.add(new CryptoCurrency("R-BTC", "RSK Smart Bitcoin"));
result.add(new CryptoCurrency("SF", "Siafund")); result.add(new CryptoCurrency("SF", "Siafund"));
result.add(new CryptoCurrency("ZEC", "Zcash")); result.add(new CryptoCurrency("ZEC", "Zcash"));
result.sort(TradeCurrency::compareTo); result.sort(TradeCurrency::compareTo);