Commit Graph

5969 Commits

Author SHA1 Message Date
ghubstan
1a9cdfbdd3
Return early when field name match fails
Resolves https://github.com/bisq-network/bisq/pull/5685#discussion_r710002786
2021-09-16 09:31:22 -03:00
ghubstan
ab929d4435
Remove spurious PaymentAccount#canSupportMultipleCurrencies()
Method was added on the false assumption `PaymentAccount#hasMultipleCurrencies()`
would not always return a correct value when a `PaymentAccount` instance is created
via reflection.  But `hasMultipleCurrencies()` will work as long as appropriate
PaymentAccount subclasses continue setting their `tradeCurrencies` fields within
their default constructors.
2021-09-07 11:31:56 -03:00
ghubstan
f7e6898077
Let users specify trade ccys and selected trade ccy in json form
Several payment methods support multiple trade currencies and a selected
trade currency, but the api's payment account creation has not let CLI
users specify them in the json form passed to the `createpaymentacct`
command.

This change adds `tradeCurrencies` and `selectedTradeCurrency` fields
to the appropriate json forms.
2021-09-06 12:24:51 -03:00
ghubstan
a2bc999692
Adjust to PaymentAccount change in commit de23fc0 2021-09-06 12:23:56 -03:00
ghubstan
19e9c78f51
Do single trade currency check in api generated payment acct 2021-09-06 12:21:29 -03:00
ghubstan
de23fc0083
Replace growing # of instanceof checks with boolean hasPaymentMethodWithId 2021-09-06 12:17:16 -03:00
ghubstan
80a72dc520
Format comments, add one 2021-09-06 12:13:16 -03:00
ghubstan
f39e611150
Wrap long i18n strings for use in API
Some i18n property values can be used by the API if long strings are
wrapped before written as commments to json payment account forms, or
written to the CLI console.

This change anticipates the addition of the more complex Swift payment
method (PR 5672). PR 5672's i18n property value for key "payment.swift.info"
will be wrapped and appended to the comments of the Swift payment account's
json form.
2021-09-06 12:12:09 -03:00
sqrrm
fc329f6f15
Merge pull request #5678 from bisq-network/release/v1.7.3
Release/v1.7.3
2021-08-30 14:29:27 +02:00
sqrrm
58e09c96ee
Merge pull request #5666 from ghubstan/08-handle-extradata-in-editoffer
Adjust API 'editoffer' to PR 5651 (include extraData field when editing offer)
2021-08-30 10:46:23 +02:00
Christoph Atteneder
c036adb3eb
Update bitcoinj checkpoints for v1.7.3 2021-08-27 09:30:30 +02:00
jmacxx
984a269776
Add Payment Methods: Paysera and Paxum 2021-08-25 13:38:54 -05:00
Christoph Atteneder
9e72e5b445
Update translations for v1.7.3 2021-08-23 11:22:27 +02:00
ghubstan
b93f6ea28e
Remove sequence-number checks from OfferBook
Checking offer payload hashes in OfferBook's onAdded and onRemove methods
is sufficient to prevent incorrect removal of offer list items from the
UI OfferBook view (where api 'editoffer' causes onRemoved to be called
after onAdded on peers).
2021-08-20 11:49:00 -03:00
ghubstan
fb4e00fb6b
Fix OfferBookService bug causing extra check in OfferBook.onRemoved
Hash of protectedStorageEntry (should be offerPayload) was sometimes
resulting in incorrect hash being sent to OfferBook listener methods
onAdded(offer,  hashOfPayload,  sequenceNumber), and
onRemoved(offer,  hashOfPayload,  sequenceNumber).
Hash of OfferPayload is correctly passed to listener with this change.

Sending the correct hash allows removal of a dubious code block that
removed a book view list item when hash compare failed, and no matching
offer existed in the OfferBookService.
See https://github.com/bisq-network/bisq/pull/5659#discussion_r689634240
2021-08-18 14:27:20 -03:00
ghubstan
1c096d0e3a
Merge branch 'master' into 08-handle-extradata-in-editoffer
Resolve file conflicts resulting from merging PRs
    https://github.com/bisq-network/bisq/pull/5577
    https://github.com/bisq-network/bisq/pull/5651
2021-08-16 12:36:49 -03:00
sqrrm
15093720b9
Merge pull request #5625 from ripcurlx/unsigned-account-tooltip
Tooltip for unsigned accounts needs to provide more information
2021-08-16 12:15:43 +02:00
ghubstan
71a61c63da
Display Enabled=PENDING in CLI 'createoffer' output
A newly created offer has no OpenOffer+State (AVAILABLE || DEACTIVATED)
when displayed in the CLI's console.  This change adds a 'bool isMyPendingOffer'
to the OfferInfo proto + wrapper, and the CLI's console offer output formatter
uses it to determine if it should display a new offer's Enabled column value
as PENDING, instead of an ambiguous NO value.
2021-08-14 16:58:47 -03:00
Christoph Atteneder
9db2c18f2c
Merge pull request #5649 from sqrrm/refund-double-payout-fix
Avoid creating more than one refund payout
2021-08-12 20:43:22 +02:00
ghubstan
6e2400fb0f
Ensure UI OfferBook items are correctly added and removed
Using the API's CLI to edit offers can sometimes result in add/remove messages
being received on peers in the same batch of envolopes, and these messages
are sometimes passed to the UI in (1) add, (2) remove order.  This can result in
a newly edited offer being removed immediately after being added to the OfferBook
list. This change uses storage entry sequence number and storage entry payload
hash comparisons to avoid the problem.

- OfferBookListItem Added new constructor taking P2PDataStorage.ByteArray hashOfPayload,
  and int sequenceNumber params.  Added a new toString() method.

- OfferBook Added new checks on OfferBookListItem hashOfPayload and sequenceNumber while
  determining if offer candidates should be added or removed from the UI's OfferBook List.
  See OfferBook contructor's implementation of OfferBookChangedListener#onAdded and
  OfferBookChangedListener#onRemoved.  Added many comments explaining the add/remove rules,
  and plenty of debug statements to help trace the add/remove event process.

- OfferBookService#OfferBookChangedListener Added new P2PDataStorage.ByteArray hashOfPayload,
  and int sequenceNumber params to listener's onAdded and onRemoved method signatures.
  Added these two new paramater values to listener.onAdded and listener.onRemoved calls.

- TakeOfferDataModel Replaced unused, old tradeManager param in offerBook.removeOffer()
  with (null) P2PDataStorage.ByteArray hashOfPayload, and (-1) int sequenceNumber params.
  OfferBook will remove the candidate offer as before.

- MarketAlerts Adjusted onAdded() & onRemoved listener method signatures, even though
  new P2PDataStorage.ByteArray hashOfPayload, int sequenceNumber params are not used
  by the implementations.
2021-08-07 14:06:38 -03:00
ghubstan
369372880d
Merge branch 'master' into 05-update-api-beta-test-guide 2021-08-04 16:41:52 -03:00
sqrrm
8c666dba92
Avoid creating more than one refund payout
Double clicking the close ticketbutton creates two payout transactions.
This fix makes sure only one payout transaction is created for the
dispute.

Restarting the client allows for creating another refund transaction
for the dispute if needed.
2021-08-02 10:17:17 +02:00
Christoph Atteneder
fa4238c162
Merge pull request #5644 from jmacxx/fix_payment_account_deserialize_issue
Fix issue for deprecated payment account imported from backup
2021-08-01 20:50:20 +02:00
ghubstan
b8379e2003
Merge branch 'master' into 05-update-api-beta-test-guide 2021-07-30 11:53:34 -03:00
jmacxx
670ff92f4c
fix deserialize issue for deprecated payment account imported from backup 2021-07-29 21:56:44 -05:00
jmacxx
5cc3f8680e
keep chatview listener open until ack, mailbox, or error 2021-07-23 08:05:56 +02:00
Christoph Atteneder
e2e23a8611
Update bitcoinj checkpoints for v1.7.2 2021-07-19 15:34:08 +02:00
Christoph Atteneder
f0258d6dd1
Remove unused translation 2021-07-19 13:55:12 +02:00
BtcContributor
fb639c1e6d
Add missing info text for Capitual payment method 2021-07-19 13:55:11 +02:00
BtcContributor
870448f5fa
Add review feedbacks from KaiWitt 2021-07-19 13:55:11 +02:00
BtcContributor
50b6f42525
Add Capitual payment method. Waiting for final Info text to add. 2021-07-19 13:55:10 +02:00
Christoph Atteneder
57473a6e23
Update translations for v1.7.2 2021-07-16 20:38:58 +02:00
xyzmaker123
5a2592c832
Update core/src/main/resources/i18n/displayStrings.properties
Co-authored-by: Christoph Atteneder <christoph.atteneder@gmail.com>
2021-07-16 09:19:50 +02:00
xyzmaker123
b6e8f66553
Tooltip for unsigned accounts needs to provide more information 2021-07-16 09:19:49 +02:00
sqrrm
eace7c2b61
Merge pull request #5598 from ripcurlx/add-pazza-as-mediator
Add @pazza's mediator onion address and Keybase user name
2021-07-13 10:25:39 +02:00
sqrrm
30b100dfc0
Merge pull request #5621 from ripcurlx/add-payment-account-payload-safeguards
Add payment account payload safeguards
2021-07-13 10:24:49 +02:00
Christoph Atteneder
e4b00c6e32
Merge pull request #5611 from harrigan/master
List RSK Smart Bitcoin (R-BTC)
2021-07-13 09:25:35 +02:00
Christoph Atteneder
23a3c63e0f
Merge pull request #5614 from jmacxx/fix_payment_account_deserialize_issue
Fix payment account deserialize issue (e.g. CHASE_QUICK_PAY)
2021-07-13 09:20:23 +02:00
jmacxx
ab565d1368
fix payment account deserialize issue (e.g. CHASE_QUICK_PAY) 2021-07-12 06:58:05 -05:00
Christoph Atteneder
5ba7f043d4
Handle potential PaymentAccountPayload null values when detecting multiple holder names 2021-07-12 11:26:28 +02:00
Christoph Atteneder
51af19e5ec
Check if PaymentAccountPayload is null bfore trying to apply filter 2021-07-12 11:25:23 +02:00
Christoph Atteneder
c15958a94d
Return empty if no PaymentAccountPayload is available 2021-07-12 10:24:35 +02:00
chimp1984
8859503e49
Update comment 2021-07-08 01:09:50 +02:00
chimp1984
28a8116997
Add gc calls at areas where memory usage spikes are expected 2021-07-08 01:06:20 +02:00
chimp1984
0a5c1ca72c
Add txOutputsByTxOutputType map for performance improvement
Profiler reported the getTxOutputsByTxOutputType got called
very often. To avoid those iterations we use a lookup map.
2021-07-07 22:51:58 +02:00
chimp1984
4727f09066
Add System.gc() before we clone daoState and before we apply it to store.
Add it also before and after daoState monitor checks.

When letting the app run over night I saw that a lot of memory was not
released if System.gc() was not called.
By calling System.gc() it got to the expected state. Tested with the
G1 GC but saw similar behaviour with master with default GC version (parallel).

We could also run it periodically every 10 minutes or so, but I guess the block
interval covers that pretty good as well and those are the moment where load is
added and risk to run out of memory is higher.
We add a bit of delay to take into account that listeners might
react on the state change and to apply the gc after the event is processed completely.
2021-07-07 11:58:10 +02:00
chimp1984
da5dd523fb
Optimize DaoState snapshot behaviour
- Run persistence call in thread instead of user thread (serialisation
is very slow and had blocked user thread)
- Create new snapshot only after persistence is completed to avoid to
have 3 daoState objects in memory
- Set DaoState in store to null to let gc remove the old reference (was
left there before so we had 3 instances of daoStates in memory)
2021-07-06 17:59:44 +02:00
Christoph Atteneder
93df5c2849
Merge pull request #5599 from jmacxx/fix_chatmessage_status
Fix bug in chat message status display
2021-07-06 16:13:23 +02:00
Christoph Atteneder
f4ca766a97
Merge pull request #5602 from jmacxx/fix_withdrawal_fee_bug
Fix custom withdrawal fee bug
2021-07-06 16:04:22 +02:00
sqrrm
030a76522c
Merge pull request #5606 from bisq-network/release/v1.7.0
Release/v1.7.0
2021-07-06 12:40:52 +02:00