[bisq-network/bisq] Add "Buy BSQ" button next to trade fee selector (#5055)

Jakub Loucký notifications at github.com
Tue Jan 5 00:54:05 CET 2021


Fixes #4579 

New button is added in the _CREATE OFFER_ and _TAKE OFFER_ tabs. When clicked, it shows a popup and then brings the user to the Sell Offer Book (_SELL BITCOIN_), with BSQ preselected in the currency filter.

The button is visible only when the fee currency toggles are visible (relevant in the _CREATE OFFER_ tab).

![Buy BSQ 1](https://user-images.githubusercontent.com/16313562/103590775-04d2b480-4eef-11eb-8337-5a9dfe643493.png)
![Buy BSQ popup](https://user-images.githubusercontent.com/16313562/103590785-069c7800-4eef-11eb-8681-f30f69e604b5.png)


### Situations when the button is clicked (unchecked are still buggy):

- [x] user is creating/taking offer to _BUY BTC_, and under _SELL BTC_ the tab "_CREATE OFFER_" is **not** active (it may be open but not selected);
- [ ] user is creating/taking offer to _BUY BTC_, and under _SELL BTC_ the active tab is "_CREATE OFFER_";
- [ ] user is creating offer to _SELL BTC_;
- [ ] user is taking offer to _SELL BTC_.

### Known bug:

- Certain combination of the source and destination views may cause the "_Filter by currency_" combo box to receive focus, clearing it as a result. At that point, the value "BSQ" is still in effect, but any user action after that clears the filter. (More on that in the comments below.)

### Discussion:

1. If _CREATE OFFER_ to _SELL BTC_ is already open, user will be unable to create an offer, as the button _CREATE NEW OFFER TO BUY BSQ_ will be disabled. There is no indication why. A tooltip explaining why it's disabled may be helpful.
2. Should the popup include the "_don't remind me again_" option?
3. Should we hide the button when we're creating/taking an offer to trade BTC for BSQ already?
4. Having to create an altcoin account for BSQ seems like an unnecessary step. Can we have a built-in BSQ account, ideally one that will update the address to the next unused one dynamically?
You can view, comment on, or merge this pull request online at:

  https://github.com/bisq-network/bisq/pull/5055

-- Commit Summary --

  * Add "Buy BSQ" button next to trade fee selector
  * Tiny refactoring

-- File Changes --

    M core/src/main/resources/i18n/displayStrings.properties (4)
    M desktop/src/main/java/bisq/desktop/main/offer/MutableOfferView.java (16)
    M desktop/src/main/java/bisq/desktop/main/offer/OfferView.java (72)
    M desktop/src/main/java/bisq/desktop/main/offer/OfferViewUtil.java (36)
    M desktop/src/main/java/bisq/desktop/main/offer/takeoffer/TakeOfferView.java (4)

-- Patch Links --

https://github.com/bisq-network/bisq/pull/5055.patch
https://github.com/bisq-network/bisq/pull/5055.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/bisq-network/bisq/pull/5055
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20210104/0281f894/attachment-0001.htm>


More information about the bisq-github mailing list