Commit Graph

3782 Commits

Author SHA1 Message Date
HenrikJannsen
a5a852394b
Comment out failing test cases.
They fail when running from terminal but not when running in IDE

Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2024-05-29 18:06:11 +02:00
HenrikJannsen
053884cad5
Fix tests
Don't use 20 BTC amount as we limit to 2 BTC
Remove 30 BTC amounts
2024-05-29 18:06:04 +02:00
HenrikJannsen
0dcd24105f
Refactor: Rename
Fix type
Add comment

Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2024-05-29 18:05:48 +02:00
HenrikJannsen
f4d525cfd6
Add predicate to offer filter to check if offer amount exceeds trade limit.
Filter offers at OfferBookViewModel when the DaoState changes.
Check for offers amount exceeds trade limit at OpenOfferManager and add it to invalidOffers.

Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2024-05-29 18:05:14 +02:00
Alejandro García
e0b6a2cbb4
Bump version number for v1.9.16 2024-05-24 17:40:00 +02:00
HenrikJannsen
3a09024b10
Disable ImageCaptureReaderTest
If tests are run via gradle I get an error:
`Loading library prism_es2 from resource failed: java.lang.UnsatisfiedLinkError: Can't load library: /Users/dev/.openjfx/cache/16/libprism_es2.dylib`
If run from the IDE it works.
CI on windows also fails, other OS work.
Seems that there are some platfomr specific dependency issues...

Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2024-05-21 11:42:08 +07:00
Gabriel Bernard
db04961300
Merge pull request #7101 from bisq-network/release/v1.9.15
Release/v1.9.15
2024-05-12 17:17:41 +00:00
Alejandro García
0d5af748ad
Merge pull request #7095 from HenrikJannsen/fix-GuiceSetupTest
Fix GuiceSetupTest
2024-05-09 18:59:27 +00:00
Alejandro García
0b85e0615d
Merge pull request #7092 from stejbac/speed-up-vote-result-view-load
Speed up Vote Result display, cycle list item selection & JSON export
2024-05-09 18:57:53 +00:00
Alejandro García
0a5a0f316d
Merge pull request #7090 from HenrikJannsen/Improve-export-account-reputation-process-for-Bisq-2
Improve export account reputation process for bisq 2
2024-05-09 18:56:48 +00:00
Alejandro García
09ae097dc9
Merge pull request #7089 from stejbac/add-missing-space-to-log-pattern
Tidy logback files & add space back to log pattern
2024-05-09 18:55:53 +00:00
Alejandro García
dc859e2c2b
Merge pull request #7082 from stejbac/speed-up-bond-repo-update-and-remove-raw-types
Speed up bond repository update and remove some raw types
2024-05-09 18:54:56 +00:00
Alejandro García
776752c466
Revert to SNAPSHOT version 2024-05-09 20:42:56 +02:00
HenrikJannsen
ee6263c4f0
GuiceSetupTest was broken if run in gradle (in IDE it worked) due likely a JavaFX dependency issue.
As the MarketPricePresentation constructor had anyway a ugly setup code we resolve it by refactoring it to a bit less ugly solution. ;-)

Remove the btcWalletService and feeService dependencies from MarketPricePresentation.

Do the setup of static fields in TxIdTextField and GUIUtil in the applyInjector method in BisqAppMain.

Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2024-05-08 14:55:23 +07:00
Steven Barclay
74b5580b2c
Fix incorrect vote weights in voting history JSON
Make sure to include the BSQ stake, and not just the merit stake, when
summing to get the 'voteWeight' field of the vote on each evaluated
proposal in the exported vote results history JSON.
2024-05-06 20:42:13 +02:00
Steven Barclay
57662ae206
Sum merit in outer loop to speed up VoteResultView.getVotingHistoryJson
Avoid needlessly repetitive (once per cycle proposal) signature checking
of each 'Merit' object in the DAO state, when exporting the voting
history JSON, by moving the merit calculations to the outer loop over
each cycle, storing the sums in a map by blind vote txId. As signature
verification is expensive, taking seconds to run just once over every
'Merit' object, this is by far the biggest bottleneck when generating
the JSON.
2024-05-06 20:17:09 +02:00
Steven Barclay
34ed5e0f74
Further optimise cycle list selection in Vote Result view
Remove another hotspot in the proposals table creation for a selected
cycle, by making 'ballotByProposalTxIdMap' a field of 'VoteResultView',
recomputed at the same time the cycle list is populated upon calling
'doFillCycleListAndBallotMap()' (renamed from 'doFillCycleList'), when
the Vote Result view is activated.

Also remove an unnecessary outer loop when determining if the user's
vote is included in the result, upon selecting a cycle list item, to
avoid searching the BSQ wallet repeatedly for the same vote reveal tx.
2024-05-06 16:09:51 +02:00
Steven Barclay
6780d35716
Remove unused tableRow field from ProposalListItem
The 'tableRow' field of each (voted upon) proposal list item is reset
upon selection of a cycle list item in the Vote Result view, but not set
anywhere, so remove the field along with its set/reset methods.
2024-05-06 15:24:51 +02:00
Steven Barclay
6ae9831818
Parallelise signature checking in VoteResultView.doFillCycleList()
Run through the 'DecryptedBallotsWithMerits' list of each cycle in
parallel, when filling the cycle list of the Vote Result view, to speed
up the signature verification of all the 'Merit' objects found in the
DAO state. Checking all the signatures is necessary to correctly compute
the total merit stake and hence the vote weight of each ballot list, and
profiling shows that it is by far the biggest bottleneck during the
initial view load (with all subsequent activations of the view skipping
'doFillCycleList()', when outside of the Vote Result DAO phase).

(Since each signature is checked only once from 'doFillCycleList()' and
skipping the checks could potentially affect the computed vote weights,
we cannot obviously do any better than parallelise the checks, to speed
up this method.)

(Even though it may be a little more efficient to parallelise the outer
loop of the method, over the cycles instead of the decrypted votes of
each cycle, each individual signature check is expensive enough that it
probably wouldn't give much improvement over this one-line change.)
2024-05-05 00:20:09 +02:00
HenrikJannsen
efdd9c68c4
Change button text
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2024-05-02 16:10:45 +07:00
HenrikJannsen
13f124566c
Apply patch from @jmacxx (https://github.com/bisq-network/bisq/issues/7066#issuecomment-2087336098)
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2024-05-02 16:04:20 +07:00
Steven Barclay
92da7956e6
Tidy logback files & add space back to log pattern
Uniformise the log patterns somewhat, by making the 'Logger' classname
field width either 15 for the seednode & statsnode, or 40 for the other
applications (lengthened from 30 in a few cases).

Also clean up the logback XML files somewhat, in particular removing
references to the old Thali (thaliproject/Tor_Onion_Proxy_Library) Tor
library, which was replaced years ago with our own fork of NetLayer
(https://github.com/cd2357/netlayer).

Finally, add a missing space back to the log pattern for bisq-desktop,
to prevent DEBUG, ERROR or TRACE lines appearing as follows:

  ... [JavaFX Application Thread] ERRORb.c.s.CommonSetup: ...

(It isn't clear whether this recently introduced behaviour was really
intentional, though it did prevent two consecutive spaces appearing in
the majority INFO log lines.)
2024-05-02 01:56:32 +02:00
Devin Bileck
5f3f692b2f
Fix SIGSEGV encountered on macOS
When attempting to close the frame grabber from a separate thread,
the application would crash due to a SIGSEGV.
2024-04-01 21:52:40 -07:00
Devin Bileck
e6e9608473
Fix image loading from resources on Windows
This should hopefully resolve images failing to load from resources
on Windows due to problems with imread encountering "can't open/read
file: check file path/integrity".
2024-04-01 21:52:40 -07:00
Devin Bileck
0f373cee43
Restore QR code scanner feature for mobile notification pairing
This restores the functionality that was removed in b5beea58. However,
this implementation utilizes the JavaCV library rather than the
webcam-capture library as discussed in #4940. As a result, this should
now provide macOS support.
2024-04-01 21:52:40 -07:00
Alejandro García
ee987bef1c
Merge pull request #7005 from jmacxx/sepa_qr_code
Add SEPA QR Code for buyer payment
2024-03-27 09:09:23 +00:00
Steven Barclay
c94fa98417
Generify remaining raw types used by the DAO packages
Fix raw usage of the following types, all of which (apart from
Comparator) touch the DAO packages somewhere:

  Comparable, Comparator, GetStateHashesResponse, NewStateHashMessage,
  RequestStateHashesHandler, PersistenceManager

(Also replace 'Integer.valueOf' with the non-boxing but otherwise
identical method 'Integer.parseInt', in the class 'TxOutputKey'.)
2024-03-09 01:26:36 +08:00
Steven Barclay
e1a8424f12
Generify Bond raw types & rename BondRepository type params
Replace all raw uses of 'Bond<T extends BondedAsset>', mostly with
wildcards (that is, 'Bond<?>'), to prevent compiler/IDE warnings.

Also rename the 'T extends Bond<R>' & 'R extend BondedAsset' type params
of 'BondRepository<..>' to 'B' & 'T' respectively, as this is a little
less confusing.
2024-03-08 21:11:31 +08:00
jmacxx
e75fc1ce79
Add SEPA QR Code for buyer payment. 2024-02-27 14:23:43 -06:00
Steven Barclay
e584c77f9e
Replace Predicate<Long> with LongPredicate in *ChartDataModel
Use the slightly more efficient primitive type specialisation for the
date filters in 'ChartDataModel' and its subclasses.
2024-02-20 18:32:19 +08:00
Steven Barclay
d97636eaad
Don't ignore BSQ burned by invalid txs in chart data models
Use 'Tx::getBurntBsq' instead of 'Tx::getBurntFee', so as not to exclude
BSQ burned by invalid txs from the supply calculations. There are no
invalid BSQ txs at present on mainchain, but accidentally burned BSQ
should definitely count as a reduction in supply, so this fixes a bug.
2024-02-20 16:21:07 +08:00
Steven Barclay
712c97826b
Clean up & optimise (Dao|Price)ChartDataModel
1. Tidy up the stream pipelines which sum over time intervals, by
   summing directly with a grouping collector, instead of wastefully
   collecting to an intermediate map of lists;

2. Move duplicate 'memoize' static method to the base class;

3. Factor out 'getDateFilteredMap' static method, to replace the
   repeated pattern of filtering date keys by a provided predicate and
   collecting into a new map;

4. Use 'Map::replaceAll' instead of the pattern:

      map.entrySet().forEach(e -> e.setValue(updateFn(e.getValue())));

5. Fix a quadratic time bug in 'getBsqMarketCapByInterval' by passing an
   ordered map to 'issuanceAsOfDate', so that it doesn't have to
   repeatedly sort or linearly scan the entire keyset of time intervals,
   to find the latest one before the provided date.
2024-02-20 15:48:39 +08:00
Alejandro García
ee4bcf4328
Bump version number for v1.9.15 2024-02-12 12:52:10 +02:00
Alejandro García
c5a73c0c86
Merge pull request #7007 from jmacxx/bsq_market_cap_chart
Add BSQ market cap chart
2024-02-11 10:05:48 +00:00
Alejandro García
4c1b1cd161
Merge pull request #6986 from yonson2023/fix_transferwise
Wise: fix account summary and add copy icon to form.
2024-02-11 10:04:38 +00:00
yonson2023
25a6e08c09
Wise: fix account summary and add copy icon to form.
Add copy icon to Pix form holder name field.
Prompt for holder name if empty.
Optimize form layout.
2024-02-07 20:44:41 -06:00
Steven Barclay
c41903f7ab
Clean up TxValidatorTest & resource loading in other tests
Fix inspection warnings and other minor defects (unchecked casts, bad
'assert*' usage, unused assignments/declarations, missing null checks,
object equality on enum instances, needless statement lambdas, missing
final, redundant 'toString', needless visibility) in 'TxValidatorTest'.

Also, uniformise and slightly tidy resource loading in other test
classes, replacing 'Files.readAllBytes' with Java 11 'Files.readString'
(which assumes UTF-8 as desired, instead of the default charset).
2024-02-03 01:44:25 +08:00
jmacxx
997bf0d6b8
Add BSQ market cap chart. 2024-01-22 14:33:11 -06:00
Alejandro García
5872e9e1d6
Merge pull request #6998 from jmacxx/allow_mediation_failed_closed_trades
Allow mediation of failed and closed trades
2024-01-14 11:48:59 +00:00
Alejandro García
f755efa765
Merge pull request #6994 from jmacxx/resync_popup_change
Change unconfirmed popup to 24h after trade start.
2024-01-14 11:48:08 +00:00
yonson2023
6a146cd4ac
Show prompt if holderName is blank. 2024-01-12 16:08:19 -06:00
yonson2023
9e5fa8f1b1
Add holdername to MoneyBeam account. 2024-01-09 17:50:07 -06:00
jmacxx
ff52c43d4f
Allow mediation of failed and closed trades. 2024-01-09 12:56:30 -06:00
jmacxx
e082a49760
Change unconfirmed popup to 24h after trade start. 2024-01-05 22:13:48 -06:00
Alejandro García
f12069aeeb
Merge pull request #6979 from alvasw/FilterManagerMockedPrivilegeKeysTests
Add FilterManagerMockedPrivilegeKeysTests
2023-12-31 13:45:13 +00:00
Alejandro García
1f072bf774
Merge pull request #6977 from alvasw/FilterManagerAddFilterToNetworkTests
Add FilterManagerAddFilterToNetworkTests
2023-12-31 13:44:07 +00:00
Alejandro García
e5ed806235
Merge pull request #6952 from jmacxx/fee_validation_reason_codes
Display the reason for auto-disabling an open offer.
2023-12-31 13:35:44 +00:00
Alva Swanson
bf98531c46
Config: Make configFile field private and add getter 2023-12-28 08:50:13 +01:00
Alva Swanson
e7cb152e11
DevEnv: Make DEV_PRIVILEGE_PRIV_KEY private and add getter 2023-12-28 08:50:13 +01:00
Alejandro García
70a15ceb06
Merge pull request #6965 from yonson2023/pix_add_holder_name
Update Pix payment account, add HolderName
2023-12-20 05:05:18 +00:00