For tradeStateListener that would cause a wrong state as we would get
called after we have completed and do the isPayoutPublished check.
Keeping it in sync does remove the listener before we complete the
trade.
For autoConfirmSettings it would probably not cause and issue but as
we use a CopyOnWriteArrayList there the remove is safe anyway (to not
cause a ConcurrentListModification exception).
// 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.
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
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.
Change log text.
Those banned nodes are quite old and no need to restart the app. In case
we need to really ban a node (the one we banned are just revoked) we can
use the global notification to alert users to restart.
- 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
Remove testKey test (tested uid of model)
Refactor:
- Rename uid to id (we do not have a strict guarantee for uniqueness)
- Move id from model to request (its the id of the request)
In cased new fields are added to PB this case is expected as well in
development if protbuf definitions have changed over time and persisted
data do not match the new definition. We don't want this log to be
that verbose.
The access modifier on CompositeOptionSet was changed to public
in commit c402386, to make it visible to the apitest config
class. The annotation added in this change concisely explains
why the class is not package protected.