mirror of
https://github.com/bisq-network/bisq.git
synced 2024-11-20 02:12:00 +01:00
Merge branch 'Development' into issue544-api
This commit is contained in:
commit
fbfb9ccc50
@ -154,6 +154,7 @@ public class CurrencyUtil {
|
||||
result.add(new CryptoCurrency("HNC", "HunCoin"));
|
||||
result.add(new CryptoCurrency("IOC", "I/O Coin"));
|
||||
result.add(new CryptoCurrency("IOTA", "IOTA", true));
|
||||
result.add(new CryptoCurrency("ELLA", "Ellaism"));
|
||||
result.add(new CryptoCurrency("IOP", "Fermat"));
|
||||
result.add(new CryptoCurrency("JNS", "Janus", true));
|
||||
result.add(new CryptoCurrency("JPYT", "JPY Tether"));
|
||||
@ -228,7 +229,7 @@ public class CurrencyUtil {
|
||||
result.add(new CryptoCurrency("ZEC", "Zcash"));
|
||||
result.add(new CryptoCurrency("XZC", "Zcoin"));
|
||||
result.add(new CryptoCurrency("ZEN", "ZenCash"));
|
||||
|
||||
|
||||
result.sort(TradeCurrency::compareTo);
|
||||
|
||||
// Util for printing all altcoins for adding to FAQ page
|
||||
|
@ -416,10 +416,10 @@ takeOffer.failed.offererNotOnline=Take offer request failed because maker is not
|
||||
takeOffer.failed.offererOffline=You cannot take that offer because the maker is offline.
|
||||
takeOffer.warning.connectionToPeerLost=You lost connection to the maker.\nHe might have gone offline or has closed the connection to you because of too many open connections.\n\nIf you can still see his offer in the offerbook you can try to take the offer again.
|
||||
|
||||
takeOffer.error.noFundsLost=\n\nNo funds have left your wallet yet.\nPlease try to restart you application and check your network connection to see if you can resolve the issue.
|
||||
takeOffer.error.feePaid=\n\nThe taker fee is already paid. In the worst case you have lost that fee. We are sorry about that but keep in mind it is a very small amount.\nPlease try to restart you application and check your network connection to see if you can resolve the issue.
|
||||
takeOffer.error.depositPublished=\n\nThe deposit transaction is already published.\nPlease try to restart you application and check your network connection to see if you can resolve the issue.\nIf the problem still remains please contact the developers for support.
|
||||
takeOffer.error.payoutPublished=\n\nThe payout transaction is already published.\nPlease try to restart you application and check your network connection to see if you can resolve the issue.\nIf the problem still remains please contact the developers for support.
|
||||
takeOffer.error.noFundsLost=\n\nNo funds have left your wallet yet.\nPlease try to restart your application and check your network connection to see if you can resolve the issue.
|
||||
takeOffer.error.feePaid=\n\nThe taker fee is already paid. In the worst case you have lost that fee. We are sorry about that but keep in mind it is a very small amount.\nPlease try to restart your application and check your network connection to see if you can resolve the issue.
|
||||
takeOffer.error.depositPublished=\n\nThe deposit transaction is already published.\nPlease try to restart your application and check your network connection to see if you can resolve the issue.\nIf the problem still remains please contact the developers for support.
|
||||
takeOffer.error.payoutPublished=\n\nThe payout transaction is already published.\nPlease try to restart your application and check your network connection to see if you can resolve the issue.\nIf the problem still remains please contact the developers for support.
|
||||
takeOffer.tac=With taking that offer I agree to the trade conditions as defined in that screen.
|
||||
|
||||
takeOffer.currencyForFee=Taker fee
|
||||
@ -1170,7 +1170,7 @@ The error message will be copied to clipboard when you click the below buttons.\
|
||||
It will make debugging easier if you can attach the Bisq.log file which you can find in the application directory.\n\
|
||||
You can open the application directory at \"Account/Backup\".
|
||||
|
||||
popup.error.tryRestart=Please try to restart you application and check your network connection to see if you can resolve the issue.
|
||||
popup.error.tryRestart=Please try to restart your application and check your network connection to see if you can resolve the issue.
|
||||
popup.error.createTx=Error at creating transaction: {0}
|
||||
|
||||
error.spvFileCorrupted=An error occurred when reading the SPV chain file.\nIt might be that the SPV chain file is corrupted.\n\nError message: {0}\n\nDo you want to delete it and start a resync?
|
||||
|
1504
common/src/main/resources/i18n/displayStrings_zh_cn.properties
Normal file
1504
common/src/main/resources/i18n/displayStrings_zh_cn.properties
Normal file
File diff suppressed because it is too large
Load Diff
@ -170,8 +170,18 @@ public class ArbitratorManager {
|
||||
Map<NodeAddress, Arbitrator> map = arbitratorService.getArbitrators();
|
||||
arbitratorsObservableMap.clear();
|
||||
Map<NodeAddress, Arbitrator> filtered = map.values().stream()
|
||||
.filter(e -> isPublicKeyInList(Utils.HEX.encode(e.getRegistrationPubKey()))
|
||||
&& verifySignature(e.getPubKeyRing().getSignaturePubKey(), e.getRegistrationPubKey(), e.getRegistrationSignature()))
|
||||
.filter(e -> {
|
||||
final boolean isInPublicKeyInList = isPublicKeyInList(Utils.HEX.encode(e.getRegistrationPubKey()));
|
||||
if (!isInPublicKeyInList)
|
||||
log.warn("We got an arbitrator which is not in our list of publicKeys. Arbitrator=", e.toString());
|
||||
final boolean isSigValid = verifySignature(e.getPubKeyRing().getSignaturePubKey(),
|
||||
e.getRegistrationPubKey(),
|
||||
e.getRegistrationSignature());
|
||||
if (!isSigValid)
|
||||
log.warn("Sig check for arbitrator failed. Arbitrator=", e.toString());
|
||||
|
||||
return isInPublicKeyInList && isSigValid;
|
||||
})
|
||||
.collect(Collectors.toMap(Arbitrator::getNodeAddress, Function.identity()));
|
||||
|
||||
arbitratorsObservableMap.putAll(filtered);
|
||||
|
@ -95,11 +95,10 @@ public class BsqChainState implements PersistableEnvelope {
|
||||
|
||||
|
||||
// TEST NET
|
||||
// 0.5 BTC to grazcoin ms4ewGfJEv5RTnBD2moDoP5Kp1uJJwDGSX
|
||||
// 0.3 BTC to alice: myjn5JVuQLN9S4QwGzY4VrD86819Zc2uhj
|
||||
// 0.2BTC to bob: mx3xo655TAjC5r7ScuVEU8b6FMLomnKSeX
|
||||
private static final String BTC_TEST_NET_GENESIS_TX_ID = "e360c3c77f43d53cbbf3dc8064c888a10310930a6427770ce4c8ead388edf17c";
|
||||
private static final int BTC_TEST_NET_GENESIS_BLOCK_HEIGHT = 1119668;
|
||||
// TEST NET
|
||||
// Phase 0 initial genesis tx 6.10.2017: 2f194230e23459a9211322c4b1c182cf3f367086e8059aca2f8f44e20dac527a
|
||||
private static final String BTC_TEST_NET_GENESIS_TX_ID = "2f194230e23459a9211322c4b1c182cf3f367086e8059aca2f8f44e20dac527a";
|
||||
private static final int BTC_TEST_NET_GENESIS_BLOCK_HEIGHT = 1209140;
|
||||
|
||||
private static final String LTC_TEST_NET_GENESIS_TX_ID = "not set";
|
||||
private static final int LTC_TEST_NET_GENESIS_BLOCK_HEIGHT = 1;
|
||||
|
@ -44,16 +44,14 @@ public final class Preferences implements PersistedDataHost {
|
||||
new BlockChainExplorer("Chainflyer", "http://chainflyer.bitflyer.jp/Transaction/", "http://chainflyer.bitflyer.jp/Address/"),
|
||||
new BlockChainExplorer("Smartbit", "https://www.smartbit.com.au/tx/", "https://www.smartbit.com.au/address/"),
|
||||
new BlockChainExplorer("SoChain. Wow.", "https://chain.so/tx/BTC/", "https://chain.so/address/BTC/"),
|
||||
new BlockChainExplorer("Bitaps", "https://bitaps.com/", "https://bitaps.com/"),
|
||||
new BlockChainExplorer("Blockr.io", "https://btc.blockr.io/tx/info/", "https://btc.blockr.io/address/info/")
|
||||
new BlockChainExplorer("Bitaps", "https://bitaps.com/", "https://bitaps.com/")
|
||||
));
|
||||
private static final ArrayList<BlockChainExplorer> BTC_TEST_NET_EXPLORERS = new ArrayList<>(Arrays.asList(
|
||||
new BlockChainExplorer("Blocktrail", "https://www.blocktrail.com/tBTC/tx/", "https://www.blocktrail.com/tBTC/address/"),
|
||||
new BlockChainExplorer("Blockexplorer", "https://blockexplorer.com/testnet/tx/", "https://blockexplorer.com/testnet/address/"),
|
||||
new BlockChainExplorer("Biteasy", "https://www.biteasy.com/testnet/transactions/", "https://www.biteasy.com/testnet/addresses/"),
|
||||
new BlockChainExplorer("Smartbit", "https://testnet.smartbit.com.au/tx/", "https://testnet.smartbit.com.au/address/"),
|
||||
new BlockChainExplorer("SoChain. Wow.", "https://chain.so/tx/BTCTEST/", "https://chain.so/address/BTCTEST/"),
|
||||
new BlockChainExplorer("Blockr.io", "https://tbtc.blockr.io/tx/info/", "https://tbtc.blockr.io/address/info/")
|
||||
new BlockChainExplorer("SoChain. Wow.", "https://chain.so/tx/BTCTEST/", "https://chain.so/address/BTCTEST/")
|
||||
));
|
||||
|
||||
private static final ArrayList<BlockChainExplorer> LTC_MAIN_NET_EXPLORERS = new ArrayList<>(Arrays.asList(
|
||||
|
@ -270,7 +270,7 @@ public class BisqApp extends Application {
|
||||
TradeWalletService tradeWalletService = injector.getInstance(TradeWalletService.class);
|
||||
BtcWalletService walletService = injector.getInstance(BtcWalletService.class);
|
||||
if (walletService.isWalletReady())
|
||||
new SpendFromDepositTxWindow(tradeWalletService).show();
|
||||
new ManualPayoutTxWindow(tradeWalletService).show();
|
||||
else
|
||||
new Popup<>().warning(Res.get("popup.warning.walletNotInitialized")).show();
|
||||
} else if (DevEnv.DEV_MODE) {
|
||||
|
@ -39,8 +39,8 @@ import javax.annotation.Nullable;
|
||||
import static io.bisq.gui.util.FormBuilder.addLabelInputTextField;
|
||||
|
||||
// We dont translate here as it is for dev only purpose
|
||||
public class SpendFromDepositTxWindow extends Overlay<SpendFromDepositTxWindow> {
|
||||
private static final Logger log = LoggerFactory.getLogger(SpendFromDepositTxWindow.class);
|
||||
public class ManualPayoutTxWindow extends Overlay<ManualPayoutTxWindow> {
|
||||
private static final Logger log = LoggerFactory.getLogger(ManualPayoutTxWindow.class);
|
||||
private final TradeWalletService tradeWalletService;
|
||||
|
||||
|
||||
@ -48,7 +48,7 @@ public class SpendFromDepositTxWindow extends Overlay<SpendFromDepositTxWindow>
|
||||
// Public API
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
public SpendFromDepositTxWindow(TradeWalletService tradeWalletService) {
|
||||
public ManualPayoutTxWindow(TradeWalletService tradeWalletService) {
|
||||
this.tradeWalletService = tradeWalletService;
|
||||
type = Type.Attention;
|
||||
}
|
||||
@ -119,8 +119,8 @@ public class SpendFromDepositTxWindow extends Overlay<SpendFromDepositTxWindow>
|
||||
depositTxHex.setText("");
|
||||
P2SHMultiSigOutputScript.setText("");
|
||||
|
||||
buyerPayoutAmount.setText("1.03");
|
||||
sellerPayoutAmount.setText("0.03");
|
||||
buyerPayoutAmount.setText("");
|
||||
sellerPayoutAmount.setText("");
|
||||
arbitratorPayoutAmount.setText("0");
|
||||
|
||||
buyerAddressString.setText("");
|
||||
@ -131,13 +131,8 @@ public class SpendFromDepositTxWindow extends Overlay<SpendFromDepositTxWindow>
|
||||
sellerPubKeyAsHex.setText("");
|
||||
sellerPrivateKeyAsHex.setText("");
|
||||
|
||||
//4.9 (pkfcmj42c6es6tjt.onion)
|
||||
// arbitratorAddressString.setText("19xdeiQM2Hn2M2wbpT5imcYWzqhiSDHPy4");
|
||||
// arbitratorPubKeyAsHex.setText("02c62e794fe67f3a2115e2de4757143ff7f27bdf38aa4ae58a3595baa6d676875b");
|
||||
|
||||
// 4.2 (ntjhaj27rylxwvnp.onion)
|
||||
arbitratorAddressString.setText("1FdFzBazmHQxbUbdCUJwuCtR37DrZrEobu");
|
||||
arbitratorPubKeyAsHex.setText("030fdc2ebc297df4047442f6079f1ce3b7d1938a41f88bd11497545cc94fcfd315");
|
||||
arbitratorAddressString.setText("");
|
||||
arbitratorPubKeyAsHex.setText("");
|
||||
|
||||
actionButtonText("Sign and publish transaction");
|
||||
|
@ -309,6 +309,12 @@ public final class AltCoinAddressValidator extends InputValidator {
|
||||
return new ValidationResult(true);
|
||||
else
|
||||
return regexTestFailed;
|
||||
case "ELLA":
|
||||
// https://github.com/ethereum/web3.js/blob/master/lib/utils/utils.js#L403
|
||||
if (!input.matches("^(0x)?[0-9a-fA-F]{40}$"))
|
||||
return regexTestFailed;
|
||||
else
|
||||
return new ValidationResult(true);
|
||||
default:
|
||||
log.debug("Validation for AltCoinAddress not implemented yet. currencyCode: " + currencyCode);
|
||||
return validationResult;
|
||||
|
@ -200,4 +200,18 @@ public class AltCoinAddressValidatorTest {
|
||||
assertFalse(validator.validate("decent-").isValid);
|
||||
assertFalse(validator.validate("").isValid);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testELLA() {
|
||||
AltCoinAddressValidator validator = new AltCoinAddressValidator();
|
||||
validator.setCurrencyCode("ELLA");
|
||||
|
||||
assertTrue(validator.validate("0x65767ec6d4d3d18a200842352485cdc37cbf3a21").isValid);
|
||||
assertTrue(validator.validate("65767ec6d4d3d18a200842352485cdc37cbf3a21").isValid);
|
||||
|
||||
assertFalse(validator.validate("0x65767ec6d4d3d18a200842352485cdc37cbf3a216").isValid);
|
||||
assertFalse(validator.validate("0x65767ec6d4d3d18a200842352485cdc37cbf3a2g").isValid);
|
||||
assertFalse(validator.validate("65767ec6d4d3d18a200842352485cdc37cbf3a2g").isValid);
|
||||
assertFalse(validator.validate("").isValid);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user