Commit graph

1821 commits

Author SHA1 Message Date
chimp1984
a9e61e409e
Replace ObjectProperty<AssetTxProofResult> with IntegerProperty
// ObjectProperty with AssetTxProofResult does not notify changeListeners. Probably because AssetTxProofResult is
// an enum and enum does not support EqualsAndHashCode. Alternatively we could add a addListener and removeListener
// method and a listener interface, but the IntegerProperty seems to be less boilerplate.
2020-09-02 00:25:35 -05:00
chimp1984
a8968da23f
Add listener on autoConfirmSettings changes and terminate all services
if feature got disabled in setting.
2020-09-02 00:00:23 -05:00
chimp1984
320179f5ec
Improve handling of invalid/empty tx hash/tx key 2020-09-01 22:29:17 -05:00
chimp1984
7240bd62d1
Read numRequiredConfirmations from autoConfirmSettings just in time.
This allows the user to change required confirmation and it has impact
on open requests. Will be read at parsing the result.

Changed also the text field to not listen on text change but on focus
out so that the values are only updated once the user has left the
field and the value is valid. Otherwise small numbers like 1 might be
written during typing. The other values are only read at request start
and changes will have no impact on already started requests.

Also applies previous value in case the user added an invalid value at
focus out.

- Made display text shorter and added a tooltip.
- Allow very high numbers in devmode as max conf value
2020-09-01 21:22:16 -05:00
chimp1984
7c0d24c567
Refactoring: Rename package
bisq.core.trade.autoconf to bisq.core.trade.txproof
2020-09-01 19:56:48 -05:00
chimp1984
039860935d
Merge master
- fix tests
2020-09-01 19:53:23 -05:00
chimp1984
28c8150b6b
Refactoring
This is another larger refactoring, sorry ;-)

But the structure was just not correct before. We had handled multiple
trades with multiple results and that is error prone. Now each class
has much more clear responsibilities. Also the result enums are not
changes so that they are better separated between result based and
service bases states.

All different states are still hard to test. We should set up some mock
service to simulate confirmations counting up and error scenarios.
2020-09-01 19:10:43 -05:00
chimp1984
512f1a5972
Refactor AutoConfirmSettings handling in preferences
- Do not use immutability for AutoConfirmSettings as it makes setting
values cumbersome.

- Add btc validator for trade limit

- Make AutoConfirmSettings an optional and add find method by currency
code to be better prepared when used for other coins.

- Add static getDefaultForXmr to AutoConfirmSettings

- Move listener creation to init method
2020-09-01 16:00:02 -05:00
Christoph Atteneder
7da3663e1d
Merge pull request #4457 from chimp1984/add-USDT-variants
Add Tether (ERC20, Omni and Liquid)
2020-09-01 20:04:57 +02:00
sqrrm
5b1d9cb759
Merge pull request #4453 from chimp1984/add-username-to-revolut
Add support for user name for Revolut accounts
2020-09-01 19:52:40 +02:00
sqrrm
7830dbf4e4
Merge pull request #4460 from chimp1984/refactor-filter
Refactor filter
2020-09-01 19:48:38 +02:00
sqrrm
43ad831916
Merge pull request #4451 from chimp1984/add-check-for-option-trade
Add check for option trade
2020-09-01 11:12:59 +02:00
chimp1984
d36306a73c
More refactoring.... 2020-09-01 00:56:54 -05:00
chimp1984
4323b417b1
Adjust to codacy complaints
codacy does not like raw Exceptions ;-(

- Remove unused method
2020-08-31 19:36:19 -05:00
chimp1984
86999e52d1
- Remove isPublicKeyInList check at remove as its irrelevant (dev could
add his key anyway to src code)
- Fix wrong logs
- Remove duplicated line
2020-08-31 17:13:09 -05:00
chimp1984
8bf75b5f45
- Filter out prices with code "NON_EXISTING_SYMBOL"
- Add comments
2020-08-31 15:19:31 -05:00
chimp1984
b409c8add5
Merge branch 'master_upstream' into add-tether-pinguin 2020-08-31 14:17:59 -05:00
chimp1984
4a2f7dc92c
Rename bannedSignerPubKeys to bannedAccountWitnessSignerPubKeys
We use several signing keys, so better to make it more explicit.
protobuf entry is not changed to not risk issues (i guess it would
work renaming it)
2020-08-31 13:01:44 -05:00
chimp1984
9a142be86e
Add bannedPrivilegedDevPubKeys field 2020-08-31 12:51:01 -05:00
chimp1984
cc20a3b6c7
- Add support for multiple pubKeys
- Add more validation
- Add SignerPubKeyAsHex to filter
- Refactor add/remove filter code
2020-08-31 12:33:45 -05:00
sqrrm
4d32da7289
Merge pull request #4420 from stejbac/fix-blank-offer-book-price-cells
Fix intermittent blank price cells in offer book view
2020-08-31 19:02:19 +02:00
chimp1984
5555c43ea9
Merge branch 'master_upstream' into refactor-filter 2020-08-31 10:15:42 -05:00
chimp1984
591011e516
Add comment 2020-08-31 09:51:53 -05:00
chimp1984
e9e7b489be
Various refactorings, bug fixes and improvements.
Sorry for the messy commit... its late ;-)
2020-08-31 00:10:41 -05:00
chimp1984
4f0e574bf9
Use static field for dev test values 2020-08-30 21:38:32 -05:00
chimp1984
f8b5c30fb4
Refactor:
- Rename AutoConfirmResult to AssetTxProofResult
- Update protobuf entry
2020-08-30 19:35:26 -05:00
chimp1984
2a887e1f01
Improve SetXmrTxKeyWindow 2020-08-30 17:01:21 -05:00
chimp1984
2fb625642a
Refactoring: Rename getTextStatus to getStatusAsDisplayString 2020-08-30 16:45:46 -05:00
chimp1984
595c968f2d
Various small cleanups... 2020-08-30 16:44:45 -05:00
chimp1984
e5aee1ca07
No functionality has been changed by that refactoring, just moved
classes and renamed package and adjusted access modifiers.
2020-08-30 15:50:15 -05:00
chimp1984
ed5078c0f1
Add abstract AutoConfirmResult class to get better support if we want
to add auto confirm for other currencies in the future. The generic part
is only used where we would have issues with backward compatibility like
in the protobuf objects. Most of the current classes are kept XMR
specific and could be generalized once we add other assets, but that
would be an internal refactoring without breaking any network or
storage data. I think it would be premature to go further here as we
don't know the details of other use cases. I added the methods used from
clients to AutoConfirmResult, not sure if the API is well defined by
that, but as said that could become subject of a future refactoring once
another auto confirm feature gets added. Goal of that refactoring was
to avoid that we need more fields for trade and the the UI would have to
deal with lots of switch cases based on currency.

Sorry that is a larger commit, would have been hard to break up...
2020-08-30 15:45:47 -05:00
chimp1984
6c60e1739d
Add support for user name for Revolut accounts
If a user has an existing account with phone number or email as
account ID we show a popup at startup where we require that he sets the
user name. This popup has no close button so he is forced to enter a
value. If there are multiple account multiple popups will be shown.

To not break signed accounts we keep accountId as internal id used for signing.
Old accounts get a popup to add the new required field userName but accountId is
left unchanged. Newly created accounts fill accountId with the value of userName.
In the UI we only use userName.

Input validation does only check for length (5-100 chars). Not sure what
are the requirements at Revolut. Can be changes easily if anyone gets
the specs.
2020-08-30 12:58:31 -05:00
chimp1984
5501822128
Merge branch 'master_upstream' into xmr 2020-08-29 23:03:13 -05:00
chimp1984
ebecd20949
Merge branch 'master_upstream' into add-check-for-option-trade 2020-08-29 20:00:07 -05:00
chimp1984
bedcd9b10e
Add option trade detection message to result message if case was
marked as option trade.

Add repeated calls to price provider it no data available (can happen at
startup).

Show reason in dispute summary.
2020-08-29 19:58:51 -05:00
chimp1984
01482fb8e6
Refactoring
Separate validation from setting key
2020-08-29 13:21:19 -05:00
Christoph Atteneder
835c511cf5
Merge pull request #4448 from wiz/revert-4398-header-tweaks
Revert "Header and other visual tweaks"
2020-08-29 20:01:15 +02:00
chimp1984
7a4fc3d6b7
Merge branch 'master_upstream' into refactor-filter 2020-08-29 12:56:29 -05:00
chimp1984
8253957cb2
Fix null pointer in case if selectedMarketPrice is null 2020-08-29 12:19:36 -05:00
sqrrm
38f9d251ae
Merge pull request #4435 from chimp1984/improve-network-statistics
Add more detailed network statistics
2020-08-29 19:01:43 +02:00
jmacxx
cccc6de595
Default to clearnet XMR proof providers when in dev mode 2020-08-29 10:21:03 -05:00
wiz
997a2a5e55
Revert "Header and other visual tweaks" 2020-08-29 18:12:23 +09:00
chimp1984
f52beadc47
Improve dispute views
Add re-open dispute button to mediation views (not refund agent as
there it might be dangerous if he would close 2 times and pay out twice.

If a dispute was reopened and a message was sent afterwards the receiver
will auto-reopen the dispute as well and the UI shows the number
indicator.

Add search field to traders dispute views.

Fix DisputeMsgEvents which was handling only legacy arbitration cases
and now uses mediation and refund agent. Used to update state in case
the UI is not selected.

Add "send private notification" button for mediators and refund agents.

Add report button for mediators and refund agents
Generates report text of all disputes with more detailed information
which should be used for reporting.

Add "Dump text of all disputes" button for getting a text representation
of all disputes including the messages for mediators and refund agents.
This is not used for report but might be useful for search, etc.

Do not show legacy arbitration tabs (for traders as well for
arbitrators) if no cases available.

Add 5 new enum entries for Reason for dispute:
OPTION_TRADE
SELLER_NOT_RESPONDING
WRONG_SENDER_ACCOUNT,
TRADE_ALREADY_SETTLED,
PEER_WAS_LATE

Hide NO_REPLY, SCAM and PROTOCOL_VIOLATION in UI (still in code if we still
need it and re-activate them).
2020-08-28 22:15:11 -05:00
chimp1984
97ec45c173
Merge branch 'reenable-chat-on-dispute-reopen' into add-report-button-for-dispute-views 2020-08-28 14:23:36 -05:00
chimp1984
fa9f799186
Improve dispute views
Add report button:
Generates report text of all disputes with more detailed information
which should be used for reporting.

Add "Dump text of all disputes" button for getting a text representation
of all disputes including the messages. This is not used for report but
might be useful for search, etc.

Do not show legacy arbitration tabs (for traders as well for
arbitrators) if no cases available.

Add 3 new enum entries for Reason for dispute:
OPTION_TRADE
SELLER_NOT_RESPONDING
WRONG_SENDER_ACCOUNT
Hide NO_REPLY and PROTOCOL_VIOLATION in UI (still in code if we still
need it and re-activate them)
2020-08-28 13:48:28 -05:00
jmacxx
e3bf0735f7
Persist the auto confirm state of Trade object
Auto confirmed trades will be indicated as such on Trade details.
2020-08-28 12:13:50 -05:00
chimp1984
2f291a6acb
Cleanup Filter value object. Remove nullables from old versions. Keep signatureAsBase64 nullable as it is set null at creation time and set later after signing. We use filter protobuf data as input for signature so we have to set signature to null and apply the signature afterwards. To keep object immutable we clone it with static clone method. Similar we handle signature verification. We clone the filter with a null value for the signature and do the validation with that cloned object.
Use now the complete object data for signature creation. We use the protobuf data for creating the signature with DER encoding. We restict ourself more regarding backward compatibility but I think it is not a big problem.
If a new field is added to Filter and deployed the maintainer needs to publishes a new filter object. By using the new version he cannot remove the old filter from the network as the protobuf data is different and sig verification on the P2P datastorage level will fail. This is intended to keep the old filter alive for some time to support not updated users. We do not remove invalid filters anymore from our local storage to enable seed nodes to support also old filter objects.
For not updated users the new filter will fail at sig verification because the protobuf data is different. So they ignore the new filter and still use the old filter. For updated users the old filter will fail and the new filter is accepted. As it has a newer date it would also replace the old filter anyway. If the maintainer wants to delete the old filter from the network he can use the old app version and remove the filter. It is recommended to keep a copy of the data directory before the update so that the removal of the older filter is possible.

Refacorings:
- Rename isPeersPaymentAccountDataAreBanned to arePeersPaymentAccountDataBanned
- Rename isSignerPubKeyBanned to isWitnessSignerPubKeyBanned
2020-08-27 21:23:02 -05:00
jmacxx
967e0538d6
Rename XmrProofResult to AutoConfirmResult 2020-08-27 21:15:24 -05:00
chimp1984
8c619530a4
Remove display of data from last second 2020-08-27 15:43:13 -05:00
Jelle Besseling
61d730abf9
Add Tether token support via ERC20 and Omni 2020-08-27 11:55:23 +02:00