Commit Graph

6966 Commits

Author SHA1 Message Date
chimp1984
492182a97d
Add half-year and quarter periods 2022-05-15 17:35:02 +02:00
chimp1984
5f2a430e4e
Add chart series for total trade fees
Fix missing color adoption for BSQ supply series
2022-05-15 15:39:59 +02:00
ghubstan
381985ec3a
Fix API editoffer bug: set fixed-price=0 on margin offers
This is causing erroneous PRICE_OUT_OF_TOLERANCE errors when trying
to take offers having (fixed) price!=0, and isUsingMktPriceMargin=true
in the payload.

The API daemon editoffer's treatment of (fixed) price and
isUsingMktPriceMargin flag in the API has been inconsistent with the UI.

With this change:  when isUsingMktPriceMargin=true, (fixed) price is
set to 0 on the server.  API clients, however, still must show the
calculated price when isUsingMktPriceMargin=true, making this fix hard
to test in the client.  The server will now throw an exception if
(fixed) price and isUsingMktPriceMargin flag in the API are not
properly set in the API server.

This fix is intended to prevent issues such as
https://github.com/bisq-network/bisq/issues/6170 from happening for
this reason.  The offer maker edited offers with API, creating
inconsistent state described above.  It is hoped the user's offers
can be fixed by editing them in the UI.

Based on `master`.
2022-05-14 18:14:49 -03:00
jmacxx
17a949e4d1
Refactor BSQ fee validation to handle multiple txins. 2022-05-12 21:14:26 -05:00
Christoph Atteneder
23347e6203
Add missing copyright notice 2022-05-10 11:20:25 +02:00
xyzmaker123
219b408b6a
Show changes in BSQ Supply over time - dynamic calculation 2022-05-10 10:30:25 +02:00
xyzmaker123
5fb1167a28
Show changes in BSQ Supply over time 2022-05-10 10:30:25 +02:00
Christoph Atteneder
8a13076b37
Merge pull request #6188 from xyzmaker123/mark-own-offers
Mark user's own offers in Market -> Offer book
2022-05-09 13:10:50 +02:00
xyzmaker123
2b69e34b3a
Mark user's own offers in Market -> Offer book 2022-05-05 10:59:50 +02:00
Christoph Atteneder
80aff38fe7
Merge pull request #6182 from jmacxx/txvalidator_fee_address_fix
Check current fee receiver list whenever a fee tx is validated.
2022-05-02 09:54:06 +02:00
jmacxx
b40e424389
Refresh current fee receiver list whenever a fee tx is validated. 2022-05-02 09:53:50 +02:00
ghubstan
740284ab0a
Adjust to renamed class: AustraliaPayidAccountPayload 2022-05-02 09:52:12 +02:00
ghubstan
03b6924508
Adjust to renamed class: AustraliaPayidAccountPayload 2022-05-02 09:52:12 +02:00
ghubstan
b011bae18f
Remove deleted (renamed) class 2022-05-02 09:52:11 +02:00
ghubstan
4c7e214743
Rename AustraliaPayidPayload -> AustraliaPayidAccountPayload
Fit to nameing convention for acct payload classes; API's reflection
based acct creation logic depends on it.
2022-05-02 09:52:11 +02:00
jmacxx
f0c79439bb
Fix uninitialized member variable payoutSuggestion. 2022-05-02 09:51:19 +02:00
Christoph Atteneder
0152f00493
Merge pull request #6183 from ghubstan/fix-getacctform-testbug
Rename AustraliaPayidPayload -> AustraliaPayidAccountPayload
2022-05-02 09:46:24 +02:00
Christoph Atteneder
4737a36a7b
Merge pull request #6181 from jmacxx/fix_npe_mediator_ticket
[1.9.0] Fix uninitialized variable causing NPE in mediation ticket.
2022-05-02 09:39:05 +02:00
ghubstan
c03dac5a26
Adjust to renamed class: AustraliaPayidAccountPayload 2022-04-30 11:11:01 -03:00
ghubstan
4df152b833
Adjust to renamed class: AustraliaPayidAccountPayload 2022-04-30 11:10:13 -03:00
ghubstan
77a206e0db
Remove deleted (renamed) class 2022-04-30 11:09:12 -03:00
ghubstan
f58d39e720
Rename AustraliaPayidPayload -> AustraliaPayidAccountPayload
Fit to nameing convention for acct payload classes; API's reflection
based acct creation logic depends on it.
2022-04-30 11:06:29 -03:00
jmacxx
99a74dd4d7
Refresh current fee receiver list whenever a fee tx is validated. 2022-04-29 11:25:56 -05:00
jmacxx
bf6be8998d
Fix uninitialized member variable payoutSuggestion. 2022-04-29 07:58:17 -05:00
Christoph Atteneder
5b2c58b108
Update translations for v1.9.0 2022-04-28 13:12:59 +02:00
Christoph Atteneder
41c7168bb6
Update bitcoinj checkpoints for v1.9.0 2022-04-28 13:10:30 +02:00
jmacxx
d89c3c8bf4
Add popup reminder to inform users of trading rules. 2022-04-28 11:29:32 +02:00
Christoph Atteneder
b71ffc2a4b
Merge pull request #6164 from jmacxx/popup_trading_rules
Add popup reminder to inform users of trading rules
2022-04-28 11:29:19 +02:00
Christoph Atteneder
6d3863dbc6
Merge pull request #6172 from xyzmaker123/refactor-cash-deposit-payload
Refactor CashDepositAccountPayload to extends BankAccountPayload
2022-04-28 11:28:03 +02:00
xyzmaker123
ca50662ff2
Refactor CashDepositAccountPayload to extends BankAccountPayload 2022-04-28 11:21:20 +02:00
jmacxx
7f141bc04c
Set maxTradeLimit & maxTradePeriod appropriately when editing an offer. 2022-04-28 11:17:44 +02:00
jmacxx
f31040ba31
Set maxTradeLimit & maxTradePeriod appropriately when editing an offer. 2022-04-27 22:25:28 -05:00
xyzmaker123
b932f0fa64
Refactor CashDepositAccountPayload to extends BankAccountPayload 2022-04-27 13:12:35 +02:00
Christoph Atteneder
b4506ac2de
Merge pull request #6167 from xyzmaker123/fix-npe-same-bank-edit-account-name
Fix problems with editing account names
2022-04-27 13:00:59 +02:00
xyzmaker123
3a1e1843c9
Fix NPE when switching to not use a custom account name 2022-04-27 12:50:39 +02:00
xyzmaker123
3619278e51
Fix NPE when switching to not use a custom account name 2022-04-26 12:31:27 +02:00
xyzmaker123
b79f963ee7
Fix issue with deleting newly created account 2022-04-26 10:52:36 +02:00
xyzmaker123
74d33e9600
Fix issue with deleting newly created account 2022-04-26 08:45:13 +02:00
jmacxx
36165f686e
Add popup reminder to inform users of trading rules. 2022-04-25 21:11:13 -05:00
Christoph Atteneder
23c62f1f0a
Improve translation key usage 2022-04-22 12:04:25 +02:00
Christoph Atteneder
529755738b
Not log as warning 2022-04-22 12:04:18 +02:00
Christoph Atteneder
5f41a3fb08
Improve translation key usage 2022-04-22 12:02:47 +02:00
Christoph Atteneder
539664d7e3
Not log as warning 2022-04-22 12:02:09 +02:00
Christoph Atteneder
0466f41934
Merge pull request #6135 from ripcurlx/improve-navigation-structure
Improve navigation structure
2022-04-22 11:33:53 +02:00
Christoph Atteneder
4447435e5f
Switch to open offers after creating a new offer 2022-04-22 10:01:35 +02:00
Christoph Atteneder
dde4199a15
Merge pull request #6133 from xyzmaker123/fix-pause-in-fee-service
Fix pause between fee requests
2022-04-21 10:54:31 +02:00
Christoph Atteneder
2233f73a7b
Fix Codacy complaints 2022-04-21 10:32:27 +02:00
Christoph Atteneder
9431dd5331
Merge pull request #6140 from jmacxx/change_additional_info_prompt
Clarify that CBM / F2F not be used to advertise websites or contact info
2022-04-20 21:33:51 +02:00
Christoph Atteneder
108255bf8e
Move supported currencies into payment accounts 2022-04-20 17:57:07 +02:00
Christoph Atteneder
fce247cbc0
Fix a couple of issues regarding default currencies 2022-04-13 12:35:58 +02:00
Christoph Atteneder
82cae5a87d
Merge pull request #6147 from jmacxx/add_inbound_connectivity_test
Add inbound Tor connectivity test
2022-04-13 10:56:31 +02:00
jmacxx
c6209e0142
Use Locale.ENGLISH when accessing directories and JAR resource paths. 2022-04-12 18:25:06 -05:00
jmacxx
c3e6a80f78
Add inbound Tor connectivity test. 2022-04-12 14:43:30 -05:00
Christoph Atteneder
9a3ed33238
Use Offer.isFiat helper method 2022-04-11 12:31:54 +02:00
Christoph Atteneder
63ea054026
Adapt amount and volume description for create offer 2022-04-11 12:12:47 +02:00
Christoph Atteneder
492ff35b09
Adapt amount and volume description for take offer 2022-04-11 11:32:55 +02:00
Christoph Atteneder
5b67766109
Properly rename main navigation
Otherwise it would display the old 'Buy BTC' and 'Sell BTC' navigation
2022-04-11 10:46:05 +02:00
jmacxx
54c63fd116
Clarify that CBM / F2F not be used to advertise websites or contact info. 2022-04-10 13:14:16 -05:00
Christoph Atteneder
33725c2b4e
Adapt navigation labels back to currency code
and fix lots of minor issues
2022-04-08 17:49:33 +02:00
Christoph Atteneder
497158ad13
Fix rebase errors with master 2022-04-07 21:13:24 +02:00
Christoph Atteneder
a8189d7bb3
Adapt create offer process to new navigation structure 2022-04-07 20:49:18 +02:00
Christoph Atteneder
924e92aa47
Adapt take offer process to new navigation structure 2022-04-07 20:49:18 +02:00
Christoph Atteneder
810a29b54f
Add missing payment account filtering 2022-04-07 20:49:17 +02:00
Christoph Atteneder
5781e3bd13
Add payment account filtering for remaining payment methods 2022-04-07 20:49:17 +02:00
Christoph Atteneder
875e5f4e87
Adapt offer book chart view to new navigational structure 2022-04-07 20:49:16 +02:00
Christoph Atteneder
98f355d3fa
Adapt navigational structure and offerbook handling to buy and sell different assets
Still missing correct create and take offer handling
2022-04-07 20:48:48 +02:00
Christoph Atteneder
298806150b
Merge pull request #6134 from jmacxx/fix_tradecount_bsqswap
Fix the avatar tradecount tag to include BSQ Swap trades.
2022-04-07 19:58:38 +02:00
Christoph Atteneder
02fac2149b
Merge pull request #6131 from jmacxx/fix_bsq_dashboard_freeze
Prevent UI freeze in BSQ dashboard view.
2022-04-07 19:56:15 +02:00
jmacxx
14821536c6
code review: remove duplicated lines. 2022-04-05 21:56:43 -05:00
jmacxx
aeea26725f
Fix the tradecount tag to include Bsq Swap trades. 2022-04-05 18:01:51 -05:00
jmacxx
589404f928
Refactor tradestatistics feed to the price feed service.
Price change events were being fired too frequently and for ccys
which had not changed.
This caused UI freezing issues most noticably in the DAO dashboard.
2022-04-05 15:38:53 -05:00
xyzmaker123
2073e68d87
Fix pause between fee requests 2022-04-05 17:27:18 +02:00
Christoph Atteneder
3f02d52789
Merge pull request #6132 from jmacxx/purge_sensitive_data_failed_trades
Check failed trades for sensitive data purge.
2022-04-05 11:52:04 +02:00
jmacxx
91a9804572
Check failed trades for sensitive data purge. 2022-04-04 16:34:42 -05:00
Christoph Atteneder
3166ea398c
Merge pull request #6130 from jmacxx/dao_status_wording
Clarify DAO status shown when in sync & peers have conflicts.
2022-04-04 21:11:20 +02:00
jmacxx
275e710eb2
Clarify DAO status shown when in sync but peers have conflicts. 2022-04-04 09:33:30 -05:00
jmacxx
581deb7056
Remove unused imports 2022-04-03 17:40:47 -05:00
jmacxx
60db9440c7
Generate addresses field from script when necessary (v22+ RPC) 2022-04-03 17:32:35 -05:00
jmacxx
d0a9e660b3
Get TXO address from scriptPubKey 2022-03-28 15:16:53 -05:00
Christoph Atteneder
a384071cff
Merge pull request #6109 from xyzmaker123/5979-price-validation
Update trigger price validation
2022-03-21 12:26:47 +01:00
xyzmaker123
55c55dbf47
Update trigger price validation - refactor 2022-03-21 11:43:09 +01:00
Christoph Atteneder
06dd94f77a
Merge pull request #6107 from xyzmaker123/growth-241-validate-with-iban
IBAN validation for SEPA account
2022-03-18 12:38:47 +01:00
xyzmaker123
044bc2d33b
Transactions View - Trade ID column 2022-03-17 15:57:01 +01:00
xyzmaker123
ab5d7dd928
Locked view - Trade ID column 2022-03-17 15:56:51 +01:00
xyzmaker123
d548dcba07
Reserved view - Offer ID column 2022-03-17 15:56:35 +01:00
xyzmaker123
41256367af
Update trigger price validation 2022-03-17 12:42:41 +01:00
xyzmaker123
ab1a8a8a2b
SEPA IBAN - fix country code validation 2022-03-16 15:17:45 +01:00
xyzmaker123
7fc406761a
Validate if IBAN country code belongs to SEPA zone 2022-03-16 10:22:29 +01:00
xyzmaker123
fd776954cc
Validate IBAN to match selected country 2022-03-16 09:29:03 +01:00
ghubstan
a3990783a4
Send pretty payment details to api clients
Non-CLI clients need a better way of accessing payment details
than a contract json string.

- Add grpc.proto PaymentAccountPayloadInfo field: payment_details.
- Adjust proto wrapper PaymentAccountPayloadInfo to new field.
- Add test asserts to verify payment details are sent to client.
- Fix a test name: testKeepFunds -> testCloseTrade.

Based on branch `master` @ Sat 12 Mar 2022 01:42 PM -03 ,
         commit c6293b5273
2022-03-12 14:33:23 -03:00
Bisq GitHub Admin
c6293b5273
Merge pull request #6096 from bisq-network/release/v1.8.4
Release/v1.8.4
2022-03-11 15:57:55 +01:00
Christoph Atteneder
a188266d65
Merge pull request #6099 from jmacxx/mediation_enhancements_202203
Dispute subsystem enhancements
2022-03-11 15:55:42 +01:00
jmacxx
7e802e5e28
Dispute subsystem enhancements.
Dispute result show payout suggestion and penalty.
Feature allowing trader chat upload to dispute agents.
2022-03-10 20:20:37 -06:00
ghubstan
24e5f193be
Exclude persistedAccountName field from json payment acct forms
This recently added field is automatically set inside PaymentAccount.
It should not be included in the payment acct json forms used by API clients.

Based on branch `master`.
2022-03-09 12:07:33 -03:00
Christoph Atteneder
0ea70dc36b
Merge pull request #6014 from xyzmaker123/6009-account-names-editable
Editable account names
2022-03-09 14:56:00 +01:00
Christoph Atteneder
b3b488c38c
Merge pull request #6094 from ghubstan/3-fix-is-activated-setting-bug
API bug-fix for incorrect BsqSwap's OfferInfo.isActivated value [No. 3]
2022-03-08 11:26:44 +01:00
Christoph Atteneder
20a3ec0592
Merge pull request #6088 from ghubstan/2-improve-grpc-exception-status-code-mapping
Send meaningful io.grpc.Status.Code to gRPC clients [No. 2]
2022-03-08 11:25:35 +01:00
Christoph Atteneder
ae17da93ea
Merge pull request #6086 from ghubstan/move-cli-crypto-offer-filter-to-server
Move get (cryptocurrency) offer filter to daemon [No. 1]
2022-03-08 11:23:05 +01:00
ghubstan
1ba2b6ca18
Fix API OfferInfo.isActivated setting for bsqswaps
I think this bug was introduced when deprecating GrpcOffersService
 .getMyOffer(id), in favor of using only getOffer(id) for 'my'
and 'available' offers.  This change explicitly sets the proto's
isActivated flag in the OfferInfo factory methods, and adds checks
to api offer test cases.

Based on branch `2-improve-grpc-exception-status-code-mapping`,
PR https://github.com/bisq-network/bisq/pull/6088
2022-03-07 20:46:27 -03:00
jmacxx
e9c021eac6
Fix DAO needs resync popup.
The resync popup was being shown when flag isInConflictWithSeedNode
was set, but there is also a different relevant flag
isDaoStateBlockChainNotConnecting which can happen in certain
situations.  For that case we also need to show the popup.
2022-03-07 16:35:20 +01:00
ghubstan
784e2ae894
Send meaningful io.grpc.Status.Code to gRPC clients
Exceptions thrown by the core.api services for the daemon Grpc*Services
have to be converted into gRPC StatusRuntimeExceptions before being sent to
gRPC clients.  Most of these gRPC StatusRuntimeExceptions had a gRPC
Status.Code.UNKNOWN, which not helpful to client error handlers.

This change partially resolves the issue by sending more meaningful
io.grpc.Status.Codes to clients, where possible.  But it is not as
comprehensive as it an be for a webapp because HTTP has so many more
possible response status codes than the gRPC library (sixteen). See:
https://github.com/grpc/grpc-java/blob/master/api/src/main/java/io/grpc/Status.java

There are three types of changes:

- Create custom exceptions in bisq.core.api.exception.

- Map any custom bisq.core.api.exception to a meaningful
  io.grpc.Status.Code within daemon Grpc*Service classes.

- Adjust apitest cases to new grpc status codes.

Based on branch `move-cli-crypto-offer-filter-to-server`,  PR https://github.com/bisq-network/bisq/pull/6086
2022-03-05 20:31:50 -03:00
jmacxx
5b03c1a4c5
Fix DAO needs resync popup.
The resync popup was being shown when flag isInConflictWithSeedNode
was set, but there is also a different relevant flag
isDaoStateBlockChainNotConnecting which can happen in certain
situations.  For that case we also need to show the popup.
2022-03-04 14:17:53 -06:00
ghubstan
b7fb3df0d4
Move get (cryptocurrency) offer filter to daemon
Some API reference & Python bot examples exposed an API bug the Java CLI
has been hiding. Due due this Bisq v1 Offer entity design:

- In fiat offers, the baseCurrencyCode=BTC, counterCurrencyCode=FiatCode
- In altcoin offers, baseCurrencyCode=AltcoinCode, counterCurrencyCode=BTC,

new API examples were not doing what the CLI has been doing for several
months, which is get (cryptocurrency) all BTC offers from the server,
and filter on the altcoin code.  The CLI side filtering should have been
done on the server, as it is in this commit.

A lot of dead gRPC client side offer filtering code is removed as well.

Based on `master`.
2022-03-03 16:19:00 -03:00
Christoph Atteneder
ea1222b8c9
Merge pull request #6077 from ripcurlx/update-data-stores-for-v1.8.3
Update data stores for v1.8.3
2022-03-02 21:03:58 +01:00
xyzmaker123
e6320cdf06
Optimize imports 2022-02-28 13:53:38 +01:00
ghubstan
82a0f0060c
Adjust to grpc.proto TradeInfo field name changes
See commit b9b66b4826.
2022-02-27 18:13:54 -03:00
ghubstan
a1f059ded4
Merge branch '7-more-grpcproto-comments' into 8-remove-trdstats-service 2022-02-26 17:53:04 -03:00
ghubstan
f14806ea1f
Let minAmount param be optional 2022-02-26 17:48:44 -03:00
ghubstan
b904002991
Avoid number formatting problems if clients pass empty (default) str params 2022-02-26 17:17:42 -03:00
ghubstan
aa6f530555
Revert "Allow editoffer clients to pass empty string for price parameter"
This reverts commit fcd2bcd34f.
2022-02-26 15:26:24 -03:00
ghubstan
fcd2bcd34f
Allow editoffer clients to pass empty string for price parameter
The client may have passed an empty string for the price parameter,
if only enabling or disabling the offer.  If so, validate with new
price = old price.
2022-02-26 15:13:21 -03:00
ghubstan
ab8a3433c3
Use a zero fixed-price if useMarketBasedPrice=true
The CLI and apitest cases always pass "0", but java & python clients
might pass an empty string. This change avoids number formatting
& scaling problems when clients pass an empty string in the price
parameter.
2022-02-26 14:27:52 -03:00
ghubstan
2e9e51eb41
Remove GetTradeStatistics service from grpc.proto
This protobuf definition and service stub has been in place since
the start of work on the API, but was never fully implmented, nor
intended to be included in the API beta & v1 releases.

Its presence added a useless section to the gRPC API Reference doc.

	https://ghubstan.github.io/slate

Based on branch `7-more-grpcproto-comments`,
PR https://github.com/bisq-network/bisq/pull/6068.
2022-02-26 11:11:26 -03:00
Stan
1499465c11
Merge branch 'master' into 7-more-grpcproto-comments 2022-02-25 20:46:05 -03:00
Christoph Atteneder
c0ab215388
Merge pull request #6078 from jmacxx/5396_privacy_enhancement
[1.8.3] Clear sensitive dispute data based on dispute opening date.
2022-02-25 17:29:02 +01:00
jmacxx
a983e4a45e
Clear sensitive dispute data based on dispute opening date.
Change recommended setting for sensitive data clearing to 60 days.
2022-02-25 17:09:29 +01:00
jmacxx
327ea680ac
Clear sensitive dispute data based on dispute opening date.
Change recommended setting for sensitive data clearing to 60 days.
2022-02-25 09:49:36 -06:00
jmacxx
3bc096417e
Keep first dispute chat msg when clearing sensitive data.
Fixes https://github.com/bisq-network/bisq/pull/6001#issuecomment-1049710029
2022-02-25 16:01:32 +01:00
Christoph Atteneder
5824c9cabb
Merge pull request #6076 from jmacxx/5396_privacy_enhancement
[1.8.3] Keep first dispute chat msg when clearing sensitive data.
2022-02-25 16:01:25 +01:00
Christoph Atteneder
382c2a1681
Update bitcoinj checkpoints for v1.8.3 2022-02-24 20:47:32 +01:00
jmacxx
f430243b5e
Keep first dispute chat msg when clearing sensitive data.
Fixes https://github.com/bisq-network/bisq/pull/6001#issuecomment-1049710029
2022-02-24 11:44:36 -06:00
Christoph Atteneder
07f0e70731
Merge pull request #6072 from jmacxx/5396_privacy_enhancement
[1.8.3 fix] Get payment method ID from offerPayload pt.II
2022-02-23 15:42:54 +01:00
jmacxx
c12fb2e004
Get payment method ID from offerPayload.
Another problem with closed trades older than v1.7.0.
The payment method ID can always be obtained from offerPayload.
2022-02-23 15:42:34 +01:00
jmacxx
70752a1ffd
Get payment method ID from offerPayload.
Another problem with closed trades older than v1.7.0.
The payment method ID can always be obtained from offerPayload.
2022-02-21 23:22:54 -06:00
jmacxx
2bdfa524cf
Get payment method ID from offerPayload.
Was getting an NPE with closed trades older than v1.7.0.
makerPaymentMethodId was new at that point (null for older trades).
makerPaymentAccountPayload can be null for trades where we have
removed account info for privacy reasons (see #6001).
The payment method ID can always be obtained from offerPayload.
2022-02-21 20:23:14 +01:00
Christoph Atteneder
d12a13b1a1
Merge pull request #6069 from jmacxx/5396_privacy_enhancement
[1.8.3 fix] Get payment method ID from offerPayload
2022-02-21 20:22:59 +01:00
jmacxx
f3dfc14779
Get payment method ID from offerPayload.
Was getting an NPE with closed trades older than v1.7.0.
makerPaymentMethodId was new at that point (null for older trades).
makerPaymentAccountPayload can be null for trades where we have
removed account info for privacy reasons (see #6001).
The payment method ID can always be obtained from offerPayload.
2022-02-21 10:59:32 -06:00
jmacxx
99be324aba
Improve BSQ swap error messaging.
Re-enable popup warning indicating when DAO needs to be resynced.
2022-02-21 14:50:41 +01:00
Christoph Atteneder
b739b4c347
Merge pull request #6063 from jmacxx/bsq_swap_improve_dao_errmsg
Improve BSQ swap error messaging & DAO resync popup.
2022-02-21 14:50:31 +01:00
xyzmaker123
5e0ebf163d
Fix bug with text rendering on trade step info 2022-02-21 14:49:53 +01:00
ghubstan
66c04bdf3d
Adjust core.api to new .proto *Pct field names 2022-02-20 15:19:32 -03:00
xyzmaker123
3b966d8740
Fix bug with text rendering on trade step info 2022-02-20 10:13:56 +01:00
jmacxx
a302380e1e
Improve BSQ swap error messaging.
Re-enable popup warning indicating when DAO needs to be resynced.
2022-02-19 22:15:13 -06:00
ghubstan
a0b68bc756
Adjust .proto wrappers to price & volume type change
Some minor refactoring included.
2022-02-19 15:09:16 -03:00
ghubstan
d42c58073f
Change OfferInfo proto's volume fields' type to string 2022-02-18 16:43:23 -03:00
ghubstan
a5fc4b7d52
Get fee from dao state service if JFX prop filterManager.getFilter is null 2022-02-18 17:07:41 +01:00
Christoph Atteneder
aaac08202e
Merge pull request #6052 from ghubstan/alt-fix-feeservice-npe-in-api
Fix API FeeService NPE (Alternate)
2022-02-18 17:07:30 +01:00
ghubstan
fafe416e85
Adjust to string triggerPrice change in API core classes. 2022-02-18 11:24:02 -03:00
ghubstan
461edff631
Change OfferInfo proto's 'price' field type to string
Much less ambiguous field value at cost of breaking backward compat in API.
2022-02-17 17:27:15 -03:00
ghubstan
6f1057a766
Include unmerged API NPE fix to FeeService class (see PR #6052) 2022-02-17 13:28:14 -03:00
Christoph Atteneder
25441814ae
Update translations for v1.8.3 2022-02-17 10:48:22 +01:00
Christoph Atteneder
12a797d9e4
Merge pull request #6053 from jmacxx/display_signed_account_age
Show signed status when applicable in Trade & Dispute info screens
2022-02-17 10:35:41 +01:00
jmacxx
b1e88e8338
Add ability to copy popup text to clipboard. 2022-02-16 19:26:37 -06:00
jmacxx
1227781d43
Show signed status when applicable in Trade & Dispute screens 2022-02-16 16:09:08 -06:00
ghubstan
84eb653366
Get fee from dao state service if JFX prop filterManager.getFilter is null 2022-02-16 14:27:05 -03:00
Christoph Atteneder
d671b6805a
Merge pull request #6032 from jmacxx/sign_verify_msg_dao
Sign/Verify message for DAO bonded roles
2022-02-15 21:01:21 +01:00
Christoph Atteneder
3f978252ac
Merge pull request #6040 from jmacxx/fix_bsq_sending_issue
Fix issue selecting specific BSQ UTXO for send.
2022-02-15 21:00:20 +01:00
jmacxx
f601e0f42f
Obtain trade fee settings from filter 2022-02-15 13:23:33 -06:00
jmacxx
518ca6e0c3
Fix issue selecting specific BSQ UTX for send.
The BisqDefaultCoinSelector is invoked multiple times when a
transaction is being built.  Problem was that the coin selection
was being reset within, ultimately leading to coin selection
being completely ignored.  Solution is to reset the selection
after the transaction has been built.

The UI for selecting UTXO inputs was being resized to the number
of UTXO available, which caused problems when there is a large
UTXO set.  Solution is to size the UI to accomodate 3 to 15 rows,
which provides a reasonable screen display and a scrollbar is
provided for the case of a large UTXO set.
2022-02-11 11:15:27 -06:00
jmacxx
5e7e1c5704
Sign/Verify message for DAO bonded roles 2022-02-10 20:45:43 -06:00
Christoph Atteneder
4e225738c8
Not keep empty translation key 2022-02-09 10:56:53 +01:00
xyzmaker123
9831d19849
Update "get help" message
Co-authored-by: m52go <735155+m52go@users.noreply.github.com>
2022-02-08 09:44:26 +01:00
xyzmaker123
469f589582
Update "still not resolved" message
Co-authored-by: m52go <735155+m52go@users.noreply.github.com>
2022-02-08 09:44:25 +01:00
xyzmaker123
19d6b2607c
Add support/help links on the UI - trade details 2022-02-08 09:44:23 +01:00
xyzmaker123
90c2bfa651
Introduce SimpleMarkdownLabel 2022-02-08 09:44:17 +01:00
Christoph Atteneder
9c70a8a62a
Merge pull request #6029 from jmacxx/fix_issue_5877
Fix unhandled exception when locale specifies unknown country/region code.
2022-02-07 21:56:14 +01:00
Christoph Atteneder
ee33feeff7
Merge pull request #6018 from jmacxx/fix_OutOfSyncBsqBlocks
Fix exception: heightOfLastBlock must match chainHeight
2022-02-07 10:28:45 +01:00
Christoph Atteneder
5e7ac77d69
Merge pull request #6005 from w0000000t/keybase_>_matrix
Remove references to keybase and switch to Matrix
2022-02-07 10:26:24 +01:00
jmacxx
78e9ed2382
Fix NPE when locale specifies unknown country code. 2022-02-05 11:21:59 -06:00
jmacxx
5c48a289a6
Warn and prompt for password before showing wallet keys. 2022-02-02 18:38:35 -06:00
WAT
7b191a4049
Remove references to keybase and switch to Matrix
Except `dao.bond.bondedRoleType.ROCKET_CHAT_ADMIN` which refers to an
unused role, every other instance of `keybase` has been contextually
updated to Matrix (bisq.chat); functions to display moderator name
and profile address on keybase have been updated to work with Matrix
usernames and urls.
Kept translated resources in original state as per jmacxx suggestion.
2022-02-02 16:57:06 +01:00
jmacxx
33644b0983
Fix exception: heightOfLastBlock must match chainHeight 2022-02-01 22:10:22 -06:00
Christoph Atteneder
fcb13ed772
Merge pull request #5976 from ghubstan/1-gettrades
Add API 'gettrades' method
2022-02-01 11:10:45 +01:00
jmacxx
57821b7474
Clear account payload info & chats from closed trades & disputes. 2022-01-31 14:58:22 -06:00
ghubstan
820642516a
Remove unnecessary casts 2022-01-27 17:27:20 -03:00
ghubstan
ad638e33cd
Revert "Sort API gettrades's response list by trade date"
This reverts commit f231aacb31.

Sorting cumulative trade history lists should be done once, in GrpcTradesService.
2022-01-27 16:36:14 -03:00
ghubstan
f231aacb31
Sort API gettrades's response list by trade date 2022-01-26 11:43:31 -03:00
Christoph Atteneder
ffd2a92ae9
Merge pull request #5963 from xyzmaker123/transactions-filtering
Add missing filtering on lists
2022-01-26 09:59:53 +01:00
ghubstan
4c8cec54f3
Push Trade->TradeModel mapping down from CoreApi into CoreTradesService 2022-01-25 19:11:24 -03:00
ghubstan
4ab4c3d213
Log exception and return "Not Available" when trade role cannot be found 2022-01-25 12:21:22 -03:00
ghubstan
d902e77710
Add Bisq license banners 2022-01-25 11:44:42 -03:00
Christoph Atteneder
9be361aa08
Merge pull request #5987 from xyzmaker123/refactor-remove-unused-classes
Cleanup: remove unused classes
2022-01-25 11:36:27 +01:00
xyzmaker123
669bc88900
Remove unused classes 2022-01-25 11:18:14 +01:00
xyzmaker123
752606d788
Add missing filtering on lists - adapt PendingTradesView to use FilterBox 2022-01-24 17:20:02 +01:00
sqrrm
f315bd299e
Merge pull request #5993 from bisq-network/release/v1.8.2
Release/v1.8.2
2022-01-24 16:26:35 +01:00
Christoph Atteneder
ded4c072cb
Merge pull request #5965 from MwithM/patch-2
Include penalty for exceeding transfer limits
2022-01-24 10:30:18 +01:00
ghubstan
3e14bd3fbe
Change var name 2022-01-23 17:05:55 -03:00
ghubstan
0e020e8987
Add payout fields to trade proto msgs, show optional trade/tx fees in swaps 2022-01-23 17:03:43 -03:00
ghubstan
fadaaf9151
Display tx-fee from BsqSwapProtocolModel 2022-01-22 16:22:41 -03:00
ghubstan
6e0299642e
Fill out gettrades-help.txt 2022-01-22 16:03:34 -03:00
ghubstan
69e6c9ce70
Remove duplicated buyer/seller proto fields (already exist no OfferInfo) 2022-01-20 16:50:08 -03:00
ghubstan
2e7346a695
Fix comments 2022-01-20 15:54:19 -03:00
Christoph Atteneder
fd42c4507d
Merge pull request #5966 from jmacxx/tor_bridges_fix
Tor bridges preferences fix
2022-01-20 18:15:17 +01:00
Christoph Atteneder
300b4aa613
Merge pull request #5975 from ripcurlx/update-data-stores-for-v1.8.1
Update data stores for v1.8.1
2022-01-20 18:12:18 +01:00
Christoph Atteneder
58dca6fd1b
Merge pull request #5981 from Emzy/master
update hostname of BSQ explorer mempool.emzy.de
2022-01-20 09:49:50 +01:00
Christoph Atteneder
638d638d25
Use isFiat method for checking if it is a fiat method 2022-01-20 09:48:13 +01:00
Christoph Atteneder
cad973efd1
Not create and publish account age witnesses for BSQ swap accounts 2022-01-20 09:48:02 +01:00
Stephan Oeste
6637806019
update hostname ob BSQ explorer
The new version 2.3.0 of mempool.space supports BSQ exporer only on a separate domain.
update URL to http://bisq.mempool.emzy.de/....

There is a redirect from the old location to the new one. 
So nothing is broken and the PR is low prio.
2022-01-19 17:32:49 +01:00
Christoph Atteneder
5e158e8300
Use isFiat method for checking if it is a fiat method 2022-01-19 16:55:09 +01:00
ghubstan
3cd1e05a9f
Try to display accurate status of closed trades, or "Pending" if still open 2022-01-18 13:01:42 -03:00
Christoph Atteneder
b7af53d22f
Update bitcoinj checkpoints for v1.8.1 2022-01-18 11:33:16 +01:00
Christoph Atteneder
1f22f89bb4
Not create and publish account age witnesses for BSQ swap accounts 2022-01-18 11:29:41 +01:00
ghubstan
d98d795c77
Add server impl for gettrades (open|closed), refactor getrole methods 2022-01-16 16:46:45 -03:00
ghubstan
fdd94fe1f2
Remove commented code 2022-01-16 16:44:18 -03:00
ghubstan
a9e7484aee
Add buyer/seller dep & status-desc fields to TradeInfo 2022-01-16 16:43:34 -03:00
ghubstan
5c217793c8
Add buyer/seller dep & status-desc fields to TradeInfoV1Builder 2022-01-16 16:42:34 -03:00
ghubstan
a53fee345f
Add List<OpenOffer> getCanceledOpenOffers() ClosedTradableManager 2022-01-16 16:41:53 -03:00
ghubstan
50bbbfe6c4
Add List<Trade> getTrades() to TradeManager (w/out transitive jfx dep) 2022-01-16 16:41:09 -03:00
ghubstan
b4fa52f4e4
Add List<Trade> getTrades() to FailedTradesManager (w/out transitive jfx dep) 2022-01-16 16:39:07 -03:00
jmacxx
684fd39c75
Force persistence write when editing Tor Bridge settings.
This is necessary because Tor settings are edited before the app has
completed startup and normally persistence is prohibited.
2022-01-16 11:52:44 -06:00
MwithM
7d1e8a1649
Include penalty for exceeding transfer limits
Nequi payment method did not include that there might be a penalty for exceeding the transfer limits. I have used the same wording for every payment method.
2022-01-13 20:01:21 +01:00
Christoph Atteneder
efac836fa2
Update translations for v1.8.1 2022-01-12 10:54:00 +01:00
Christoph Atteneder
63a241a64e
Remove unused translation keys 2022-01-12 10:47:11 +01:00
Bisq GitHub Admin
808c3ad9d9
Merge pull request #5930 from xyzmaker123/modify-accepted-countries
SEPA Account - editable account name and accepted countries
2022-01-12 10:32:20 +01:00
Bisq GitHub Admin
8401b3885b
Merge pull request #5870 from jmacxx/mediation_payout_ux
Improve user experience once mediation has been accepted by both parties
2022-01-12 10:23:02 +01:00
Bisq GitHub Admin
ddead5ef54
Merge pull request #5953 from jmacxx/logs_upload
Feature enabling log file upload to mediators
2022-01-12 09:41:32 +01:00
jmacxx
d9ad531b3c
Fix issue of space in file path 2022-01-11 09:23:49 -06:00
Christoph Atteneder
a1d0e570d1
Apply minor improvements and clean-ups 2022-01-11 12:36:44 +01:00
Christoph Atteneder
310b9a97f2
Merge pull request #5949 from jmacxx/fix_trade_fee_validation
Fix trade fee validation bug
2022-01-11 11:09:09 +01:00
Christoph Atteneder
4a3e29daf5
Improve wording of trade completed notification popups 2022-01-11 11:02:55 +01:00
Christoph Atteneder
9759cebc4d
Remove unused translations 2022-01-11 10:48:06 +01:00
Christoph Atteneder
5c26c635e5
Merge pull request #5961 from ghubstan/2-api-fail-unfail-trade
Add API methods 'failtrade', 'unfailtrade' + test case (#2)
2022-01-10 12:29:54 +01:00
Christoph Atteneder
96878e5789
Merge pull request #5957 from jmacxx/fix_issue_5956
Wording for Bsq swap cancellation popups & withdrawal prompt
2022-01-10 12:01:33 +01:00
xyzmaker123
1da71f6c66
SEPA Account - possibility to modify account name 2022-01-10 10:52:39 +01:00
xyzmaker123
b3bf1903be
SEPA Account - possibility to modify accepted countries 2022-01-10 10:52:25 +01:00
jmacxx
3ea1543882
fixes for Windows compatability, test added 2022-01-07 19:42:24 -06:00
ghubstan
7690ffd953
Add API methods 'failtrade', 'unfailtrade'
Prerequisite for next PR: Add API method 'gettrades'

The `gettrades` method will show 'open', 'closed', and 'failed' trades.
Users already needed to be able to fail and unfail trades for the
same reasons they do in the UI.  API test cases will need to be able to
fail and unfail trades to check correct behavior of 'gettrades' method.

Based on branch `rename-keepfunds2closetrade`.
2022-01-07 19:11:34 -03:00
jmacxx
99b4071bdf
Wording for Bsq swap cancellation popups & withdrawal prompt 2022-01-07 10:03:14 -06:00
jmacxx
9334cffc89
Feature enabling log file upload to mediators 2022-01-06 13:22:44 -06:00
ghubstan
a9aaba87fa
Rename API method keepfunds -> closetrade
Trade proceeds and deposits have already been transfered to Bisq wallets
before the `keepfunds` command is (was) executed;  `keepfunds` merely moves
open trades to closed trades lists and persistence files.  Renaming `keepfunds`
as `closetrade` makes its purpose clear to API users.

The commit modifies only method names and comments in api server+cli classes,
apitest cases, and api trade simulation scripts.

Based on `master`
2022-01-05 12:10:46 -03:00
jmacxx
298aca40bc
Fix trade fee validation bug when two BSQ UTXOs used to pay the fee.
A test has been added to validate the UTXO issue above.
Other tests have been updated as a result of the changes in PR 5826
where fee parameter is now supplied from a filter; this results
in more accurate (less lenient) fee checking.
2022-01-04 09:25:05 -06:00
Christoph Atteneder
dde48f7d9e
Merge pull request #5935 from jmacxx/dao_state_store_and_statistics
Improve DAO state store persistence and statistics logging [chimp1984]
2022-01-03 12:24:18 +01:00
Stan
53d693d710
Merge branch 'master' into 7-deprecate-api-getmyoffer 2021-12-27 12:09:22 -03:00
ghubstan
5f571cccca
Deprecate API 'getmyoffer'
The method 'getoffer' should support looking up a user's open-offers, and other users' available offers.

- Adjust api-beta-test-guide.md to use only 'getoffer'.
- Adjust trade simulation scripts to use only 'getoffer'.
- Adjust api testcases to use 'getoffer' in place of 'getmyoffer'.
- Mark appropriate methods and protobuf msgs as deprecated.
2021-12-27 12:05:17 -03:00
jmacxx
1162060e28
Simplify the trade complete summary dialog 2021-12-24 14:22:59 -06:00
jmacxx
9378fe4603
Patch from chimp1984 improving the DaoState persistence 2021-12-23 14:40:11 -06:00
Christoph Atteneder
23d1856a60
Merge pull request #5852 from ghubstan/create-swift-acct-with-api
Support and test creation of Swift accounts via API
2021-12-20 11:49:20 +01:00
KanoczTomas
dfbde480c6
Remove trailing spaces. 2021-12-18 23:41:33 +01:00
KanoczTomas
364560e348
Correct typo in list/array of nodes 2021-12-18 22:37:04 +01:00
KanoczTomas
6969ed7a84
Add @KanoczTomas btc node with onion v3 address 2021-12-14 23:58:07 +01:00
sqrrm
cf81fd451c
Merge pull request #5876 from ghubstan/5-api-bsqswap-simulation-n-docs-update
API BSQ swap simulation script and doc updates #5
2021-12-14 15:47:51 +01:00
Christoph Atteneder
a7c38630e8
Merge branch 'master' of github.com:bisq-network/bisq into release/v1.8.0
Conflicts:
	core/src/main/resources/i18n/displayStrings_pl.properties
2021-12-13 11:51:16 +01:00
chimp1984
97e4ed5a59
Revert usage of File.separator
File.separator doesn't appear to work on Windows. It has to be "/", not "\".
See: https://github.com/bisq-network/bisq/pull/5909#pullrequestreview-827992563
2021-12-09 20:07:21 +01:00
chimp1984
0f65567e1a
In case the BSQ blocks directory does not exist in resources (as in case of REG_TEST)
we do not want to log an error stacktrace but just an info message.

Use `File.separator` instead of "/"
2021-12-09 20:07:20 +01:00
chimp1984
225b78317f
Revert usage of File.separator
File.separator doesn't appear to work on Windows. It has to be "/", not "\".
See: https://github.com/bisq-network/bisq/pull/5909#pullrequestreview-827992563
2021-12-09 13:13:37 -05:00
chimp1984
d74bffb595
In case the BSQ blocks directory does not exist in resources (as in case of REG_TEST)
we do not want to log an error stacktrace but just an info message.

Use `File.separator` instead of "/"
2021-12-09 11:04:55 -05:00
Christoph Atteneder
eb074ac0e2
Merge pull request #5908 from ripcurlx/update-data-stores-for-v1.8.0-again
Update data stores for v1.8.0 (again, again)
2021-12-09 16:03:39 +01:00
chimp1984
444d045c4f
At shutdown the executor can throw a RejectedExecutionException which
is expected as we shut down the executor immediately.
If not thrown at shutdown or exception is not a RejectedExecutionException
we log a warning and re-throw the exception (to avoid change of behaviour
of current version). The exception is likely not handled by callers and goes up to
the uncaught exception handler.
2021-12-09 10:10:06 +01:00
Bisq GitHub Admin
be4cbcdcec
Merge pull request #5901 from chimp1984/handle-RejectedExecutionException-in-RpcService
Add Exception handling at RpcService
2021-12-09 10:09:24 +01:00
Steven Barclay
e07c7b5d4b
Fix BSQ blocks resync from resources on Windows & Linux
Prevent a "URI is not hierarchical" IllegalArgumentException from the
expression, 'new File(dirUrl.toURI())', which occurs on Linux & Windows
when listing the resource directory of BSQ blocks. Adapt a solution from
StackOverflow which uses two separate code paths depending on the
environment, into the new method 'FileUtil::listResourceDirectory'.

The issue is caused by the resource URL taking one of the two forms:

  file:/Users/[USER]/Java/bisq/bisq/p2p/out/production/resources/BsqBlocks_BTC_MAINNET
  jar:file:...p2p.jar!/BsqBlocks_BTC_MAINNET

depending on whether the system is OSX or not.
2021-12-09 09:52:30 +01:00
Christoph Atteneder
601163eeb3
Merge pull request #5900 from stejbac/fix-resync-blocks-from-resources
Fix resync BSQ blocks from resources
2021-12-09 09:51:51 +01:00
Christoph Atteneder
7d66264453
Update data stores for v1.8.0 (again, again) 2021-12-08 21:13:21 +01:00
chimp1984
81d112bdf3
Add null checks
Return early at connection if stopped
Cleanup logs
2021-12-08 19:39:37 +01:00
chimp1984
ee1371276f
Reduce timeouts
Add logs when shutdown starts
2021-12-08 19:39:37 +01:00
chimp1984
d5d60b59cc
Extract duplicated code at shutdown
Move timeout before shutdown sequence starts and use a Timer thread instead of
UserThread to avoid that in case the UserThread gets blocked that the timeout
would not get triggered.
Reduce timeout from 20 sec. to 10 sec.
2021-12-08 19:39:37 +01:00
Christoph Atteneder
ff3809713b
Merge pull request #5905 from chimp1984/improve_shutdown_process
Improve shutdown process
2021-12-08 19:39:22 +01:00
chimp1984
32cd812744
Increase trade protocol timeout from 60 sec to 120 sec 2021-12-08 19:37:41 +01:00
chimp1984
3d40b3bf29
Add null checks
Return early at connection if stopped
Cleanup logs
2021-12-07 21:07:40 -05:00
chimp1984
2474e0daf9
Reduce timeouts
Add logs when shutdown starts
2021-12-07 20:45:02 -05:00
chimp1984
4eb14fb226
Extract duplicated code at shutdown
Move timeout before shutdown sequence starts and use a Timer thread instead of
UserThread to avoid that in case the UserThread gets blocked that the timeout
would not get triggered.
Reduce timeout from 20 sec. to 10 sec.
2021-12-07 20:42:53 -05:00
chimp1984
b5b7e86323
Increase trade protocol timeout from 60 sec to 120 sec 2021-12-07 19:39:22 -05:00
chimp1984
e85e46cb13
At shutdown the executor can throw a RejectedExecutionException which
is expected as we shut down the executor immediately.
If not thrown at shutdown or exception is not a RejectedExecutionException
we log a warning and re-throw the exception (to avoid change of behaviour
of current version). The exception is likely not handled by callers and goes up to
the uncaught exception handler.
2021-12-07 09:58:11 -05:00
Steven Barclay
ec58b26657
Fix BSQ blocks resync from resources on Windows & Linux
Prevent a "URI is not hierarchical" IllegalArgumentException from the
expression, 'new File(dirUrl.toURI())', which occurs on Linux & Windows
when listing the resource directory of BSQ blocks. Adapt a solution from
StackOverflow which uses two separate code paths depending on the
environment, into the new method 'FileUtil::listResourceDirectory'.

The issue is caused by the resource URL taking one of the two forms:

  file:/Users/[USER]/Java/bisq/bisq/p2p/out/production/resources/BsqBlocks_BTC_MAINNET
  jar:file:...p2p.jar!/BsqBlocks_BTC_MAINNET

depending on whether the system is OSX or not.
2021-12-07 11:48:07 +00:00
Christoph Atteneder
75ca2faeb2
Update translations for v1.8.0 (again) 2021-12-07 11:12:29 +01:00
Christoph Atteneder
ed1dac715b
Add missing import 2021-12-07 10:01:24 +01:00
Christoph Atteneder
ce541f6401
Add missing import 2021-12-07 09:51:54 +01:00
Christoph Atteneder
d39820bbcd
Apply suggestions and fix edge case when BSQ legacy payment account offer is duplicated 2021-12-07 09:41:41 +01:00
Christoph Atteneder
f41203858c
Add visual icon for duplicate offer functionality 2021-12-07 09:41:41 +01:00
Christoph Atteneder
4d1ee3fc9b
Add support to duplicate bsq swap offers 2021-12-07 09:41:40 +01:00
Bisq GitHub Admin
5041dc57ef
Merge pull request #5886 from ripcurlx/add-bsq-swap-duplicate-offer-support
Add support to duplicate BSQ swap offers
2021-12-07 09:41:10 +01:00
Steven Barclay
ceb9b9acbd
Code cleanup: proto fields, duplicated expr & null char separator
1. Reorder the PoW fields in the 'Filter' proto by field index, instead
 of contextually.
2. Deduplicate expression for 'pow' & replace if-block with boolean op
 to simplify 'FilterManager::isProofOfWorkValid'.
3. Avoid slightly confusing use of null char as a separator to prevent
 hashing collisions in 'EquihashProofOfWorkService::getChallenge'. Use
 comma separator and escape the 'itemId' & 'ownerId' arguments instead.

(based on PR #5858 review comments)
2021-12-07 09:35:45 +01:00
Steven Barclay
92209c3ed7
Inline predicates to simplify HashCashService & FilterManager
Remove all the 'challengeValidation', 'difficultyValidation' and
'testDifficulty' BiPredicate method params from 'HashCashService' &
'ProofOfWorkService', to simplify the API. These were originally
included to aid testing, but turned out to be unnecessary.

Patches committed on behalf of @chimp1984.
2021-12-07 09:35:45 +01:00
Steven Barclay
772cd74ab2
Store difficulty as floating point in Filter & PoW
Change the type of the 'difficulty' field in the Filter & ProofOfWork
proto objects from int32/bytes to double and make it use a linear scale,
in place of the original logarithmic scale which counts the (effective)
number of required zeros.

This allows fine-grained difficulty control for Equihash, though for
Hashcash it simply rounds up to the nearest power of 2 internally.

NOTE: This is a breaking change to PoW & filter serialisation (unlike
the earlier PR commits), as the proto field version nums aren't updated.
2021-12-07 09:35:44 +01:00
Steven Barclay
266a7ccea4
Add+enable service to mint/verify Equihash proofs of work
Add an abstract base class, 'ProofOfWorkService', for the existing PoW
implementation 'HashCashService' and a new 'EquihashProofOfWorkService'
PoW implementation based on Equihash-90-5 (which has 72 byte solutions &
5-10 MB peak memory usage). Since the current 'ProofOfWork' protobuf
object only provides a 64-bit counter field to hold the puzzle solution
(as that is all Hashcash requires), repurpose the 'payload' field to
hold the Equihash puzzle solution bytes, with the 'challenge' field
equal to the puzzle seed: the SHA256 hash of the offerId & makerAddress.

Use a difficulty scale factor of 3e-5 (derived from benchmarking) to try
to make the average Hashcash & Equihash puzzle solution times roughly
equal for any given log-difficulty/numLeadingZeros integer chosen in the
filter.

NOTE: An empty enabled-version-list in the filter defaults to Hashcash
(= version 0) only. The new Equihash-90-5 PoW scheme is version 1.
2021-12-07 09:35:44 +01:00
Steven Barclay
23252caa3b
Fix method name typo: redoProofOfWorkAndRepublish 2021-12-07 09:35:44 +01:00
Steven Barclay
c3e5dfd19e
Add PoW version(-list) fields to ProofOfWork & Filter
Add a numeric version field to the 'ProofOfWork' protobuf object, along
with a list of allowed version numbers, 'enabled_pow_versions', to the
filter. The versions are taken to be in order of preference from most to
least preferred when creating a PoW, with an empty list signifying use
of the default algorithm only (that is, version 0: Hashcash).

An explicit list is used instead of an upper & lower version bound, in
case a new PoW algorithm (or changed algorithm params) turns out to
provide worse resistance than an earlier version.

(The fields are unused for now, to be enabled in a later commit.)
2021-12-07 09:35:43 +01:00
Steven Barclay
484afbc522
Code cleanup: replace (Bi)Function<..,Boolean> with (Bi)Predicate<..>
Replace 'BiFunction<T, U, Boolean>' with the primitive specialisation
'BiPredicate<T, U>' in HashCashService & FilterManager.

As part of this, replace similar predicate constructs found elsewhere.
NOTE: This touches the DAO packages (trivially @ VoteResultService).
2021-12-07 09:35:41 +01:00
Christoph Atteneder
0a31bf899e
Merge pull request #5858 from stejbac/add-asic-resistant-pow
Provide ASIC resistant PoW scheme for BSQ swaps
2021-12-07 09:34:50 +01:00
Steven Barclay
24d2a7f222
Code cleanup: proto fields, duplicated expr & null char separator
1. Reorder the PoW fields in the 'Filter' proto by field index, instead
 of contextually.
2. Deduplicate expression for 'pow' & replace if-block with boolean op
 to simplify 'FilterManager::isProofOfWorkValid'.
3. Avoid slightly confusing use of null char as a separator to prevent
 hashing collisions in 'EquihashProofOfWorkService::getChallenge'. Use
 comma separator and escape the 'itemId' & 'ownerId' arguments instead.

(based on PR #5858 review comments)
2021-12-06 22:55:14 +00:00
Christoph Atteneder
f5db85bc3d
Merge pull request #5894 from chimp1984/check-recipient-address-only-after-wallet-is-synced
Fix premature validation call
2021-12-06 20:29:27 +01:00
Christoph Atteneder
2cb238318f
Fix broken test 2021-12-06 12:05:34 +01:00
Christoph Atteneder
21f84bcd45
Fix broken test 2021-12-06 12:03:26 +01:00
chimp1984
60b3e1216a
Change max retries from 3 to 12
When doing a resync from genesis the number of blocks is limited to 6000
so that requires lots of requests and with that increases risk of broken
connections. Giving more tolerance for retries avoids that the user has
to restart the app.
2021-12-06 11:52:13 +01:00
chimp1984
c34a019a31
Fixes https://github.com/bisq-network/bisq/issues/5882
When syncing from genesis the number of blocks are limited so we get the
`onParseBlockCompleteAfterBatchProcessing` called each time when the received
 blocks are processed, and as we are not at wallet height we repeat requesting
 blocks. But the new check for the BTC recipient triggers a resync from resource call.
We add now a check that we do this check only once the wallet is synced and our
block height from dao state matches wallet blockheight.
2021-12-06 11:52:12 +01:00
Christoph Atteneder
6e1a805b22
Merge pull request #5875 from chimp1984/fix-incorrect-chainheight
Fix incorrect start height for block request
2021-12-06 11:36:00 +01:00
Christoph Atteneder
e5c70717f8
Merge pull request #5884 from MwithM/patch-1
Substitute Unconfirmed for Processing BSQ swap
2021-12-06 11:29:17 +01:00
chimp1984
e802e68506
Fix handling for genesis height and case when wallet sync is not completed yet.
- At genesis we use the genesis height for request (not height+1)
- If wallet is not synced yet we do not call onParseBlockChainComplete (as it was before)
2021-12-06 11:17:41 +01:00
chimp1984
84cd67f54d
Fix incorrect start height for block request
We added 1 as with the lite monitor mode we persist the most recent block,
thus we request with the start height for the next block.
But that cause a problem at a DAO full mode which has lite monitor mode set
as then the block parsing would not be triggered.

We refactor it so that we take the chainHeight from the dao state
directly and add 1 at the requests.
We add a check if we are at chain tip, and if so we skip requests
and call the onParseBlockChainComplete directly.
2021-12-06 11:17:33 +01:00
Christoph Atteneder
319a9d96a7
Improve BSQ swap success message 2021-12-06 11:04:48 +01:00
Christoph Atteneder
a1ecf35007
Apply suggestions and fix edge case when BSQ legacy payment account offer is duplicated 2021-12-06 11:04:01 +01:00
Christoph Atteneder
ec5f217f2f
Improve warning when BSQ swap offer is removed 2021-12-06 10:43:58 +01:00
Bisq GitHub Admin
b06852be73
Merge pull request #5891 from ripcurlx/improve-remove-bsq-offer-warning
Improve warning when BSQ swap offer is removed
2021-12-06 10:43:26 +01:00
Steven Barclay
981d6ff000
Validate input script types to prevent BSQ swap tx fee underpaying
Add a check of 'scriptTypeId' field, against the output of the spending
tx, to the 'RawTransactionInput::validate' method. Also make the seller
as well as the buyer validate each raw BSQ/BTC input received from the
peer. This prevents either peer from claiming that any of their
non-segwit inputs are segwit in order to underpay the tx fee.
2021-12-04 19:52:07 +01:00
Steven Barclay
efd590b9e7
Fix BSQ swap buyer tx fee theft vulnerability
Prevent the seller from stealing the combined tx fee as change by lying
about the value of one or more of his BTC inputs, which are passed to
the buyer as raw inputs in the 'BsqSwapFinalizeTxRequest' message.

To this end, add a 'RawTransactionInput::validate' method to check the
'value' field against the output value of the respective spending tx and
run it on every seller input in 'ProcessBsqSwapFinalizeTxRequest', so
that the buyer is no longer just trusting those numbers.

Additionally, check that the spending txIds from the raw BTC inputs
supplied by the seller actually match those of his signed inputs in the
accompanying partially signed tx, thus tying the raw input values to the
seller's tx.
2021-12-04 19:52:07 +01:00
Steven Barclay
acad642b53
Fix misleading comment: BSQ swap taker tx fee tolerance
(Actual tolerance by maker of agreed tx fee is 50%, not 10%.)
2021-12-04 19:52:06 +01:00
Christoph Atteneder
628ac27e25
Merge pull request #5889 from stejbac/fix-bsq-swap-tx-fee-theft-vulnerability
Fix BSQ swap buyer tx fee theft vulnerability
2021-12-04 19:50:50 +01:00
jmacxx
4b60be0ebb
Always use fresh address for MULTI_SIG context 2021-12-04 19:49:11 +01:00
chimp1984
d7c9ce462b
Change max retries from 3 to 12
When doing a resync from genesis the number of blocks is limited to 6000
so that requires lots of requests and with that increases risk of broken
connections. Giving more tolerance for retries avoids that the user has
to restart the app.
2021-12-04 11:11:26 -05:00
chimp1984
747916ac2f
Fixes https://github.com/bisq-network/bisq/issues/5882
When syncing from genesis the number of blocks are limited so we get the
`onParseBlockCompleteAfterBatchProcessing` called each time when the received
 blocks are processed, and as we are not at wallet height we repeat requesting
 blocks. But the new check for the BTC recipient triggers a resync from resource call.
We add now a check that we do this check only once the wallet is synced and our
block height from dao state matches wallet blockheight.
2021-12-03 20:09:47 -05:00
chimp1984
c9e0265e13
Fix handling for genesis height and case when wallet sync is not completed yet.
- At genesis we use the genesis height for request (not height+1)
- If wallet is not synced yet we do not call onParseBlockChainComplete (as it was before)
2021-12-03 19:48:17 -05:00
ghubstan
5f7fd6257b
Merge branch 'master' into 6-api-xmr-trading 2021-12-03 13:19:24 -03:00
Christoph Atteneder
ccda66d2c6
Improve warning when BSQ swap offer is removed 2021-12-03 12:21:03 +01:00
Christoph Atteneder
daf762f8fa
Add visual icon for duplicate offer functionality 2021-12-03 12:02:10 +01:00
ghubstan
742a6f441e
Allow mkt price lookup for any altcoin from API 2021-12-02 19:02:03 -03:00
ghubstan
ce8b6df9c5
Adjust API CorePaymentAccountsService for creating XMR accts 2021-12-02 19:00:22 -03:00
Steven Barclay
0517facbc3
Validate input script types to prevent BSQ swap tx fee underpaying
Add a check of 'scriptTypeId' field, against the output of the spending
tx, to the 'RawTransactionInput::validate' method. Also make the seller
as well as the buyer validate each raw BSQ/BTC input received from the
peer. This prevents either peer from claiming that any of their
non-segwit inputs are segwit in order to underpay the tx fee.
2021-12-02 18:25:53 +00:00
ghubstan
b85459d7c6
Refactor api.core side editoffer validation & fix bug
The editoffer validation bug fixes:

- A trigger-price edit forced offer.price-margin=0.00.

	This needs to be checked in new apitest case asserts.

- An activate state (only) edit forced offer.isUseMarketBasedPrice=true.

	The CLI does not have the offer instance, and cannot know the correct
	value of the isUseMarketBasedPrice param sent in the editoffer request.
	The daemon has to figure this out.  If the editType parameter value
	sent to daemon is ACTIVATION_STATE_ONLY, use the current offer.isUseMarketBasedPrice.

The refactoring includes more useful and readable information in core's EditOfferValidator
and MutableOfferPayloadFields toString methods, for debugging with the daemon log. And some
adjustments for allowing edits to XMR offers.
2021-12-02 15:04:38 -03:00
ghubstan
095a49598c
Add more readable toString method to MutableOfferPayloadFields
This makes it easier to compare to EditOfferValidator.toString
2021-12-02 14:51:15 -03:00
Steven Barclay
915a79e627
Fix BSQ swap buyer tx fee theft vulnerability
Prevent the seller from stealing the combined tx fee as change by lying
about the value of one or more of his BTC inputs, which are passed to
the buyer as raw inputs in the 'BsqSwapFinalizeTxRequest' message.

To this end, add a 'RawTransactionInput::validate' method to check the
'value' field against the output value of the respective spending tx and
run it on every seller input in 'ProcessBsqSwapFinalizeTxRequest', so
that the buyer is no longer just trusting those numbers.

Additionally, check that the spending txIds from the raw BTC inputs
supplied by the seller actually match those of his signed inputs in the
accompanying partially signed tx, thus tying the raw input values to the
seller's tx.
2021-12-02 17:19:10 +00:00
Steven Barclay
8d267520c8
Fix misleading comment: BSQ swap taker tx fee tolerance
(Actual tolerance by maker of agreed tx fee is 50%, not 10%.)
2021-12-02 14:54:57 +00:00
Christoph Atteneder
1606439144
Add support to duplicate bsq swap offers 2021-12-02 13:39:11 +01:00
ghubstan
33d976cf79
Calculate offer.makerFee if offer is bsq-swap
V1 offer instances have a makeFee value, but not BSQ swap offers.
This needs to be investigated.
See commit d57d6e9852.
2021-12-01 19:06:01 -03:00
jmacxx
32f057b2ad
Always use fresh address for MULTI_SIG context 2021-12-01 13:27:43 -06:00
ghubstan
e3c40895fe
Use offer instance to determine ownership, not it's id 2021-12-01 16:05:30 -03:00
ghubstan
d57d6e9852
Use calculated offer maker fee, do not re-calculate it 2021-12-01 16:03:31 -03:00
Christoph Atteneder
f224cf7c7c
Add Polish translation 2021-12-01 15:13:57 +01:00
Christoph Atteneder
1f2a3234fe
Add Polish translation 2021-12-01 11:35:25 +01:00
MwithM
7f22ffedf9
Substitute Unconfirmed for Processing BSQ swap
**Unconfirmed** BSQ swap seems like something failed. **Processing** is used by some wallets for unconfirmed transactions and has no negative implications.
2021-12-01 11:25:14 +01:00
ghubstan
946ca460ef
Merge branch 'master' into 5-api-bsqswap-simulation-n-docs-update 2021-11-30 12:46:34 -03:00
jmacxx
cb1998db05
Bugfix: dispute ticket reopened by mailbox message 2021-11-30 10:28:11 +01:00
jmacxx
0025609375
Bugfix: dispute ticket reopened by mailbox message 2021-11-29 09:18:55 -06:00
ghubstan
6b89254588
Adjust core api method help docs for bsq swaps 2021-11-29 11:29:42 -03:00
chimp1984
bfd45d359a
Fix incorrect start height for block request
We added 1 as with the lite monitor mode we persist the most recent block,
thus we request with the start height for the next block.
But that cause a problem at a DAO full mode which has lite monitor mode set
as then the block parsing would not be triggered.

We refactor it so that we take the chainHeight from the dao state
directly and add 1 at the requests.
We add a check if we are at chain tip, and if so we skip requests
and call the onParseBlockChainComplete directly.
2021-11-28 00:27:04 +01:00
ghubstan
64f228d872
Make rpc GetOfferCategory service work for my+avail offers
There are some use cases where the CLI needs to know what kind of offer
is being acted on before the request is made, For example:

There are differences between a BsqSwap 'takeoffer'request, and a v1
'takeoffer' request.

A BsqSwap offer cannot be edited by an 'editoffer' request, and an
attempt should be blocked by the CLI.

- Append isMyOffer GetOfferCategoryRequest rpc msg def.

- Adjust daemon.grpc services for new boolean GetOfferCategoryRequest param.

- Adjust core.api for new boolean GetOfferCategoryRequest param.

- Add validation check in core.api EditOfferValidator to block attempt to
  edit a BsqSwap offer.

- Refactor CoreOffersService get*offer(id) methods to optionally throw
  excpetions.
2021-11-27 14:01:14 -03:00
Steven Barclay
e383edc38a
Inline predicates to simplify HashCashService & FilterManager
Remove all the 'challengeValidation', 'difficultyValidation' and
'testDifficulty' BiPredicate method params from 'HashCashService' &
'ProofOfWorkService', to simplify the API. These were originally
included to aid testing, but turned out to be unnecessary.

Patches committed on behalf of @chimp1984.
2021-11-27 05:59:41 +00:00
jmacxx
670c5418ee
Improve user experience once mediation has been accepted by both parties
Transitions to Trade Step 4 (previously it would close/remove the trade).
2021-11-26 20:55:46 -06:00
Steven Barclay
e0595aa284
Store difficulty as floating point in Filter & PoW
Change the type of the 'difficulty' field in the Filter & ProofOfWork
proto objects from int32/bytes to double and make it use a linear scale,
in place of the original logarithmic scale which counts the (effective)
number of required zeros.

This allows fine-grained difficulty control for Equihash, though for
Hashcash it simply rounds up to the nearest power of 2 internally.

NOTE: This is a breaking change to PoW & filter serialisation (unlike
the earlier PR commits), as the proto field version nums aren't updated.
2021-11-26 04:08:15 +00:00
ghubstan
00a5e2b650
Merge branch 'master' into 2-refactor-api-bsqswap-support 2021-11-25 14:33:48 -03:00
Steven Barclay
0c94e232f8
Add+enable service to mint/verify Equihash proofs of work
Add an abstract base class, 'ProofOfWorkService', for the existing PoW
implementation 'HashCashService' and a new 'EquihashProofOfWorkService'
PoW implementation based on Equihash-90-5 (which has 72 byte solutions &
5-10 MB peak memory usage). Since the current 'ProofOfWork' protobuf
object only provides a 64-bit counter field to hold the puzzle solution
(as that is all Hashcash requires), repurpose the 'payload' field to
hold the Equihash puzzle solution bytes, with the 'challenge' field
equal to the puzzle seed: the SHA256 hash of the offerId & makerAddress.

Use a difficulty scale factor of 3e-5 (derived from benchmarking) to try
to make the average Hashcash & Equihash puzzle solution times roughly
equal for any given log-difficulty/numLeadingZeros integer chosen in the
filter.

NOTE: An empty enabled-version-list in the filter defaults to Hashcash
(= version 0) only. The new Equihash-90-5 PoW scheme is version 1.
2021-11-25 17:17:45 +00:00
Steven Barclay
647fc862d4
Fix method name typo: redoProofOfWorkAndRepublish 2021-11-25 11:45:23 +00:00
jmacxx
dfc7361b04
Add new block listener to update locked balance display 2021-11-25 09:55:04 +01:00
jmacxx
f0efe7175c
Fix exception in Portfolio History screen 2021-11-25 09:54:54 +01:00
Christoph Atteneder
ba6d5e2c73
Merge pull request #5842 from jmacxx/fix_exception_portfolio_history
Bug fixes: Locked Balance display; Portfolio History screen
2021-11-25 09:54:31 +01:00
ghubstan
c177b3b834
Merge branch 'master' into 2-api-bsq-swap-scratch 2021-11-24 13:14:13 -03:00
ghubstan
3aae052813
Refactor core.api trade service implemenentations for BSQ swaps
A minor refactoring to support serving TradeModel instances to CLI.
For example, the CLI 'gettrade' command must return a v1 Trade or
BSQ swap trade.
2021-11-24 13:05:09 -03:00
Steven Barclay
d8d8ec3f97
Add PoW version(-list) fields to ProofOfWork & Filter
Add a numeric version field to the 'ProofOfWork' protobuf object, along
with a list of allowed version numbers, 'enabled_pow_versions', to the
filter. The versions are taken to be in order of preference from most to
least preferred when creating a PoW, with an empty list signifying use
of the default algorithm only (that is, version 0: Hashcash).

An explicit list is used instead of an upper & lower version bound, in
case a new PoW algorithm (or changed algorithm params) turns out to
provide worse resistance than an earlier version.

(The fields are unused for now, to be enabled in a later commit.)
2021-11-24 15:07:42 +00:00
Christoph Atteneder
2fea64cb3a
Update bitcoinj checkpoints for v1.8.0 2021-11-24 11:31:12 +01:00
chimp1984
f93cd7de48
Enforce inclusion of TradeLimits for headless apps
PaymentMethod use an instance of TradeLimits and expect that it
has been injected, which is the case for desktop but not for
headless apps, so we enforce injection in the app base classes
used for headless apps.

The validation of trade statistics use a method in PaymentMethod
where that dependency is required.

Tha hack how the PaymentMethod use TradeLimits is not nice, but
would require more effort for refactoring.
2021-11-24 09:48:00 +01:00
Christoph Atteneder
3570750d0f
Merge pull request #5857 from chimp1984/add-missing-dependency
Enforce inclusion of TradeLimits for headless apps
2021-11-24 09:47:14 +01:00
chimp1984
0620c866fa
Add date for applying filter
We had historically higher trade limits and assets which are not in the
currency list anymore, so we apply the filter only for data after
Nov 1st 2021.
2021-11-24 09:46:04 +01:00
chimp1984
4ec14d3694
Add date for applying filter
We had historically higher trade limits and assets which are not in the
currency list anymore, so we apply the filter only for data after
Nov 1st 2021.
2021-11-23 23:09:42 +01:00
chimp1984
9c18899d66
Enforce inclusion of TradeLimits for headless apps
PaymentMethod use an instance of TradeLimits and expect that it
has been injected, which is the case for desktop but not for
headless apps, so we enforce injection in the app base classes
used for headless apps.

The validation of trade statistics use a method in PaymentMethod
where that dependency is required.

Tha hack how the PaymentMethod use TradeLimits is not nice, but
would require more effort for refactoring.
2021-11-23 21:34:43 +01:00
ghubstan
b65cc9c1f4
Merge branch 'master' into 1-basic-api-bsqswap-support 2021-11-23 17:02:49 -03:00
Christoph Atteneder
4f1f6898b8
Merge pull request #5853 from chimp1984/fix-paymentmethod-lookup
Improve TradeStatistics validation
2021-11-23 09:56:36 +01:00
Christoph Atteneder
19e072795f
Simplify warn logging 2021-11-23 09:54:23 +01:00
chimp1984
236cb2c6f3
Rename getPaymentMethodById to getPaymentMethod 2021-11-23 09:54:05 +01:00
chimp1984
a495072694
Rename getPaymentMethod to getPaymentMethodId 2021-11-23 09:53:56 +01:00
chimp1984
94857a6261
Rename getActivePaymentMethodById to getActivePaymentMethod
Rename variables
2021-11-23 09:53:45 +01:00
chimp1984
c3ea38ec7a
Add warn log 2021-11-23 09:53:37 +01:00
chimp1984
f5ca63f59a
Only apply maxTradeLimit from PaymentMethod if the PaymentMethod is
found in the active list. Otherwise the 2 BTC default is used.
We get TradeStatistics3 objects from old retired PaymentMethods
which are not found in the active list.
2021-11-23 09:53:27 +01:00
Christoph Atteneder
0e1030845a
Simplify warn logging 2021-11-23 09:48:10 +01:00
chimp1984
dc2a12858b
Only try to remove invalid filter from network if it's our own.
This avoids unnecessary/confusing warning logs in data storage.
2021-11-23 09:37:30 +01:00
chimp1984
cb474c57da
Rename getPaymentMethodById to getPaymentMethod 2021-11-23 00:40:59 +01:00
chimp1984
091f82477b
Rename getPaymentMethod to getPaymentMethodId 2021-11-23 00:39:38 +01:00
chimp1984
9569e5a600
Rename getActivePaymentMethodById to getActivePaymentMethod
Rename variables
2021-11-23 00:39:18 +01:00
chimp1984
9d52ddbf96
Add warn log 2021-11-23 00:34:12 +01:00
chimp1984
22c7b2d876
Only try to remove invalid filter from network if it's our own.
This avoids unnecessary/confusing warning logs in data storage.
2021-11-22 22:43:31 +01:00
chimp1984
b6b2d939a1
Only apply maxTradeLimit from PaymentMethod if the PaymentMethod is
found in the active list. Otherwise the 2 BTC default is used.
We get TradeStatistics3 objects from old retired PaymentMethods
which are not found in the active list.
2021-11-22 22:41:32 +01:00
jmacxx
e59596d1a1
Add new block listener to update locked balance display 2021-11-22 09:46:41 -06:00
ghubstan
f129867266
Uncomment support for complex swift-acct creation via API
Swift specific comments are included in the create payment acct json form.
2021-11-22 12:08:08 -03:00