Commit graph

10185 commits

Author SHA1 Message Date
Steven Barclay
77a8c20ce9
Avoid unchecked casts when deserializing JSON using Gson 2019-11-17 01:25:11 +00:00
Steven Barclay
09a964ff27
Avoid raw types to prevent unchecked casts in Log.java
Add missing ILoggingEvent type arg to local variable declarations.
2019-11-17 01:25:11 +00:00
Steven Barclay
dd6db4687c
Improve type safety of ProtoUtil.collectionToProto(Collection)
Add a Class<T> parameter to the method, in order to avoid an unchecked
cast to the Message type T. The cast was wrapped in a try-catch block,
which is useless due to erasure, so use Class.cast(..) instead.
2019-11-17 01:25:10 +00:00
Steven Barclay
2f61b025f5
Improve type safety of the fluent interface of Overlay<T>
Refactor all the unchecked casts from Overlay<T> to T into a single
private cast() method. Also add a runtime type check to the constructor
to prevent creation of window objects of the form "A extends Overlay<B>"
for unrelated A & B, as such casts would then subvert the type system.
2019-11-17 01:24:46 +00:00
Steven Barclay
6b0da3d08b
Don't extend ActivatableViewAndModel when the model is empty
Remove the no-arg constructor from ActivatableViewAndModel, which sets
a dummy Activatable singleton as the model. (Since the model type param
can't be checked at runtime, improper use of the constructor could cause
heap pollution.)

Instead, extend 'ActivatableView<R, Void>' consistently, as other views
without a model currently do.
2019-11-17 01:18:58 +00:00
lusarz
a6ee5d5c45
Reformat sendButton handler in FilterWindow 2019-11-15 17:39:41 +01:00
lusarz
0c2639a87b
Extract setupFieldFromPaymentAccountFiltersList method in FilterWindow 2019-11-15 17:39:40 +01:00
lusarz
415648e257
Extract readAsPaymentAccountFiltersList method in FilterWindow 2019-11-15 17:39:40 +01:00
lusarz
96046fa110
Extract setupFieldFromList method in FilterWindow 2019-11-15 17:39:36 +01:00
Christoph Atteneder
fb96ad3550
Merge pull request #3612 from chimp1984/fix-bug-with-account-delete
Fix bug with mutating account after saving
2019-11-15 14:55:10 +01:00
Christoph Atteneder
b536db38fa
Update contributing.md (#3613)
* Fixed spelling in Contributing.md

* Added PR timeout info

* Remove optional signing info
2019-11-15 14:44:21 +01:00
Florian Reimair
8b76a443b0
Remove optional signing info 2019-11-15 11:16:24 +01:00
Florian Reimair
95d7b0ef6b
Added PR timeout info 2019-11-15 11:16:05 +01:00
Florian Reimair
5a9cf88787
Fixed spelling in Contributing.md 2019-11-15 11:14:55 +01:00
chimp1984
4e5bbbd563
Fixes https://github.com/bisq-network/bisq/pull/3572
We saved the account and afterwards called setSelectedTradeCurrency.
That caused a bug with remove as the hash at insert was different as at
remove.
2019-11-15 01:07:17 -05:00
chimp1984
9092160700
Adjust tests to new params 2019-11-15 00:03:52 -05:00
chimp1984
50fc1393e0
Remove sellerSecurityDeposit field, refactor placeOffer 2019-11-14 23:58:31 -05:00
chimp1984
44781e1fba
Adjust to new super class params 2019-11-14 23:57:12 -05:00
chimp1984
41535fb7d4
Add MakerFeeProvider 2019-11-14 23:56:11 -05:00
chimp1984
9c279f023f
Use getReservedFundsForOffer from createOfferService 2019-11-14 23:40:36 -05:00
chimp1984
84b49eda14
Sort params for offer as they are used 2019-11-14 23:33:11 -05:00
chimp1984
018cccfe03
Remove trivial methods, rename methods 2019-11-14 23:26:45 -05:00
chimp1984
98c2601a36
Remove trivial methods 2019-11-14 23:24:38 -05:00
chimp1984
a881519857
Use weaker access 2019-11-14 23:21:34 -05:00
chimp1984
5ff5941cdb
Remove unused fields 2019-11-14 23:18:31 -05:00
chimp1984
fe52a33c5f
Add log of params, Cleanup 2019-11-14 23:18:11 -05:00
chimp1984
35f0040e0c
Add null checks 2019-11-14 23:04:25 -05:00
chimp1984
5c6b122d20
Use weaker access 2019-11-14 23:03:02 -05:00
chimp1984
0a58a2a243
Add createOfferService, remove unused params 2019-11-14 23:02:44 -05:00
chimp1984
2b1c754cfd
Remove unused fields 2019-11-14 22:57:53 -05:00
chimp1984
c4b88ab512
Use createAndGetOffer from createOfferService 2019-11-14 22:56:42 -05:00
chimp1984
ef27dbd03d
Use getMaxTradeLimit from createOfferService 2019-11-14 22:44:40 -05:00
chimp1984
b584825101
Pass useMarketBasedPriceValue to getPriceAsLong 2019-11-14 22:42:39 -05:00
chimp1984
646808623c
Use marketPriceMarginParam from createOfferService 2019-11-14 22:41:53 -05:00
chimp1984
7d2016a839
Use getPriceAsLong from createOfferService 2019-11-14 22:34:22 -05:00
chimp1984
8eea87ef32
Use txFeeFromFeeService from createOfferService
- Use getEstimatedFeeAndTxSize from CreateOfferService for
txFeeFromFeeService
2019-11-14 22:14:44 -05:00
chimp1984
8423845f37
Use methods from createOfferService
- Use getBuyerSecurityDepositAsCoin and getSellerSecurityDepositAsCoin
from CreateOfferService
2019-11-14 22:03:53 -05:00
chimp1984
947fe5ae19
Add getEstimatedFeeAndTxSize method
- Rename estimateTxSize to updateEstimatedFeeAndTxSize
- Add getEstimatedFeeAndTxSize method to CreateOfferService
- Add dependent methods and fields
2019-11-14 21:53:59 -05:00
chimp1984
15f9860513
Add getSellerSecurityDeposit method 2019-11-14 21:35:01 -05:00
chimp1984
9865c80b96
Add getRandomOfferId method 2019-11-14 21:34:14 -05:00
chimp1984
e30875eb15
User weaker access, add final 2019-11-14 21:33:17 -05:00
chimp1984
bdf0d86fa4
Remove commented out code 2019-11-14 21:31:36 -05:00
chimp1984
838113f986
Add CreateOfferService class 2019-11-14 21:31:01 -05:00
chimp1984
f6b097235f
Add toProtoTradeStatistics2 method
API will use getTradeStatistics and expect TradeStatistics2 not
PersistableNetworkPayload
2019-11-14 21:06:42 -05:00
chimp1984
a20449458b
Remove trailing spaces 2019-11-14 21:05:34 -05:00
Niyi Dada
fb073c7056
BSQ Merit now displayed - fixes issue #3352 2019-11-14 21:55:14 +01:00
Julian Knutsen
bdfe32bd18
[BUGFIX] Validate Entry.receiversPubKey for MailboxPayloads
The remove code checks to ensure these fields match, but the add code
never did. This could lead to a situation where a MailboxStoragePayload
could be added, but never removed.
2019-11-14 10:19:28 -08:00
Julian Knutsen
9ffbcf795e
[REFACTOR] Use common path for updating map/data store on remove
Previously, the expire path, the remove path, and the onDisconnect
all used separate logic for updating the map, signaling listeners, and
removing PersistablePaylod objects from the data store. This led to a
bug where the onDisconnect path did not update the protectedDataStore.

Combine the three code paths to ensure that the same state is updated
regardless of the context.
2019-11-14 10:08:08 -08:00
Julian Knutsen
b10a603ead
[BUGFIX] Correctly remove PersistablePayload in onDisconnect path
The code to remove expired Entrys in the onDisconnect path was not
correctly removing the Entry from the protectedDataStore.

This patch adds a test that failed and fixes the bug.
2019-11-14 10:08:07 -08:00
Julian Knutsen
8ecb5b9cb1
[REFACTOR] Clean up removeExpiredEntries
* All of this work is done on the UserThread so there is no need to
clone the map.

* ArrayList objects are faster to iterate than HashSets and the data is
  guaranteed to be unique since the source is a ConcurrentHashMap

* Finding all items to remove first, then removing them all is an easier
  to read code pattern instead of removing during iteration.
2019-11-14 10:04:59 -08:00