Commit graph

1821 commits

Author SHA1 Message Date
Chris Beams
8b30c22d6e
Move bisq.core{=>.app}.CoreModule
There are two structural / organizational reasons for this move:

 1. References from one package to another should always be upward or
 lateral, never downward, as the latter causes package cycles (aka
 'tangles') which damage the suppleness and understandability of a large
 codebase. Prior to this change the high-level bisq.core.CoreModule
 class imported many classes from child packages like
 bisq.core.{btc,dao,user,util}, etc. By moving CoreModule down into the
 '.app' package, it can reference all these other packages as siblings
 instead of doing so as a parent.

 2. the bisq.core.desktop and bisq.core.app packages are the only
 locations that reference the CoreModule class. By moving the class
 into bisq.core.app, greater cohesion is acheived, again making the
 codebase that much easier to read and understand.
2020-01-20 12:07:43 +01:00
Dominykas Mostauskis
86489e0d74
Improve readability of the daily burnt BSQ chart
Relevant issue thread: #3753

Currently the daily burnt BSQ chart under 'DAO -> Facts and Figures' is
distorted by outliers. This introduces a 'Zoom to inliers' toggle (off
by default), which, when toggled on, effectively zooms the chart to
inliers, thus removing the distortion. Also, a moving average is
plotted, to further improve the chart's readibility.

The chart is also changed from an area chart to a line chart, on the
presumption that it was an area chart for cosmetic reasons, but now that
there are two series in it (the moving average was added) an area chart
makes less sense.

Another noteworthy change is that the other chart in the screen, monthly
issued BSQ, has its Y axis set to start at zero, so as to improve
readability. This might seem outside the scope of this commit, but the
other changes involved some refactoring, which involved cleaning up some
duplicated logic, which involved configuring both of these charts
together, which involved forcing zero to be on the axis.

This implementation mixes some plotting logic (responsible for zooming
in on inliers) into the view logic, because I opted to implement said
zooming as an external manipulation of a chart's axis. I chose this in
favor of implementing a new Chart, because it would have required
including multiple large classes (relevant JavaFX's classes can't be
ergonomically extended) to the code base. I presumed that my chosen
solution will be easier to maintain.

I am not entirely happy with this choice and can see myself introducing
some plotting-related classes to encapsulate creating charts like these,
thus unmixing plotting logic from view logic. In the meantime this is a
working solution, and I plan to continue working on these charts in the
near future.
2020-01-18 15:35:56 +02:00
Dominykas Mostauskis
c6941cf412
Provide an online moving average algorithm
Allows computing a simple moving average lazily from a Stream, to be
used in plotting noisy data. Will be used in the daily burnt BSQ chart
under 'DAO -> Facts and Figures'. Can be easily modified to compute
other moving averages, like exponential.
2020-01-18 15:24:26 +02:00
Dominykas Mostauskis
0775aee6cb
Provide a way to zoom a chart axis to inliers
This utility provides ways to zoom in a chart (more specifically its
axes) on inlier data points. The principal use-case is to restore
readability to charts that were distorted by outliers. The first (and
maybe the last) chart to use this is the daily burnt BSQ chart under
'DAO -> Facts and Figures'.
2020-01-18 15:22:55 +02:00
Christoph Atteneder
a3307daa60
Merge pull request #3897 from rafaelpac/trade-limit-popup
Fix popup message about trade limits
2020-01-16 17:19:43 +01:00
Christoph Atteneder
c50a761ef0
Use macOS app Info.plist setting for automatic light/dark title bar (#3883)
* Use macOS app Info.plist setting for automatic light/dark title bar

* Update desktop/package/macosx/Info.plist

Co-Authored-By: Christoph Atteneder <christoph.atteneder@gmail.com>

Co-authored-by: Christoph Atteneder <christoph.atteneder@gmail.com>
2020-01-16 16:07:49 +01:00
wiz
74ff4a0e16
Update desktop/package/macosx/Info.plist
Co-Authored-By: Christoph Atteneder <christoph.atteneder@gmail.com>
2020-01-16 23:57:01 +09:00
sqrrm
5233b85708
Merge pull request #3881 from bisq-network/release/v1.2.5
Release/v1.2.5
2020-01-15 13:09:15 +01:00
Pac
200806b31e
Fix popup message about trade limits
When a user tries to take an offer which is above his limit, the old popup is still being shown.
It says that the user limits will be raised when his account is 2 months old.
But that is not true anymore, now we have account signing etc...
This fix uses the string that is already used for offer creation, which is good since preserves translations.
But I think we would need a better message, which I am afraid I cannot get done, showing the sign state and age.
I am submitting this PR as is now since I think this is a big issue.
New users might try to use Bisq to accept an offer, get this message and then decide to wait 2 months, in vain.
So, it partially fixes #3885.
2020-01-13 16:55:03 -03:00
Christoph Atteneder
17c37db887
Merge branch 'master' of github.com:bisq-network/bisq into release/v1.2.5
# Conflicts:
#	core/src/main/resources/i18n/displayStrings_el.properties
2020-01-13 15:20:15 +01:00
Devin Bileck
61d20268f2
Revert to using provided BTC nodes if custom nodes are invalid
If the user entered an invalid hostname for a custom BTC node, such as a
V3 onion address, after restarting Bisq they would be presented with an
error due to the node being unreachable and unable to continue nor
correct the config.

So now a warning message will be shown in this situation informing the
user of an invalid config and once they restart their client they will
connect to the provided BTC nodes.

Fixes #3137
2020-01-12 22:58:34 -08:00
Devin Bileck
074ff6ad23
Allow for selecting custom BTC nodes on testnet 2020-01-12 22:52:33 -08:00
Devin Bileck
fc9f3d05b9
Suppress shutdown popup when BTC nodes have not changed
The shutdown popup was appearing when the BTC nodes input field lost
focus regardless if the input had changed or not.
2020-01-12 22:52:33 -08:00
Devin Bileck
5e52dc58a8
Add input validation for ignored peers and BTC nodes
Ignored peers and BTC nodes input fields will now only accept IPv4 and
V2 onion addresses, with multiple addresses separated using a comma.
2020-01-12 22:52:32 -08:00
Devin Bileck
b0113d59a7
Allow setting validation error message for InputTextField
This will allow for a custom validation error message to be defined,
particularly useful for providing a user-friendly message for regex
validation.
2020-01-11 23:29:06 -08:00
Chris Beams
65175a7f4f
Remove --desktopWith{Grpc|Http}Api options for now
The previous commit introduces the BisqGrpcServer as a proof of concept,
but it is not yet ready for production use. This commit removes the
`--desktopWithGrpcApi` option that starts the gRPC server until such
time that it is production-ready.

This change also removes the `--desktopWithHttpApi` option for starting
an HTTP API server. The option has been in place for some time, but it
was 'false advertising' in the sense that nothing actually happened if
the user specified it, because there is in fact no HTTP API
implementation to be started.

Note that when the gRPC API option is reintroduced, it will be renamed
to `--rpcserver` or similar, following the convention in Bitcoin Core.
2020-01-10 19:48:26 +01:00
chimp1984
5c02ce5766
Introduce gRPC API proof of concept
This commit introduces a new `grpc` module including the following key
types:

 - BisqGrpcServer: The API implementation itself, along with generated
   gRPC Response/Reploy types defined in grpc/src/main/proto/grpc.proto.

 - BisqGrpcServerMain: A 'headless' / daemon-like entry point for
   running a Bisq node without the JavaFX desktop UI.

 - BisqGrpcClient: A simple, repl-style client for the API that allows
   the user to exercise the various endpoints as seen in the example
   below.

In the `desktop` module, the BisqAppMain class has been modified to
start a BisqGrpcServer instance if the `--desktopWithGrpcApi` option has
been set to `true`.

In the `core` module, a new `CoreApi` class has been introduced
providing a kind of comprehensive facade for all Bisq functionality to
be exposed via the RPC API.

How to explore the proof of concept:

 1. Run the main() method in BisqAppMain providing
 `--desktopWithGrpcApi=true` as a program argument or alternatively, run
 the main() method in BisqGrpcServerMain, where no special option is
 required. In either case, you'll notice the following entry in the log
 output:

    INFO  bisq.grpc.BisqGrpcServer: Server started, listening on 8888

 2. Now run the main() method in BisqGrpcClient. Once it has started up
 you are connected to the gRPC server started in step 1 above. To
 exercise the API, type `getVersion` via stdin and hit return. You
 should see the following response:

    INFO bisq.grpc.BisqGrpcClient - 1.2.4

 Likewise, you can type `getBalance` and you'll see the following
 response:

    INFO bisq.grpc.BisqGrpcClient - 0.00 BTC

 and so forth for each of the implemented endpoints. For a list of
 implemented endpoints, see BisqGrpcServer.start().

Note once again that the code here is merely a proof of concept and
should not be considered complete or production-ready in any way. In a
subsequent commit, the `--desktopWithGrpcApi` option will be disabled in
order to avoid any potential production use.

The content of this commit is the result of squashing a number of
commits originally authored by chimp1984 in the `chimp1984` fork's `grpc`
branch.

Co-authored-by: Chris Beams <chris@beams.io>
2020-01-10 19:48:26 +01:00
wiz
e0d347a61e
Use macOS app Info.plist setting for automatic light/dark title bar 2020-01-10 08:09:58 +09:00
Christoph Atteneder
701b124270
Revert to SNAPSHOT version 2020-01-09 19:41:42 +01:00
Christoph Atteneder
2c0dee8dd0
Add back manual style workaround 2020-01-08 21:39:36 +01:00
Christoph Atteneder
bb45676f10
Remove non existing id style "cancel-button" 2020-01-08 21:39:22 +01:00
Christoph Atteneder
5dcd98b1fa
The small icon on top should match the label color 2020-01-08 21:39:14 +01:00
Christoph Atteneder
3a395bca4e
Add back manual style workaround 2020-01-08 21:24:21 +01:00
Christoph Atteneder
6638d01716
Remove non existing id style "cancel-button" 2020-01-08 18:18:04 +01:00
Christoph Atteneder
10cf4bb020
The small icon on top should match the label color 2020-01-08 18:00:59 +01:00
Christoph Atteneder
5ca90009ad
Update buy and sell color and move all color codes to the top 2020-01-08 17:31:06 +01:00
Christoph Atteneder
1ce9e56408
Force the text-fill style to fix wrong text color every now and then 2020-01-08 17:30:58 +01:00
Christoph Atteneder
34dc386cb5
Update buy and sell color and move all color codes to the top 2020-01-08 17:27:25 +01:00
Christoph Atteneder
8b38feef91
Force the text-fill style to fix wrong text color every now and then 2020-01-08 17:26:56 +01:00
Christoph Atteneder
166d38f1e9
Use general "(required minimum)" label with BTC value if min value is used 2020-01-07 19:53:36 +01:00
Christoph Atteneder
af4994534a
Only validate security deposit amount if used 2020-01-07 19:53:26 +01:00
Christoph Atteneder
4377a10007
Show minimum security deposit in create offer dialog when used
In the past we allowed the user to enter a percentage of the trade amount
although it wasn't used if the minimum security deposit was higher.
2020-01-07 19:53:14 +01:00
Christoph Atteneder
9ec10cf0e9
Add information if minimum trading fee or minimum security deposit is used 2020-01-07 19:53:07 +01:00
Christoph Atteneder
e7c16a6fe7
Use general "(required minimum)" label with BTC value if min value is used 2020-01-07 18:20:33 +01:00
Christoph Atteneder
b9d51caabd
Only validate security deposit amount if used 2020-01-07 17:54:47 +01:00
Christoph Atteneder
d904d1ee6a
Show minimum security deposit in create offer dialog when used
In the past we allowed the user to enter a percentage of the trade amount
although it wasn't used if the minimum security deposit was higher.
2020-01-07 17:30:00 +01:00
Christoph Atteneder
e6f491c8ac
Add information if minimum trading fee or minimum security deposit is used 2020-01-07 16:32:24 +01:00
Pac
9b1ccf3626
Fix account age format when ended in 1
The method formatAccountAge is replacing the string "1 days" for "1 day".
This is done to fix the plural for that case.
But it is also changing strings like "21 days" into "21 day".
2020-01-05 03:17:19 -03:00
Christoph Atteneder
bbfd4baf7e
Bump version number for v1.2.5 2020-01-04 16:09:49 +01:00
Christoph Atteneder
fdec61e41b
Use only EUR when creating a SEPA payment account (#3833)
* Use only EUR when creating a SEPA payment account

* Use only EUR when creating a SEPA payment account - additional refactoring
2020-01-03 11:32:48 +01:00
sqrrm
ae2e06de23
Merge pull request #3827 from chimp1984/use-min-refund-at-mediated-payout
Use min. refund at mediated payout
2020-01-03 11:17:49 +01:00
wiz
53a627f4fb
Fix build error on master branch 2020-01-03 18:38:08 +09:00
Christoph Atteneder
b2d4bb34f0
Merge pull request #3807 from beingindot/altcoin-offer-noerror-fix
creating altcoin offer not throwing error during previously set high security deposit
2020-01-03 10:20:25 +01:00
chimp1984
680dd29100
Use early return 2020-01-03 02:16:15 +01:00
Christoph Atteneder
bd81843890
Merge pull request #3834 from beingindot/limit-error-msg
Trade limit error message is not clear
2020-01-02 19:38:38 +01:00
Christoph Atteneder
91774c6c3b
Merge pull request #3823 from chimp1984/fix-dao-tables-resizing
Make all DAO screen tables resize to max. screen height
2020-01-02 18:58:35 +01:00
sqrrm
3a74e74e15
Merge pull request #3828 from stejbac/speed-up-trade-charts-view-load
Speed up trades charts view load
2020-01-02 18:46:25 +01:00
sqrrm
eeea465a0c
Merge pull request #3826 from chimp1984/increase-security-deposits
Increase security deposits
2020-01-02 12:18:05 +01:00
sqrrm
567684172d
Merge pull request #3821 from chimp1984/handle-spv-resync-edge-cases
Improve handling of spv resync edge case
2020-01-02 12:04:31 +01:00
beingindot
bbd273b4b8
Trade limit error message is not clear
Fixes #3712
2019-12-26 16:31:48 +05:30