Commit graph

12504 commits

Author SHA1 Message Date
chimp1984
0b81db5a60
Refactor: return early 2020-09-25 22:52:54 -05:00
chimp1984
35b758431d
Refactor: Move methods, rename methods 2020-09-25 22:50:42 -05:00
chimp1984
1c824f140c
Refactor: Cleanups 2020-09-25 22:37:54 -05:00
chimp1984
246d1e3ddf
Refactor: Remove onCancelAvailabilityRequest method 2020-09-25 22:31:08 -05:00
chimp1984
346d793d87
Refactor: Remove onOfferRemovedFromRemoteOfferBook method 2020-09-25 22:29:52 -05:00
chimp1984
4d40ca580c
Refactor: Remove handleTakeOfferRequest method 2020-09-25 22:28:31 -05:00
chimp1984
96ec87b50a
Refactor: let TradeManager implement DecryptedDirectMessageListener, DecryptedMailboxListener 2020-09-25 22:27:19 -05:00
chimp1984
a07fe30ac3
Refactor: Move method 2020-09-25 22:16:25 -05:00
chimp1984
82749cee70
Refactor:
- Rename handlePayDepositRequest to handleTakeOfferRequest
 - Add initTrade method without the redundant params
 - Use early returns in handleTakeOfferRequest
2020-09-25 22:15:40 -05:00
chimp1984
2fc753bde4
Rename InputsForDepositTxRequest to TakeOfferRequest
The protobuf file is not renamed. This breaks our convention to keep both the same but I think the added clarity for the trade protocol justifies the exception.
2020-09-25 22:02:43 -05:00
chimp1984
86569b1b2d
Apply fluent protocol to MediationProtocol
Rename acceptMediationResult to onAcceptMediationResult
2020-09-25 21:58:32 -05:00
chimp1984
5d312ae1ba
Refactor: add TODOs 2020-09-25 21:43:56 -05:00
chimp1984
6af9cb3dfe
Refactor: rename getTradableList to getTradesAsObservableList 2020-09-25 21:38:49 -05:00
chimp1984
a5f4cb8e85
Refactor: use getTradableList instead of tradableList.getList() 2020-09-25 21:38:06 -05:00
chimp1984
7023b2acf5
Remove onPaymentReceived method from TradeManager 2020-09-25 21:35:34 -05:00
chimp1984
a002fb33a5
Rename onFiatPaymentStarted to onPaymentStarted 2020-09-25 21:33:53 -05:00
chimp1984
612ecd3a6a
Rename onFiatPaymentReceived to onPaymentReceived 2020-09-25 21:32:27 -05:00
chimp1984
3cc633f39f
Add check if trade was already taken in the past. If so show a popup at take offer screen.
We could deactivate such offers as well but as it is only for exceptional cases I think this way is good enough (would be more effort otherwise).
2020-09-25 21:30:19 -05:00
chimp1984
98dec09c18
Rename given method to expect to make it more clear that it is mandatory that the condition is met. Also added a protocol error handler if the condition is not met.
For more tolerant usage we added the given method, which does not log errors and does not call a error handler.
2020-09-25 21:10:20 -05:00
chimp1984
dceba6d350
Bug fix: we created a new address entry which causes bugs in case a user takes an offer again which failed in an early preparation state before. 2020-09-25 20:09:31 -05:00
ghubstan
de3105a62b
Add license comment 2020-09-25 20:56:48 -03:00
ghubstan
92042d70ad
Remove unused import 2020-09-25 20:56:25 -03:00
ghubstan
18df1e2fd4
Fix abs(dbl) comparison 2020-09-25 20:53:45 -03:00
ghubstan
2f3e3a31e1
Add simple mkt-price service & test calculated offer prices
A gRPC price service was added, and api create-offer tests can check
mkt based price margin calculations.
2020-09-25 20:48:26 -03:00
chimp1984
3987f9cd5a
Fix incorrect getDepositTx calls 2020-09-25 18:16:50 -05:00
chimp1984
95cb3b2710
Fix deposit tx setters 2020-09-25 17:06:13 -05:00
sqrrm
2c252e9577
Merge pull request #4543 from chimp1984/dispute-agent-branch
Add signature to dispute result and various other improvements
2020-09-25 23:34:37 +02:00
chimp1984
568dcdaad4
Update tasks in debugview 2020-09-25 15:32:49 -05:00
chimp1984
10bedee803
Merge branch 'dispute-agent-branch' into fix-delayed-payout-tx-issues
# Conflicts:
#	core/src/main/java/bisq/core/trade/protocol/tasks/buyer/BuyerSetupDepositTxListener.java
2020-09-25 15:03:28 -05:00
chimp1984
423cc7134e
Add changes from merge conflict (class was renamed) 2020-09-25 15:01:20 -05:00
chimp1984
25c4b4d0fc
Merge branch 'master_upstream' into dispute-agent-branch
# Conflicts:
#	core/src/main/java/bisq/core/trade/DelayedPayoutTxValidation.java
2020-09-25 14:53:20 -05:00
chimp1984
8ac468d84f
Commit to trigger travis as it got stuck... 2020-09-25 14:23:06 -05:00
chimp1984
b958c7519b
Add MakerRemovesOpenOffer task.
Removes offer once the taker fee was published. So we ensure that maker fee is not lost if an error happens before that.
2020-09-25 14:17:04 -05:00
ghubstan
82ce864fda
Delete trailing spaces from blank line for codacy 2020-09-25 15:19:10 -03:00
ghubstan
3b518249d4
Do not reassign currencyCode parameter 2020-09-25 14:44:35 -03:00
ghubstan
6cf9bbbaa9
Minor createoffer test changes 2020-09-25 13:58:32 -03:00
ghubstan
995af0dd21
Convert mktPriceMargin to %, make createAndPlaceOffer private
And move createAndPlaceOffer to bottom of class file.
2020-09-25 13:50:50 -03:00
ghubstan
96278b9bab
Push currencyCode.toUpperCase conversion below CoreApi 2020-09-25 12:33:51 -03:00
chimp1984
f37446b991
Change log level 2020-09-25 09:39:45 -05:00
sqrrm
00ccec80e3
Merge pull request #4553 from oscarguindzberg/fixdoc
DAO setup doc fix
2020-09-25 11:30:24 +02:00
sqrrm
a2a284ef94
Merge pull request #4551 from oscarguindzberg/replaceBitcoinjDeprecated
Replace deprecated bitcoinj methods
2020-09-25 11:29:56 +02:00
Oscar Guindzberg
315b9ff5d7
Remove unnecessary WalletService.removeSignatures() 2020-09-25 02:28:29 -03:00
chimp1984
f1df52790b
improve trade details window 2020-09-25 00:20:17 -05:00
chimp1984
6f614f4f4c
Set takerFeeTxId and depositTx in trade only once they are published. Before that we keep it temporary in the processModel.
The buyer receives the takerFeeTxId with the frist message, but at the moment it is not published. To reflect that he also keeps it in the process model and
at the next message when the fee tx is published he sets it in the Trade.

Remove
`checkArgument(!walletService.getAddressEntry(id, AddressEntry.Context.MULTI_SIG).isPresent(),
                     "addressEntry must not be set here.");
`
as it causes failure if a taker takes same offer after certain error conditions again.
2020-09-25 00:19:43 -05:00
chimp1984
7167e2a8bd
Add check if trade has been paid out for button disable state 2020-09-24 21:10:02 -05:00
chimp1984
b494434623
Add warn icon next to trash icon. Show popup with info about the problem and instructions.
Set trash button disabled if the tx chain is valid to avoid that users move to failed while trade is valid to be completed.

Contract: Add isMyRoleMaker method
Trade: Add hasErrorMessage and isTxChainInvalid methods
2020-09-24 21:07:40 -05:00
chimp1984
f6eefef1ae
Remove handling of failed trades. If a trade is in an invalid state (tx missing) or has an error message set we show in the pending trades view a red trash icon for moving the trade to failed trades.
The info icon next to the trade ID is then a warning icon (should be red but css is not my best friend) and if opening trade details window we also color the missing txs red with a warn icon and tooltip.
When clicking the trash button a popup is displayed with detail info.
At failed trades there is a "undo" icon for reverting the trade back to pending (if user wants to open mediation, etc).

All the automatic handling of the failed trades and popups are removed as it never worked well and just confused users...

In next commits we will add more instructions what a user should/can do for diff. error cases.

TradeManger:
- Remove all the failed checks at initPendingTrade.
- Remove tradesWithoutDepositTx
- Remove tradesForStatistics as it was never read
- Remove cleanUpAddressEntries
- Rename addTradeToClosedTrades to onTradeCompleted

TxIdTextField accepts a null for tx ID and shows then red colored N/A and a warning icon.
HyperlinkWithIcon exposed the icon to be accessible for style change.
DebugWindow was updated for one variation of the trade protocol (other is missing still).
Trade detail window show now always all 4 mandatory txs.
Beside that this commit has some cleanups and null pointer fixes (when testing error scenarios i got those NP).
2020-09-24 19:47:12 -05:00
ghubstan
6cdbc137c1
Move 'createoffer' price arg transform to server & test it
The CreateOfferRequest's price field type was changed from long to string,
so a CLI param like 10000.0055 can be passed to the server as is, to be
scaled and converted there.  In general, we want to keep validation logic
on the CLI as simple as possible, and use existing core logic to
validate args and convert arg types when needed.
2020-09-24 18:13:19 -03:00
ghubstan
942a6f2203
Scale & convert (double) fixed price input to long 2020-09-24 14:56:27 -03:00
ghubstan
9999c95a9e
Change 'createoffer' argument order
And list the args in CLI --help outout.
2020-09-24 13:48:50 -03:00