chimp1984
0fa45650b6
Merge branch 'dispute-agent-branch' into wip-merge-tradeprot
...
# Conflicts:
# core/src/main/java/bisq/core/trade/DelayedPayoutTxValidation.java
# core/src/main/java/bisq/core/trade/protocol/tasks/buyer/BuyerVerifiesFinalDelayedPayoutTx.java
# desktop/src/main/java/bisq/desktop/main/portfolio/pendingtrades/PendingTradesDataModel.java
# desktop/src/main/java/bisq/desktop/main/portfolio/pendingtrades/steps/buyer/BuyerStep1View.java
# desktop/src/main/java/bisq/desktop/main/portfolio/pendingtrades/steps/buyer/BuyerStep2View.java
2020-09-23 08:27:09 -05:00
chimp1984
6fa2225b65
Use fluent interface for checking state and conditions
2020-09-23 01:48:02 -05:00
chimp1984
7c6f0ac9b2
Use ifInPhase APi for testing expected phase(s)
...
Add ifInPhase method to allow alternative phases. We can have parallel branches how we reach a new state, e.g. receiving the tx from network or receiving it from the peer. no guarantee which will happen first.
Allow phase transition to skip a future phase as we have phases only relevant for one role. This is not good for treading it as a state machine state, we need to redesign the state/phase handling...
2020-09-22 21:09:09 -05:00
chimp1984
48241af316
Change isTradeInPhase APi to fluent interface with ifInPhase
2020-09-22 20:18:59 -05:00
chimp1984
5f8f30a8b3
Add BuyerSendCounterCurrencyTransferStartedMessage as second optional task instead of starting a new task runner
2020-09-22 19:53:19 -05:00
chimp1984
1abe6adac6
Remove empty tasks.
2020-09-22 19:40:15 -05:00
chimp1984
8ce5ebadea
Refactoring: rename, cleanups
2020-09-22 19:35:24 -05:00
chimp1984
4b7307e07f
Add checks for state at handle CounterCurrencyTransferStartedMessage
...
Add ApplyFilter task
2020-09-22 19:35:01 -05:00
chimp1984
c7e0c51875
Use same model as in SellerSendsDepositTxAndDelayedPayoutTxMessage
...
Reason: the other model was already tested quite a lot and seems to work correctly.
We gain a lot of resiliance with min. costs (repeated mailbox messages - as they are the same
they will not cause higher number of msg, just a bit more traffic)
2020-09-22 19:34:14 -05:00
chimp1984
96221317e2
Change order of tasks
...
Call BuyerSetupPayoutTxListener before BuyerSendCounterCurrencyTransferStartedMessage
We will change BuyerSendCounterCurrencyTransferStartedMessage so that it
does not complete until the message has been ACKed by the peer.
It is more transparent to leave the task uncompleted and if it is the last task we dont have issues.
The caller would not get the result handler called though until all is completed. But the result handler in the UI was anyway empty.
2020-09-22 19:01:51 -05:00
chimp1984
b13e1a3edb
Resend DepositTxAndDelayedPayoutTxMessage at
...
SellerSendsDepositTxAndDelayedPayoutTxMessage if no ACK received
Add checks for valid trade state transitions
2020-09-22 18:50:45 -05:00
chimp1984
2b747cc323
Don't return null if name is null by try to use UNDEFINED. Only if that is not present we return null
2020-09-22 18:48:47 -05:00
chimp1984
527f1537a9
Add listener on BuyerSendCounterCurrencyTransferStartedMessage to resend msg case it has not arrived
...
Add signed witness to PayoutTxPublishedMessage
Remove usage of RefreshTradeStateRequest but leave it for backward compatibility
Move removeMailboxMessageAfterProcessing calls in finally branch
Rename methods
2020-09-22 00:32:28 -05:00
chimp1984
33c816acf6
Move SellerPublishesDepositTx after SellerSendsDepositTxAndDelayedPayoutTxMessage
...
This should help to avoid that the buyer does not get the delayed payout tx.
If a timeout at deposit tx broadcast would prevent that it get out, the peer has at least both transactions.
The timeout could be Bisq internal but the tx gets in reality published. With the previous code we would get interrupted at
SellerPublishesDepositTx and then the SellerSendsDepositTxAndDelayedPayoutTxMessage would never get executed.
2020-09-21 23:41:24 -05:00
chimp1984
971cd57984
Refactoring: cleanups, rename cleanupTradableOnFault
2020-09-21 23:34:07 -05:00
chimp1984
538db2f36f
Move contractHash creation to MakerCreateAndSignContract
2020-09-21 23:26:51 -05:00
chimp1984
0f36ae8928
Refactoring: cleanups
2020-09-21 23:17:50 -05:00
chimp1984
853dac7544
Remove empty task runner
2020-09-21 23:04:45 -05:00
chimp1984
17baf18844
Refactoring: cleanups
2020-09-21 23:01:33 -05:00
chimp1984
e960e12084
Refactoring: cleanups
2020-09-21 22:58:13 -05:00
chimp1984
fdde4b552c
Refactoring: cleanups
2020-09-21 22:29:13 -05:00
chimp1984
9966f9a9a8
Move contractHash creation to TakerVerifyAndSignContract
2020-09-21 22:25:48 -05:00
chimp1984
2aa5feebc1
Move stopTimeout to second message handler
2020-09-21 22:23:01 -05:00
chimp1984
a725227ff3
Refactor: set string at success handlers correctly
2020-09-21 22:20:08 -05:00
chimp1984
53526e3c20
Remove repeated TakerVerifyMakerAccount and TakerVerifyMakerFeePayment from taker protocol
2020-09-21 22:08:24 -05:00
chimp1984
a8a3318f67
Refactoring: cleanups
2020-09-21 22:07:51 -05:00
chimp1984
5705d8e67a
Refactoring: rename inputsForDepositTxResponse , add more checkNotNull checks
2020-09-21 22:01:30 -05:00
chimp1984
e02355704b
Unsubscribe before state is set to avoid duplicate calls
...
Cleanups
2020-09-21 21:53:45 -05:00
chimp1984
03c2fbfb1d
Refactoring: cleanups
2020-09-21 20:45:52 -05:00
chimp1984
dc8ddbd4ae
Refactoring: cleanups
2020-09-21 20:31:22 -05:00
chimp1984
3a7af57a43
Refactoring: cleanups, add more checkNotNull tests
2020-09-21 20:18:47 -05:00
chimp1984
3269e8c6f0
Remove check that account age signature can be null. Such old versions are not supported anymore.
...
Cleanups.
2020-09-21 20:11:06 -05:00
chimp1984
a3864efe9a
Refactor: Remove final
2020-09-21 20:10:16 -05:00
chimp1984
525360c3ce
Use ApplyFilter at start at take offer process.
...
Make paymentAccountPayload nullable
Set TempTradingPeerNodeAddress with value from trade.getTradingPeerNodeAddress()
2020-09-21 20:02:50 -05:00
chimp1984
c88135713e
Revert removal of Nullable. arbitratorNodeAddress is null (confused it with acceptedArbitratorNodeAddresses)
2020-09-21 20:01:24 -05:00
chimp1984
19afb449d5
Refactor: rename inputsForDepositTxRequest to request
...
Remove final
Cleanups
2020-09-21 19:49:36 -05:00
chimp1984
a25dcf29fa
Refactor: Rename sig to accountAgeWitnessSignatureOfOfferId to make context more clear
2020-09-21 19:48:35 -05:00
chimp1984
87c2ddf200
Remove Nullable annotations. arbitratorNodeAddress is not null and accountAgeWitnessSignatureOfOfferId
...
was added in v 0.6 so is with todays versions also not null
2020-09-21 19:48:01 -05:00
chimp1984
6a83534377
Cleanups. Small functional change by removing wrapping into arraylist
2020-09-21 19:29:15 -05:00
chimp1984
3d56312ccd
Refactor:
...
- Remove '@SuppressWarnings({"unused"})'
2020-09-21 19:11:44 -05:00
chimp1984
4d7b2897fc
Refactor:
...
- Use `TaskRunner<Trade> taskHandler` instead of `TaskRunner taskHandler`
2020-09-21 19:11:07 -05:00
chimp1984
944a77d695
Refactor:
...
- Rename getFundsNeededForTradeAsLong to getFundsNeededForTrade
- Use checkNotNull instead of if/else check
- Cleanups
2020-09-21 19:09:14 -05:00
chimp1984
690104e6ea
Show popup on MissingDelayedPayoutTxException. Update display string of popup
2020-09-21 18:56:58 -05:00
chimp1984
66a26893f0
Always show deposit and delayed payout tx in trade details window. If null it shows N/A
2020-09-21 18:55:49 -05:00
Christoph Atteneder
6af2a46e49
Merge pull request #4542 from chimp1984/refactor-regexvalidator
...
Refactor regexvalidator
2020-09-21 20:16:53 +02:00
Christoph Atteneder
0cb70da265
Merge pull request #4509 from oscarguindzberg/extract_to_segwit
...
Extract btc to segwit addresses
2020-09-21 19:54:31 +02:00
Oscar Guindzberg
93f9f83136
Make codacy happy
2020-09-21 12:40:53 -03:00
Oscar Guindzberg
2a33095021
WalletService.isOutputScriptConvertibleToAddress() include segwit outputs
2020-09-21 12:40:53 -03:00
Oscar Guindzberg
e8c82549a8
Use Address.fromString() for btc addresses
...
Use Address.fromString() instead of LegacyAddress.fromBase58() for btc addresses.
Trade protocol addresses not migrated yet.
2020-09-21 12:40:52 -03:00
Oscar Guindzberg
87833fd3fc
Declare returning type as LegacyAddress
2020-09-21 12:40:52 -03:00