Commit graph

1608 commits

Author SHA1 Message Date
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
lukasz
e20a2711f8
Use only EUR when creating a SEPA payment account - additional refactoring 2019-12-26 11:32:48 +01:00
lukasz
3f0d882a25
Use only EUR when creating a SEPA payment account 2019-12-26 11:04:40 +01:00
chimp1984
358588f903
Improve column sorting 2019-12-23 18:26:33 -05:00
Steven Barclay
0bcf238d71
Optimise CurrencyUtil.get[Fiat|Crypto|Trade]Currency
Use a LinkedHashMap in place of a List, for the caching CurrencyUtil
fields 'allSortedFiatCurrencies' & 'allSortedCryptoCurrencies', using
the same iteration order as before. In this way, we can avoid a linear
search in the lookup methods getFiatCurrency & getCryptoCurrency.

In particular, this speeds up the activation of TradesChartsView (and to
a lesser extent OfferBookChartView), which make a lot of calls to
CurrencyUtil.getTradeCurrency in the fillTradeCurrencies/updateChartData
methods respectively.
2019-12-23 22:29:32 +00:00
chimp1984
fadd384443
Use min. refund at mediated payout
At mediation we require a min. payout to the losing party to keep
incentive for the trader to accept the mediated payout. For Refund
agent cases we do not have that restriction.
2019-12-23 12:55:55 -05:00
chimp1984
95a79a3536
Refactoring: Remove unused parameter 2019-12-23 12:00:58 -05:00
Steven Barclay
24889c87d7
Remove unused fields passed as constructor params from various classes
These are mostly injected objects that are now redundant, such as some
CoinFormatter and Preferences fields.

Also do some additional minor tidying of TradesChartsViewModel.
2019-12-22 23:48:57 +00:00
chimp1984
ccd0a77437
Fix sorting functions 2019-12-21 20:33:14 -05:00
chimp1984
3781eb0bc1
Make all DAO screen tables resize to max. screen height 2019-12-21 20:04:19 -05:00
chimp1984
31b618d862
Add 2 new columns to vote result
Add threshold and quorum column.
Combine name and link column.
Add sorting function for accepted column.
Adjust column width.
2019-12-21 19:27:28 -05:00
chimp1984
de144143e5
Add button for shutdown
If a trader has a pending trade with an unconfirmed tx and is doing a
spv resync, the deposit tx is not found. They get displayed a popup
asking to restart and if problem continues to move trade to failed
trades. In regtest testing the missing deposit tx was always received
from the network at a restart. So this commit adds another button as
default button to shut down Bisq so that the user do first that activity
instead of moving the trade to failed trades.
It is not guaranteed that the trader will receive the missing deposit tx
at restart, but at least it is better as the state before. We should
find a way how to distinguish a valid unconfirmed tx from an invalid one
but it is not clear yet how we can do that and if it is feasible with
doing that with BitcoinJ only. It might require a external service to
look up the tx if it is in the mem pool, but even that will never gie a
100% certainty.
2019-12-21 16:17:12 -05:00
Christoph Atteneder
35ef9b62f9
Fix wrong styling of link icon in dark mode
It also removes a style workaround that is not needed anymore.
Side note: the style that was set never existed anyways.
2019-12-19 11:35:48 +01:00
Christoph Atteneder
26044d8ce1
Not use style workaround
After some testing on Regtest it seems that this workaround is no longer needed.
This fixes the issue for the remove button mentioned in #3185.
2019-12-19 11:23:44 +01:00