Commit Graph

11337 Commits

Author SHA1 Message Date
cd2357
d972a7571a
Improve exception handling to match Codacy rules
Rewrite a few generic parts of the code to be more specific in what they
 handle, or how they handle the resulting data structure.
2020-08-08 17:12:39 +02:00
cd2357
0c2703848c
Apply Codacy style changes
Apply various changes in coding style, required by the Codacy check.
2020-08-08 16:05:15 +02:00
cd2357
9fb5c0bb53
Remove unused imports
Removed unused imports from pricenode classes.
2020-08-08 15:24:08 +02:00
cd2357
11076e773d
Set quiet flag for java install command
Reduce verbosity of install command to only errors

Co-authored-by: wiz <j@wiz.biz>
2020-08-06 10:26:13 +02:00
cd2357
36dbb2e943
Upgrade Java to v11
Use Java 11 to run the pricenode service, since v11 includes by
default some root certificates needed when establishing SSH connections
to some of the new API endpoints.
2020-08-05 23:26:03 +02:00
cd2357
82bbb2dafa
Upgrade Tor to v3
Use tor v3 addresses during a new pricenode setup.
2020-08-05 23:20:14 +02:00
cd2357
4dc24e5606
Disable BitcoinAverage
Disable BitcoinAverage provider. Keep it registered as a provider to
ensure that the data structure returned by the pricenode to the Bisq
clients contain the hardcoded "btcAverageTs" key.
2020-08-05 23:17:18 +02:00
cd2357
8d335441c3
Fix Bitpay and CoinGecko altcoin rates
Correctly interpret the alt conversion rate reported by the API. For
alts, Bisq needs the Alt/BTC rate, whereas the API returns the BTC/Alt
one. Calculate the inverse of the reported values before storing them as
 Bisq internal datastructures (ExchangeRates).
2020-07-28 21:10:25 +02:00
cd2357
efda45fa78
Integrate Hitbtc exchange API
Add Hitbtc ExchangeRateProvider and corresponding unit test.
2020-07-27 18:55:11 +02:00
cd2357
b362b4c8d2
Integrate Huobi exchange API
Add Huobi ExchangeRateProvider and corresponding unit test.
2020-07-27 18:53:13 +02:00
cd2357
5a194420ed
Integrate Coinpaprika API
Add Coinpaprika ExchangeRateProvider and corresponding unit test.
2020-07-27 16:17:38 +02:00
cd2357
399f65d404
Integrate CoinGecko API
Add CoinGecko ExchangeRateProvider and corresponding unit test.
2020-07-27 14:53:03 +02:00
cd2357
9be2a5bbb4
Integrate Bitpay exchange rate API
Add a Bitpay exchange rate provider and corresponding unit test.
2020-07-27 14:52:36 +02:00
cd2357
637378b58a
Integrate more exchanges using knowm xchange
Add more exchange providers supported by the knowm xchange library.

This extends support for a few new currencies.
2020-07-27 13:02:25 +02:00
cd2357
7fc5191798
Reuse sets of supported currencies
Reuse sets of supported currencies between pricenode classes and tests.
2020-07-20 18:14:38 +02:00
cd2357
329188db1d
Reduce number of exchange API calls when polling
Retrieve the exchange rates in bulk, when possible. This reduces
the number of calls the pricenode makes to the exchange API from N =
"number of exchange rates to retrieve" to N = 1.

The replaced approach, which made a separate call to the exchange API
for each exchange rate, was sometimes failing due to reaching API rate
limits.
2020-07-20 18:14:38 +02:00
cd2357
aceb7eef15
Renamed ExchangeRateProvider test class
Give a more accurate name to the abstract test class
which contains common methods used by all
ExchangeRateProvider tests, like BinanceTest or KrakenTest.

Mark this test class as abstract, to indicate that it
should not be run as a standalone test.
2020-07-20 18:14:37 +02:00
cd2357
75a0a47a1e
Mark new ExchangeRateProviders as package-private
Remove public modifier in their class definitions to
preserve their package-private scope.
2020-07-20 18:14:37 +02:00
cd2357
020547e19b
Remove Order annotation from ExchangeRateProviders
Remove Order annotation from rate providers, which was
used in the case that multiple providers would retrieve
rates for the same currency.

The ExchangeRateService now handles such scenarios, thus
eliminating the need for deciding provider precedence via
the Order annotation.
2020-07-20 18:14:37 +02:00
cd2357
5cffddc9ae
Rewrite else-if clause
Simplify if-else block to avoid redundant use of else-if
in combination with an empty check and a return statement.
2020-07-20 18:14:37 +02:00
cd2357
3e314a9d24
Rename exception variables to ex
Update the name of exception variables to ex for
consistency and better readability.
2020-07-20 18:14:37 +02:00
cd2357
141ead0b2f
Wrap comments at 90 characters
Update comments to reflect bisq-network/style#5 guideline
2020-07-20 18:14:37 +02:00
cd2357
c6ef40e5e4
Revert XChange version to keep jdk10 compatibility
Revert from latest v5.0.0 to v4.2.2, since the newer version libraries
are compiled with Java 11, so they cannot be used as part of the Bisq
build process which still partially relies on Java 10.
2020-07-20 18:14:37 +02:00
cd2357
671e80929a
Integrate initial set of ExchangeRateProviders
Add support for a few exchanges to demonstrate and test the pricenode
aggregate rates.

The chose exchanges were selected because they each provide a varied
list of fiat and altcoins, with a substantial overlap between them. This
 provides a robust initial set of datapoints and scenarios for aggregate
  rates.
2020-07-20 18:14:37 +02:00
cd2357
f650115580
ExchangeRateService: Support aggregate rates
Add support for aggregate rates in the ExchangeRateService. If multiple
ExchangeRateProviders contain rates for the same currency, then these
rates will be automatically aggregated (averaged) into one.

This allows the service to transparently scale to multiple providers for
 any specific currency.

The clients index the rates received from the pricenode by currency
code, which means they expect at most a single rate per currency. By
aggregating rates from multiple providers into one per currency, the
ExchangeRateService provides more accurate price data. At the same time,
the service API data structure remains intact, thus preserving backward
compatibility with all clients.
2020-07-20 18:14:37 +02:00
cd2357
f2085b4bf0
Simplify validation in ExchangeRateServiceTest
Update sanity check methods to allow for deeper and more comprehensive
validations of the input data. Accept full ExchangeRateProviders in the
method signatures, instead of just the provider prefix, to allow for
more complex sanity checks within those validation methods.
2020-07-20 18:14:37 +02:00
sqrrm
1ea244e4b5
Merge pull request #4368 from bisq-network/release/v1.3.6
Release/v1.3.6
2020-07-20 11:04:02 +02:00
Christoph Atteneder
93fb7630d6
Revert to SNAPSHOT version 2020-07-13 21:39:42 +02:00
Christoph Atteneder
125c394076
Update translations for v1.3.6 2020-07-08 15:44:11 +02:00
Christoph Atteneder
e9bb95e77a
Update data stores for v1.3.6 2020-07-08 15:44:05 +02:00
Christoph Atteneder
2a0783d7c1
Update bitcoinj checkpoints 2020-07-08 15:43:56 +02:00
sqrrm
e1fcbfac18
Merge pull request #4357 from ripcurlx/update-data-stores-for-v1.3.6
Update of data stores for v1.3.6
2020-07-08 15:43:05 +02:00
Christoph Atteneder
4e858f5698
Merge pull request #4358 from jmacxx/fix_transactions_csv
Fix nullpointer exception in transactions csv report
2020-07-08 14:33:07 +02:00
Christoph Atteneder
618e797bc7
Merge pull request #4360 from jmacxx/fix_popups
Fix popup window ordering problem
2020-07-08 14:31:21 +02:00
wiz
0eaf9cea8b
Add V3 seednode sn2bisq 2020-07-08 13:29:07 +02:00
Christoph Atteneder
6d39d2e9b6
Merge pull request #4359 from wiz/add-miker-torv3-seednode
Add V3 seednode sn2bisq
2020-07-08 13:28:34 +02:00
jmacxx
0c9b4a142c
Fix popup window ordering problem
There is a race condition in PopupManager when with a stack of 2 popups,
the top popup is being replaced by another top-level popup. The base
layer popup ends up on top of the z-order, obscuring the correct one.

The race condition in PopupManager was within the onHidden() method
which invokes the next window in the queue.  The call to displayNext()
needs to be asynchronous so that a newer popup can take precedence.

Fixes #4293
2020-07-07 16:39:42 -05:00
wiz
f18e7d711a
Add V3 seednode sn2bisq 2020-07-08 01:15:46 +09:00
pedromvpg
4b2bed3d65
Increase contrast in date picker colors 2020-07-07 16:13:31 +02:00
Christoph Atteneder
dd033daa44
Merge pull request #4355 from wiz/dark-theme-v2-fix-date-picker
Increase contrast of date picker colors in Dark Theme v2
2020-07-07 16:12:41 +02:00
jmacxx
3f8a3c78f3
Fix nullpointer exception in transactions CSV report
1. number of columns in header was incorrect
2. memo field can be null, needed to be converted to empty string

Fixes #4333
2020-07-07 09:07:40 -05:00
Christoph Atteneder
a25680ffa2
Update translations for v1.3.6 2020-07-07 15:57:38 +02:00
Christoph Atteneder
1d8353555c
Update data stores for v1.3.6 2020-07-07 15:56:06 +02:00
Christoph Atteneder
3b49acdf12
Update bitcoinj checkpoints 2020-07-07 15:37:00 +02:00
sqrrm
b984ff7ae0
Fix taker use all BSQ for fee payment
Issue: if a taker used exactly all BSQ from the BSQ inputs to pay the
trading fee, there was no BSQ change in the takeOfferFeeTx. It was
assumed that the second output was the reservedForTrade output, but in
the case of missing BSQ change it was the first output.

Fix: added a check to make sure the value of the inputs to the deposit
tx match the expected inputAmount.

Added a check that if there is no BSQ outputs in the bsqTradingFeeTx a
change output is added of value 1 satoshi more than the BSQ input value.
This ensures that the second output is always the reservedForTrade
output. It also ensures that the BSQ is burnt, even in the very unlikely
case that the amount of BSQ burnt is larger than the reservedForTrade
amount.
2020-07-07 15:33:44 +02:00
Christoph Atteneder
2050f08be9
Merge pull request #4354 from sqrrm/fee-overpay-bug
Fix taker use all BSQ for fee payment
2020-07-07 15:32:55 +02:00
pedromvpg
fd535801ba
Increase contrast in date picker colors 2020-07-07 03:17:05 +09:00
sqrrm
a8e4b51709
Fix taker use all BSQ for fee payment
Issue: if a taker used exactly all BSQ from the BSQ inputs to pay the
trading fee, there was no BSQ change in the takeOfferFeeTx. It was
assumed that the second output was the reservedForTrade output, but in
the case of missing BSQ change it was the first output.

Fix: added a check to make sure the value of the inputs to the deposit
tx match the expected inputAmount.

Added a check that if there is no BSQ outputs in the bsqTradingFeeTx a
change output is added of value 1 satoshi more than the BSQ input value.
This ensures that the second output is always the reservedForTrade
output. It also ensures that the BSQ is burnt, even in the very unlikely
case that the amount of BSQ burnt is larger than the reservedForTrade
amount.
2020-07-06 18:36:30 +02:00
Christoph Atteneder
7613912c75
Bump version number for v1.3.6 2020-07-04 21:02:29 +02:00
Christoph Atteneder
716947a799
Merge pull request #4334 from wiz/dark-theme-v2
Update Dark Theme to V2 with new CSS and images by Pedro
2020-07-04 21:00:06 +02:00