Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

List RSK Smart Bitcoin (R-BTC) #5611

Merged
merged 2 commits into from
Jul 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions assets/src/main/java/bisq/asset/coins/RSKSmartBitcoin.java
Original file line number Diff line number Diff line change
@@ -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")));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ bisq.asset.coins.QMCoin
bisq.asset.coins.Qwertycoin
bisq.asset.coins.Radium
bisq.asset.coins.Remix
bisq.asset.coins.RSKSmartBitcoin
bisq.asset.coins.Ryo
bisq.asset.coins.Siafund
bisq.asset.coins.SiaPrimeCoin
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.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.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.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.
41 changes: 41 additions & 0 deletions assets/src/test/java/bisq/asset/coins/RSKSmartBitcoinTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/*
* 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");
}
}
1 change: 1 addition & 0 deletions core/src/main/java/bisq/core/locale/CurrencyUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ public static List<CryptoCurrency> getMainCryptoCurrencies() {
result.add(new CryptoCurrency("LTC", "Litecoin"));
result.add(new CryptoCurrency("XMR", "Monero"));
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("ZEC", "Zcash"));
result.sort(TradeCurrency::compareTo);
Expand Down