Commit graph

4306 commits

Author SHA1 Message Date
chimp1984
86821277d9
Add support for addresses with integrated payment ID 2020-09-02 20:29:19 -05:00
chimp1984
bf73ffcfa6
Improve looging 2020-09-02 18:47:55 -05:00
chimp1984
117b5bf87c
Add default clauses 2020-09-02 16:50:11 -05:00
chimp1984
3492ae42f3
Cleanup 2020-09-02 16:40:08 -05:00
chimp1984
d3f12552aa
Update text 2020-09-02 16:17:46 -05:00
chimp1984
109f298863
Add more test cases to DevTestXmrTxProofHttpClient
Tested sequence:
1. waiting for response
2. receive TX_NOT_FOUND
3. receive PENDING_CONFIRMATIONS with 0 conf counting up to defined
requiredConf
4. success once required confs reached

- Fix bug with missing persist call
- Revert PENDING results to null when read from persistence as we dont
want to show latest pending state.
- Remove unused API_FAILURE
2020-09-02 15:17:52 -05:00
chimp1984
8e46ba6e4e
Simplify assertions 2020-09-02 14:49:53 -05:00
chimp1984
7b2823d835
Add more tests for date check 2020-09-02 14:48:16 -05:00
chimp1984
391852b5da
Add DevTestXmrTxProofHttpClient 2020-09-02 12:55:13 -05:00
chimp1984
d1379d1b6d
Fix tests 2020-09-02 12:51:44 -05:00
chimp1984
a0c75e9672
Rename class HttpClient to HttpClientImpl and interface IHttpClient
to HttpClient.
Use interface instead of class as type.
Add default guice binding to HttpClientImpl for HttpClient (not singleton!)
2020-09-02 12:41:39 -05:00
chimp1984
7e6a7a5853
Add AssetTxProofHttpClient interface
Use the AssetTxProofHttpClient as injected param instead of parser.
Helpful for dev testing with mocked json response.
2020-09-02 12:33:34 -05:00
chimp1984
6c333857e9
Config XmrTxProofParser in guice module 2020-09-02 11:18:45 -05:00
chimp1984
d725590a9c
Remove delay form UserThread.execute
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).
2020-09-02 11:16:06 -05:00
chimp1984
37241f98d8
Add interfaces and generic support
Make API more clear and helps for test setup
2020-09-02 11:12:49 -05:00
chimp1984
adbb262c1b
Add unnecessary break; at default clause to satisfy stupid codacy bot.
Getting more an more annoyed by that inflexible and often
pointless requirements.
2020-09-02 01:10:46 -05:00
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
70a0771af6
Code style: Improve order of fields 2020-09-01 21:39:55 -05:00
chimp1984
aa802a3e0e
Fix incorrect init of AutoConfirmSettings 2020-09-01 21:35:44 -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
67aa46a03b
- Fix incorrect isTerminal default value.
- Apply suggestions from code inspection
2020-09-01 20:07:12 -05:00
chimp1984
91cc14725c
Add annotation 2020-09-01 20:03:32 -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
80d85e68ec
Make constructor private 2020-09-01 19:15:19 -05:00
chimp1984
46394024e9
Dont restart seed if localhost is used 2020-09-01 19:15:06 -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
10dcc70538
Change log level if banned seed or price relay is seen from filter.
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.
2020-09-01 17:14:01 -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
chimp1984
3b4e183633
Use tradeId for prefix for id of request.
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)
2020-09-01 11:18:09 -05:00
chimp1984
6cc074a15c
Add default clause (codacy complaint) 2020-09-01 10:44:50 -05: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
7b3dc54815
dont use restart routing for seed nodes if in devmode 2020-08-31 19:29:56 -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
12ef5aafe0
Update comment 2020-08-31 16:25:07 -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
334cb43c3b
Rename verifySignature to isSignatureValid 2020-08-31 13:53:17 -05:00
chimp1984
c755fc2592
Add isPrivilegedDevPubKeyBanned method
It is used atm only for filter itself which might have limited effect.
Applying it to alert and priv notification requires adding pubKey fields
there which is outside of the scope of that PR but should be added soon
as well.
2020-08-31 13:51:41 -05:00
chimp1984
5209018f4d
Add pub key 2020-08-31 13:24:02 -05:00
chimp1984
78142bda7d
Fix tests 2020-08-31 13:23:51 -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
1b5e449114
Remove dev test code 2020-08-31 12:34:16 -05:00