Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (4)
📒 Files selected for processing (28)
WalkthroughRefactors MuSig market selection from base-crypto-asset (BTC/XMR) to market-type (FIAT/OTHER); adds MarketType, MarketListItem, MarketTypeListItem and menu item classes; replaces last-selected market map with separate fiat/other settings fields; updates models, controllers, views, resources, and Market APIs to use the “relevant” side. Changes
Sequence DiagramsequenceDiagram
participant User as User
participant View as MuSigOfferbookView
participant Controller as MuSigOfferbookController
participant Model as MuSigOfferbookModel
participant Repo as MarketRepository
participant Settings as SettingsService
User->>View: Click market type (FIAT/OTHER)
View->>Controller: onSelectMarketType(MarketType)
Controller->>Model: selectedMarketType.set(type)
Controller->>Repo: getAllFiatMarkets() or getAllCryptoAssetMarkets()
Repo-->>Controller: List<Market>
Controller->>Model: update marketListItems (MarketListItem)
Controller->>Settings: getMuSigLastSelectedFiatMarket()/getMuSigLastSelectedOtherMarket()
Settings-->>Controller: Market (maybe null)
Controller->>Model: selectedMarketItem.set(market)
Model-->>View: observable updates (market items, selection)
View->>View: render table, highlight MarketsTypeMenuItem
User->>View: Select specific MarketListItem
View->>Controller: onMarketListItemClicked(MarketListItem)
Controller->>Settings: setMuSigLastSelectedFiatMarket()/setMuSigLastSelectedOtherMarket()
Settings->>Settings: persist()
Estimated Code Review Effort🎯 4 (Complex) | ⏱️ ~70 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
Updates the MuSig offerbook/create-offer UI to group markets into “Fiat” and “Other” categories with dedicated icons, and persists the last selected market per category.
Changes:
- Replace base-asset (BTC/XMR) selection with market-type selection (Fiat vs Other) in MuSig offer listing and market selection popup.
- Add new “fiat-markets” / “other-markets” icons + CSS wiring for desktop UI.
- Update settings persistence model to store last selected fiat/other market.
Reviewed changes
Copilot reviewed 22 out of 26 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| settings/src/main/proto/settings.proto | Reworks persisted settings fields to store last-selected fiat/other market. |
| settings/src/main/java/bisq/settings/SettingsStore.java | Serializes/deserializes new persisted market-type preferences. |
| settings/src/main/java/bisq/settings/SettingsService.java | Exposes new observables and setters for last-selected fiat/other market. |
| i18n/src/main/resources/mu_sig.properties | Adds new i18n keys for “Fiat markets” / “Other markets” and popup label. |
| common/src/main/java/bisq/common/market/Market.java | Adds a display helper used by the new market list UI. |
| apps/desktop/desktop/src/main/resources/images/markets/other-markets@2x.png | Adds new “other markets” icon asset. |
| apps/desktop/desktop/src/main/resources/images/markets/other-markets.png | Adds new “other markets” icon asset. |
| apps/desktop/desktop/src/main/resources/images/markets/fiat-markets@2x.png | Adds new “fiat markets” icon asset. |
| apps/desktop/desktop/src/main/resources/images/markets/fiat-markets.png | Adds new “fiat markets” icon asset. |
| apps/desktop/desktop/src/main/resources/css/mu_sig.css | Tweaks dropdown menu hover/active background styling. |
| apps/desktop/desktop/src/main/resources/css/images.css | Registers new CSS image IDs for fiat/other market icons. |
| apps/desktop/desktop/src/main/resources/css/base.css | Adds a new dark grey color token used by MuSig dropdown styling. |
| apps/desktop/desktop/src/main/java/bisq/desktop/main/content/mu_sig/offer/listing/SortAndFilterDropdownMenuItem.java | Extracts dropdown menu item helper into its own class. |
| apps/desktop/desktop/src/main/java/bisq/desktop/main/content/mu_sig/offer/listing/SelectableMenuItem.java | Extracts selectable dropdown menu item helper into its own class. |
| apps/desktop/desktop/src/main/java/bisq/desktop/main/content/mu_sig/offer/listing/MuSigOfferbookView.java | Updates offerbook UI to select market type and show appropriate icons/names. |
| apps/desktop/desktop/src/main/java/bisq/desktop/main/content/mu_sig/offer/listing/MuSigOfferbookModel.java | Replaces selected base-asset state with selected market-type state. |
| apps/desktop/desktop/src/main/java/bisq/desktop/main/content/mu_sig/offer/listing/MuSigOfferbookController.java | Loads/updates market lists based on market type; persists last selection per type. |
| apps/desktop/desktop/src/main/java/bisq/desktop/main/content/mu_sig/offer/listing/MuSigMarketItem.java | Adds “relevant market code/name” logic for fiat vs crypto markets. |
| apps/desktop/desktop/src/main/java/bisq/desktop/main/content/mu_sig/offer/listing/MarketType.java | Introduces FIAT/OTHER market type enum with i18n display strings. |
| apps/desktop/desktop/src/main/java/bisq/desktop/main/content/mu_sig/offer/listing/MarketsTypeMenuItem.java | Adds a dropdown menu item class specialized for market-type selection. |
| apps/desktop/desktop/src/main/java/bisq/desktop/main/content/mu_sig/offer/create_offer/direction_and_market/MuSigCreateOfferDirectionAndMarketView.java | Updates create-offer market selection popup to use market-type table instead of base-asset table. |
| apps/desktop/desktop/src/main/java/bisq/desktop/main/content/mu_sig/offer/create_offer/direction_and_market/MuSigCreateOfferDirectionAndMarketModel.java | Adds market-type list state and removes base-asset list state. |
| apps/desktop/desktop/src/main/java/bisq/desktop/main/content/mu_sig/offer/create_offer/direction_and_market/MuSigCreateOfferDirectionAndMarketController.java | Drives market list contents based on selected market type; persists last selected by type. |
| apps/desktop/desktop/src/main/java/bisq/desktop/main/content/mu_sig/offer/create_offer/direction_and_market/MarketTypeListItem.java | Adds list item wrapper for market types. |
| apps/desktop/desktop/src/main/java/bisq/desktop/main/content/mu_sig/offer/create_offer/direction_and_market/MarketListItem.java | Extracts market list item into its own class and uses new Market display helper. |
| apps/desktop/desktop/src/main/java/bisq/desktop/main/content/bisq_easy/offerbook/BisqEasyOfferbookView.java | Removes unused imports (cleanup). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
...p/src/main/java/bisq/desktop/main/content/mu_sig/offer/listing/MuSigOfferbookController.java
Outdated
Show resolved
Hide resolved
...p/src/main/java/bisq/desktop/main/content/mu_sig/offer/listing/MuSigOfferbookController.java
Outdated
Show resolved
Hide resolved
...t/mu_sig/offer/create_offer/direction_and_market/MuSigCreateOfferDirectionAndMarketView.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (2)
common/src/main/java/bisq/common/market/Market.java (1)
160-164: Minor formatting issue and missing trailing newline.There's an extra space after
returnon line 162. Also, the file appears to be missing a trailing newline.✨ Suggested fix
public String getSignificantCodeAndDisplayName() { - return getNonBtcCurrencyCode() + " (" + getNonBtcCurrencyName() + ")"; + return getNonBtcCurrencyCode() + " (" + getNonBtcCurrencyName() + ")"; } +🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@common/src/main/java/bisq/common/market/Market.java` around lines 160 - 164, In getSignificantCodeAndDisplayName() remove the stray extra space after the return keyword so the line reads with correct spacing and formatting, and ensure the file ends with a trailing newline; this touches the getSignificantCodeAndDisplayName method only (fix the spacing around "return" and add a final newline at EOF).apps/desktop/desktop/src/main/java/bisq/desktop/main/content/mu_sig/offer/create_offer/direction_and_market/MarketListItem.java (1)
28-50: Consider whethernumOffersAsIntegershould be included inequals/hashCode.Including
numOffersAsIntegerin equality means that when the offer count changes for a market, the item will be considered different. This could cause the table selection to be lost when the list is refreshed with updated offer counts, as the new item won't equal the previously selected item.If the intent is to preserve selection across offer count updates, consider excluding
numOffersAsIntegerfrom equality:💡 Alternative: Base equality only on market
`@EqualsAndHashCode`(onlyExplicitlyIncluded = true) `@Getter` class MarketListItem { `@EqualsAndHashCode.Include` private final Market market; - `@EqualsAndHashCode.Include` private final long numOffersAsInteger;Otherwise, if offer count changes should trigger visual updates that require re-selection, the current implementation is correct.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@apps/desktop/desktop/src/main/java/bisq/desktop/main/content/mu_sig/offer/create_offer/direction_and_market/MarketListItem.java` around lines 28 - 50, The current MarketListItem uses `@EqualsAndHashCode`(onlyExplicitlyIncluded = true) and marks both market and numOffersAsInteger with `@EqualsAndHashCode.Include`, causing equality to change when the offer count updates; to preserve selection across updates remove the `@EqualsAndHashCode.Include` annotation from the numOffersAsInteger field (leave the market field included) so equality/hashCode are based only on market in the MarketListItem class (adjust any tests or callers that expect the old semantics if needed).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In
`@apps/desktop/desktop/src/main/java/bisq/desktop/main/content/mu_sig/offer/create_offer/direction_and_market/MuSigCreateOfferDirectionAndMarketController.java`:
- Around line 166-170: updateWithLastSelectedOrDefaultMarket currently passes
the raw value from
settingsService.getMuSigLastSelectedFiatMarket()/getMuSigLastSelectedOtherMarket()
into setSelectedMarketAndListItem, which can be null and later causes a null
dereference in updateSelectedMarket()/market.isCrypto(); fix by resolving a
non-null, type-appropriate fallback before calling
setSelectedMarketAndListItem—e.g., check Optional presence or use
orElse(defaultMarket) on settingsService.getMuSigLastSelectedFiatMarket() and
getMuSigLastSelectedOtherMarket(), determine a sensible default Market (crypto
vs fiat) and pass that to setSelectedMarketAndListItem; apply the same pattern
to the other occurrence referenced (lines 174–181) so
setSelectedMarketAndListItem always receives a valid Market instance.
In
`@apps/desktop/desktop/src/main/java/bisq/desktop/main/content/mu_sig/offer/listing/MuSigOfferbookController.java`:
- Around line 118-132: The search breaks for OTHER markets because after
selectedBaseCryptoAssetPin switches to
MarketRepository.getAllCryptoAssetMarkets(), the onActivate() search predicate
still filters by quoteCurrencyCode/quoteCurrencyDisplayName (which are BTC for
OTHER markets), excluding altcoins; update the search logic in onActivate() to
use baseCurrencyCode/baseCurrencyDisplayName when model.getSelectedMarketType()
!= MarketType.FIAT (or otherwise include both quote and base fields), so
searches match the visible altcoin columns; adjust references to
quoteCurrencyCode/quoteCurrencyDisplayName to check
baseCurrencyCode/baseCurrencyDisplayName (or both) when
updateMarketItems()/getAllCryptoAssetMarkets() is active.
---
Nitpick comments:
In
`@apps/desktop/desktop/src/main/java/bisq/desktop/main/content/mu_sig/offer/create_offer/direction_and_market/MarketListItem.java`:
- Around line 28-50: The current MarketListItem uses
`@EqualsAndHashCode`(onlyExplicitlyIncluded = true) and marks both market and
numOffersAsInteger with `@EqualsAndHashCode.Include`, causing equality to change
when the offer count updates; to preserve selection across updates remove the
`@EqualsAndHashCode.Include` annotation from the numOffersAsInteger field (leave
the market field included) so equality/hashCode are based only on market in the
MarketListItem class (adjust any tests or callers that expect the old semantics
if needed).
In `@common/src/main/java/bisq/common/market/Market.java`:
- Around line 160-164: In getSignificantCodeAndDisplayName() remove the stray
extra space after the return keyword so the line reads with correct spacing and
formatting, and ensure the file ends with a trailing newline; this touches the
getSignificantCodeAndDisplayName method only (fix the spacing around "return"
and add a final newline at EOF).
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 09445b6c-c6f8-4764-b456-3bc3a3770189
⛔ Files ignored due to path filters (4)
apps/desktop/desktop/src/main/resources/images/markets/fiat-markets.pngis excluded by!**/*.pngapps/desktop/desktop/src/main/resources/images/markets/fiat-markets@2x.pngis excluded by!**/*.pngapps/desktop/desktop/src/main/resources/images/markets/other-markets.pngis excluded by!**/*.pngapps/desktop/desktop/src/main/resources/images/markets/other-markets@2x.pngis excluded by!**/*.png
📒 Files selected for processing (22)
apps/desktop/desktop/src/main/java/bisq/desktop/main/content/bisq_easy/offerbook/BisqEasyOfferbookView.javaapps/desktop/desktop/src/main/java/bisq/desktop/main/content/mu_sig/offer/create_offer/direction_and_market/MarketListItem.javaapps/desktop/desktop/src/main/java/bisq/desktop/main/content/mu_sig/offer/create_offer/direction_and_market/MarketTypeListItem.javaapps/desktop/desktop/src/main/java/bisq/desktop/main/content/mu_sig/offer/create_offer/direction_and_market/MuSigCreateOfferDirectionAndMarketController.javaapps/desktop/desktop/src/main/java/bisq/desktop/main/content/mu_sig/offer/create_offer/direction_and_market/MuSigCreateOfferDirectionAndMarketModel.javaapps/desktop/desktop/src/main/java/bisq/desktop/main/content/mu_sig/offer/create_offer/direction_and_market/MuSigCreateOfferDirectionAndMarketView.javaapps/desktop/desktop/src/main/java/bisq/desktop/main/content/mu_sig/offer/listing/MarketType.javaapps/desktop/desktop/src/main/java/bisq/desktop/main/content/mu_sig/offer/listing/MarketsTypeMenuItem.javaapps/desktop/desktop/src/main/java/bisq/desktop/main/content/mu_sig/offer/listing/MuSigMarketItem.javaapps/desktop/desktop/src/main/java/bisq/desktop/main/content/mu_sig/offer/listing/MuSigOfferbookController.javaapps/desktop/desktop/src/main/java/bisq/desktop/main/content/mu_sig/offer/listing/MuSigOfferbookModel.javaapps/desktop/desktop/src/main/java/bisq/desktop/main/content/mu_sig/offer/listing/MuSigOfferbookView.javaapps/desktop/desktop/src/main/java/bisq/desktop/main/content/mu_sig/offer/listing/SelectableMenuItem.javaapps/desktop/desktop/src/main/java/bisq/desktop/main/content/mu_sig/offer/listing/SortAndFilterDropdownMenuItem.javaapps/desktop/desktop/src/main/resources/css/base.cssapps/desktop/desktop/src/main/resources/css/images.cssapps/desktop/desktop/src/main/resources/css/mu_sig.csscommon/src/main/java/bisq/common/market/Market.javai18n/src/main/resources/mu_sig.propertiessettings/src/main/java/bisq/settings/SettingsService.javasettings/src/main/java/bisq/settings/SettingsStore.javasettings/src/main/proto/settings.proto
💤 Files with no reviewable changes (1)
- apps/desktop/desktop/src/main/java/bisq/desktop/main/content/bisq_easy/offerbook/BisqEasyOfferbookView.java
...ig/offer/create_offer/direction_and_market/MuSigCreateOfferDirectionAndMarketController.java
Show resolved
Hide resolved
...p/src/main/java/bisq/desktop/main/content/mu_sig/offer/listing/MuSigOfferbookController.java
Outdated
Show resolved
Hide resolved
2132b3d to
59cafc9
Compare
There was a problem hiding this comment.
Actionable comments posted: 2
♻️ Duplicate comments (1)
apps/desktop/desktop/src/main/java/bisq/desktop/main/content/mu_sig/offer/create_offer/direction_and_market/MuSigCreateOfferDirectionAndMarketController.java (1)
166-171:⚠️ Potential issue | 🟠 MajorInitialize the market type before restoring the persisted market.
The
elsebranch ininitializeMarketSelection()skipsselectedMarketTypeListItem, so the type subscription never populates the tables on a cold start. If the per-type setting is also empty,updateWithLastSelectedOrDefaultMarket(...)still leaves the screen without any selected market.Possible fix
private void updateWithLastSelectedOrDefaultMarket(MarketType marketType) { - if (marketType == MarketType.FIAT) { - setSelectedMarketAndListItem(settingsService.getMuSigLastSelectedFiatMarket().get()); - } else { - setSelectedMarketAndListItem(settingsService.getMuSigLastSelectedOtherMarket().get()); - } + Market market = marketType == MarketType.FIAT + ? settingsService.getMuSigLastSelectedFiatMarket().get() + : settingsService.getMuSigLastSelectedOtherMarket().get(); + if (market == null) { + market = model.getMarketListItems().stream() + .map(MarketListItem::getMarket) + .findFirst() + .orElse(null); + } + setSelectedMarketAndListItem(market); } private void initializeMarketSelection() { Market market = settingsService.getSelectedMuSigMarket().get(); if (market != null) { updateSelectedMarket(market); if (market.isBtcFiatMarket()) { model.getSelectedMarketTypeListItem().set(new MarketTypeListItem(MarketType.FIAT)); } else { model.getSelectedMarketTypeListItem().set(new MarketTypeListItem(MarketType.OTHER)); } } else { - updateWithLastSelectedOrDefaultMarket(MarketType.FIAT); + model.getSelectedMarketTypeListItem().set(new MarketTypeListItem(MarketType.FIAT)); + updateWithLastSelectedOrDefaultMarket(MarketType.FIAT); } }Also applies to: 186-197
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@apps/desktop/desktop/src/main/java/bisq/desktop/main/content/mu_sig/offer/create_offer/direction_and_market/MuSigCreateOfferDirectionAndMarketController.java` around lines 166 - 171, The code leaves selectedMarketTypeListItem uninitialized for the non-FIAT branch and also fails to handle empty per-type settings; in initializeMarketSelection() and where updateWithLastSelectedOrDefaultMarket(MarketType) is called, ensure selectedMarketTypeListItem is set for both MarketType.FIAT and the other type (so the type subscription populates tables on cold start) and change updateWithLastSelectedOrDefaultMarket to check the Optional returned by settingsService.getMuSigLastSelectedFiatMarket() / getMuSigLastSelectedOtherMarket() and, if empty, fall back to the existing default market selection logic (e.g., call the same default-market resolver used elsewhere) before calling setSelectedMarketAndListItem; reference initializeMarketSelection, selectedMarketTypeListItem, updateWithLastSelectedOrDefaultMarket, setSelectedMarketAndListItem, settingsService.getMuSigLastSelectedFiatMarket and settingsService.getMuSigLastSelectedOtherMarket.
🧹 Nitpick comments (1)
apps/desktop/desktop/src/main/java/bisq/desktop/main/content/mu_sig/offer/listing/MuSigMarketItem.java (1)
71-76: ReuseMarket’s relevant-side helpers here.This re-implements the relevant-currency selection rule in the UI model and assumes every crypto market is base-side relevant. Using the
MarketAPI directly keeps that rule in one place.♻️ Suggested simplification
- if (market.isCrypto()) { - relevantMarketCode = market.getBaseCurrencyCode(); - relevantCurrencyDisplayName = StringUtils.capitalize(market.getBaseCurrencyDisplayName()); - } else { - relevantMarketCode = market.getQuoteCurrencyCode(); - relevantCurrencyDisplayName = StringUtils.capitalize(market.getQuoteCurrencyDisplayName()); - } + relevantMarketCode = market.getRelevantCurrencyCode(); + relevantCurrencyDisplayName = StringUtils.capitalize(market.getRelevantCurrencyDisplayName());🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@apps/desktop/desktop/src/main/java/bisq/desktop/main/content/mu_sig/offer/listing/MuSigMarketItem.java` around lines 71 - 76, Replace the manual branch that inspects market.isCrypto() and sets relevantMarketCode/relevantCurrencyDisplayName with the Market-provided helpers; call market.getRelevantCurrencyCode() to populate relevantMarketCode and market.getRelevantCurrencyDisplayName() (or the equivalent Market helper methods) to set relevantCurrencyDisplayName inside MuSigMarketItem so the relevant-side rule stays centralized in Market.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In
`@apps/desktop/desktop/src/main/java/bisq/desktop/main/content/mu_sig/offer/create_offer/direction_and_market/MuSigCreateOfferDirectionAndMarketView.java`:
- Around line 251-255: The cell reuse leaves an old tooltip set when a short
displayString is rendered; in MuSigCreateOfferDirectionAndMarketView (the
rendering/update code that sets label and tooltip), clear the tooltip in the
else branch by calling label.setTooltip(null) (or tooltip.setText("") and then
label.setTooltip(null)) when displayString.length() <= 30 so previously-set
tooltips are removed for short names.
In
`@apps/desktop/desktop/src/main/java/bisq/desktop/main/content/mu_sig/offer/listing/MuSigOfferbookController.java`:
- Around line 417-424: When updating selection in
updateSelectedMuSigMarketWithBaseCurrency(MarketType), handle the case where the
saved fiat/other market is missing or stale: call
findMarketItem(settingsService.getMuSigLastSelectedFiatMarket().get()) (or the
Other variant) and if the Optional is empty, pick a fallback by scanning the
model's market list for the first MarketItem matching MarketType.FIAT or OTHER
(e.g., model.getMarketItems() or model.getMarketItemsForType) and set
model.getSelectedMarketItem() to that; if no matching markets exist, clear or
unset the selectedMarketItem consistently. Ensure you reference findMarketItem,
settingsService.getMuSigLastSelectedFiatMarket()/getMuSigLastSelectedOtherMarket(),
model.getSelectedMarketItem(), and MarketType when implementing.
---
Duplicate comments:
In
`@apps/desktop/desktop/src/main/java/bisq/desktop/main/content/mu_sig/offer/create_offer/direction_and_market/MuSigCreateOfferDirectionAndMarketController.java`:
- Around line 166-171: The code leaves selectedMarketTypeListItem uninitialized
for the non-FIAT branch and also fails to handle empty per-type settings; in
initializeMarketSelection() and where
updateWithLastSelectedOrDefaultMarket(MarketType) is called, ensure
selectedMarketTypeListItem is set for both MarketType.FIAT and the other type
(so the type subscription populates tables on cold start) and change
updateWithLastSelectedOrDefaultMarket to check the Optional returned by
settingsService.getMuSigLastSelectedFiatMarket() /
getMuSigLastSelectedOtherMarket() and, if empty, fall back to the existing
default market selection logic (e.g., call the same default-market resolver used
elsewhere) before calling setSelectedMarketAndListItem; reference
initializeMarketSelection, selectedMarketTypeListItem,
updateWithLastSelectedOrDefaultMarket, setSelectedMarketAndListItem,
settingsService.getMuSigLastSelectedFiatMarket and
settingsService.getMuSigLastSelectedOtherMarket.
---
Nitpick comments:
In
`@apps/desktop/desktop/src/main/java/bisq/desktop/main/content/mu_sig/offer/listing/MuSigMarketItem.java`:
- Around line 71-76: Replace the manual branch that inspects market.isCrypto()
and sets relevantMarketCode/relevantCurrencyDisplayName with the Market-provided
helpers; call market.getRelevantCurrencyCode() to populate relevantMarketCode
and market.getRelevantCurrencyDisplayName() (or the equivalent Market helper
methods) to set relevantCurrencyDisplayName inside MuSigMarketItem so the
relevant-side rule stays centralized in Market.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 9ca9fc55-9a2b-4138-a29c-0ad1193adfb0
⛔ Files ignored due to path filters (4)
apps/desktop/desktop/src/main/resources/images/markets/fiat-markets.pngis excluded by!**/*.pngapps/desktop/desktop/src/main/resources/images/markets/fiat-markets@2x.pngis excluded by!**/*.pngapps/desktop/desktop/src/main/resources/images/markets/other-markets.pngis excluded by!**/*.pngapps/desktop/desktop/src/main/resources/images/markets/other-markets@2x.pngis excluded by!**/*.png
📒 Files selected for processing (28)
apps/desktop/desktop/src/main/java/bisq/desktop/main/content/authorized_role/mediator/mu_sig/components/MuSigMediationCaseDetailSection.javaapps/desktop/desktop/src/main/java/bisq/desktop/main/content/bisq_easy/offerbook/BisqEasyOfferbookView.javaapps/desktop/desktop/src/main/java/bisq/desktop/main/content/mu_sig/offer/create_offer/direction_and_market/MarketListItem.javaapps/desktop/desktop/src/main/java/bisq/desktop/main/content/mu_sig/offer/create_offer/direction_and_market/MarketTypeListItem.javaapps/desktop/desktop/src/main/java/bisq/desktop/main/content/mu_sig/offer/create_offer/direction_and_market/MuSigCreateOfferDirectionAndMarketController.javaapps/desktop/desktop/src/main/java/bisq/desktop/main/content/mu_sig/offer/create_offer/direction_and_market/MuSigCreateOfferDirectionAndMarketModel.javaapps/desktop/desktop/src/main/java/bisq/desktop/main/content/mu_sig/offer/create_offer/direction_and_market/MuSigCreateOfferDirectionAndMarketView.javaapps/desktop/desktop/src/main/java/bisq/desktop/main/content/mu_sig/offer/listing/MarketType.javaapps/desktop/desktop/src/main/java/bisq/desktop/main/content/mu_sig/offer/listing/MarketsTypeMenuItem.javaapps/desktop/desktop/src/main/java/bisq/desktop/main/content/mu_sig/offer/listing/MuSigMarketItem.javaapps/desktop/desktop/src/main/java/bisq/desktop/main/content/mu_sig/offer/listing/MuSigOfferbookController.javaapps/desktop/desktop/src/main/java/bisq/desktop/main/content/mu_sig/offer/listing/MuSigOfferbookModel.javaapps/desktop/desktop/src/main/java/bisq/desktop/main/content/mu_sig/offer/listing/MuSigOfferbookView.javaapps/desktop/desktop/src/main/java/bisq/desktop/main/content/mu_sig/offer/listing/SelectableMenuItem.javaapps/desktop/desktop/src/main/java/bisq/desktop/main/content/mu_sig/offer/listing/SortAndFilterDropdownMenuItem.javaapps/desktop/desktop/src/main/java/bisq/desktop/main/content/mu_sig/trade/components/MuSigAmountAndPriceDisplay.javaapps/desktop/desktop/src/main/java/bisq/desktop/main/content/mu_sig/trade/pending/trade_details/MuSigTradeDetailsController.javaapps/desktop/desktop/src/main/java/bisq/desktop/main/content/mu_sig/trade/pending/trade_state/states/MuSigBaseState.javaapps/desktop/desktop/src/main/java/bisq/desktop/main/content/mu_sig/trade/pending/trade_state/states/MuSigTradeCompletedTable.javaapps/desktop/desktop/src/main/resources/css/base.cssapps/desktop/desktop/src/main/resources/css/images.cssapps/desktop/desktop/src/main/resources/css/mu_sig.csscommon/src/main/java/bisq/common/asset/FiatCurrency.javacommon/src/main/java/bisq/common/market/Market.javai18n/src/main/resources/mu_sig.propertiessettings/src/main/java/bisq/settings/SettingsService.javasettings/src/main/java/bisq/settings/SettingsStore.javasettings/src/main/proto/settings.proto
💤 Files with no reviewable changes (1)
- apps/desktop/desktop/src/main/java/bisq/desktop/main/content/bisq_easy/offerbook/BisqEasyOfferbookView.java
✅ Files skipped from review due to trivial changes (7)
- apps/desktop/desktop/src/main/java/bisq/desktop/main/content/mu_sig/trade/components/MuSigAmountAndPriceDisplay.java
- apps/desktop/desktop/src/main/java/bisq/desktop/main/content/mu_sig/trade/pending/trade_state/states/MuSigTradeCompletedTable.java
- apps/desktop/desktop/src/main/resources/css/mu_sig.css
- apps/desktop/desktop/src/main/resources/css/base.css
- apps/desktop/desktop/src/main/java/bisq/desktop/main/content/mu_sig/offer/listing/MarketType.java
- apps/desktop/desktop/src/main/java/bisq/desktop/main/content/authorized_role/mediator/mu_sig/components/MuSigMediationCaseDetailSection.java
- settings/src/main/java/bisq/settings/SettingsService.java
🚧 Files skipped from review as they are similar to previous changes (5)
- apps/desktop/desktop/src/main/java/bisq/desktop/main/content/mu_sig/offer/listing/SortAndFilterDropdownMenuItem.java
- apps/desktop/desktop/src/main/java/bisq/desktop/main/content/mu_sig/offer/create_offer/direction_and_market/MarketTypeListItem.java
- apps/desktop/desktop/src/main/java/bisq/desktop/main/content/mu_sig/offer/listing/MarketsTypeMenuItem.java
- apps/desktop/desktop/src/main/java/bisq/desktop/main/content/mu_sig/offer/listing/MuSigOfferbookModel.java
- common/src/main/java/bisq/common/market/Market.java
...t/mu_sig/offer/create_offer/direction_and_market/MuSigCreateOfferDirectionAndMarketView.java
Show resolved
Hide resolved
...p/src/main/java/bisq/desktop/main/content/mu_sig/offer/listing/MuSigOfferbookController.java
Show resolved
Hide resolved
59cafc9 to
37f41fa
Compare
Summary by CodeRabbit
New Features
UI/UX Updates
Other