-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Add support to duplicate BSQ swap offers #5886
Add support to duplicate BSQ swap offers #5886
Conversation
@ripcurlx ACK for invocation from Open Offers.
|
Missed to add it there as well ☝️ |
Maybe only in History and and My open offers first, as within Open trades it might become a little bit confusing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK
The duplicate icon is shown also for the taker in history. When clicking it shows a popup. Better to use that data to not show it in the first place IMO. |
core/src/main/java/bisq/core/offer/bsq_swap/BsqSwapOfferModel.java
Outdated
Show resolved
Hide resolved
...src/main/java/bisq/desktop/main/offer/bsq_swap/create_offer/BsqSwapCreateOfferDataModel.java
Outdated
Show resolved
Hide resolved
desktop/src/main/java/bisq/desktop/main/offer/bsq_swap/create_offer/BsqSwapCreateOfferView.java
Outdated
Show resolved
Hide resolved
...src/main/java/bisq/desktop/main/offer/bsq_swap/create_offer/BsqSwapCreateOfferViewModel.java
Outdated
Show resolved
Hide resolved
...src/main/java/bisq/desktop/main/offer/bsq_swap/create_offer/BsqSwapCreateOfferViewModel.java
Outdated
Show resolved
Hide resolved
@@ -572,6 +575,33 @@ private void updateButtonDisableState() { | |||
isPlaceOfferButtonDisabled.set(createOfferRequested || !inputDataValid || miningPoW.get()); | |||
} | |||
|
|||
private void maybeInitializeWithData() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe rename to maybeApplyFromDuplicateOffer
or the like, to make the use case more clear. I check if the offer is null at the caller would also help to make it more clear when its applied.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I kept the naming more general, as I though that there could be other use cases as well. Like some onboarding form in the future that automatic pre-fills a buy BSQ form.
Regarding the offer null check. Where do you want to see this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I meant to have the if check for null could be done at the caller of maybeInitializeWithData
and then its not a maybe anymore... but no strong opinion either... It just took a bit more effort to understand the code that ways as one need to jump to the method to see whats really going on there to see that its only an optional case if the param is null.
desktop/src/main/java/bisq/desktop/main/portfolio/closedtrades/ClosedTradesView.java
Outdated
Show resolved
Hide resolved
desktop/src/main/java/bisq/desktop/main/portfolio/duplicateoffer/DuplicateOfferView.java
Outdated
Show resolved
Hide resolved
desktop/src/main/java/bisq/desktop/main/portfolio/PortfolioView.java
Outdated
Show resolved
Hide resolved
e0c9051
to
c6c2ae5
Compare
…ffer is duplicated
c6c2ae5
to
a1ecf35
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK
Fixes #5774 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK - based on #5886 (review) and #5886 (review)
Fixes #5865.
As BSQ swap offers have their own creation form I didn't want to bloat the duplicate offer tab, but rather re-use the create offer form.