Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bsq swap: Implementation [3] #5775

Merged
merged 274 commits into from
Nov 4, 2021
Merged

Conversation

chimp1984
Copy link
Contributor

@chimp1984 chimp1984 commented Oct 21, 2021

Based on #5770

Starts at 9c56202

This adds the whole BSQ swap implementation. I did not see much value in breaking it up into many commits. I think for review its best to check it out and do a full compare to the previous PR to see the changes.

All that work is derived from the work of @sqrrm at #5729

EDIT:
Merged and rebased #5770

…radeUtil, TradeTxException to package bisq.core.trade.bisq_v1
BuyerAsMakerTrade, BuyerAsTakerTrade, BuyerTrade
to bisq.core.trade.model.bisq_v1 package
We will move BsqSwapTrades into closed trades as well once confrimed
Prepare that BsqSwapTrades can be added
checkArgument(trade instanceof BuyerTrade) failed in dev testing
when clicking very fast confirm buttons.
Likely due lagging UI (previous trade in selection...).
Could not reproduce it afterwards
classes and comparators
Add bsq wallet balance listener to update list
Use BsqSwapTrade details window if Bsq trade
Show "N/A" for deposits in case of BSQ swaps
Cleanup ClosedTradesDataModel
Fix num trades
Implement getTxFee in concrete classes. For Maker trades we return the txFee from the offer.

We use txFee in 2 different context:
1. For the txFee the taker pays and which is used for all the trade txs
2. As generic tx fee the user has paid. The makers tx fee is in the offer.
   The taker pays 3 times the tradeTxFee
to bisq.core.util.validation package. No code change.

Is needed for next refactorings.
Renamed ClosedTradeUtil to ClosedTradableUtil

Leaves only static functional methods in ClosedTradableUtil
Domain methods requiring services are in ClosedTradableManager
This keeps also the TradableList

All formatting code is in ClosedTradableFormatter
@ripcurlx
Copy link
Contributor

ripcurlx commented Nov 4, 2021

NIT: If there is no BSQ swap I think we should not show the Unconfirmed... tab.

Bildschirmfoto 2021-11-04 um 09 56 44

@ripcurlx ripcurlx added this to the v1.8.0 milestone Nov 4, 2021
Copy link
Contributor

@ripcurlx ripcurlx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK - Besides the NIT I mentioned above I think it is good to move to some extended developer testing on master. Everyone running on master please be aware that the offer propagation might not be very stable until our seednodes have been updated (hint to @Emzy). Besides that BSQ swaps were thoroughly manually and automated tested on Regtest and on Mainnet.

@ripcurlx ripcurlx merged commit da66ffe into bisq-network:master Nov 4, 2021
@ripcurlx ripcurlx mentioned this pull request Nov 4, 2021
@chimp1984 chimp1984 deleted the bsq-swap-impl branch November 4, 2021 11:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants