feat(settings): selectable primary display currency (#63)#71
Open
Zillatron27 wants to merge 1 commit into
Open
feat(settings): selectable primary display currency (#63)#71Zillatron27 wants to merge 1 commit into
Zillatron27 wants to merge 1 commit into
Conversation
The liquidity pane's headline currency was always derived from the company's faction, but players often trade mainly in a non-faction currency based on where they operate. New settings.preferredCurrency (default null = faction-derived, unchanged behaviour) overrides it via resolvePrimaryCurrency(); Settings gains a Primary Currency picker (Auto | AIC | CIS | ICA | NCC) using the established button-group idiom. Closes #63. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ❌ Deployment failed View logs |
apxm | 355e139 | Jul 06 2026, 10:56 AM |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
First PR of the action-passthrough wave. The liquidity pane's headline currency was always derived from the company's faction (
countryIdGUID →COUNTRY_CURRENCY); players who trade mainly in a non-faction currency saw the wrong headline. This adds a user override:settings.preferredCurrency: string | null— defaultnullkeeps the faction-derived behaviour exactly as before (persist merge handles the new top-level key for existing users).lib/currency.tsgainsresolvePrimaryCurrency(countryId, override)— override wins, else faction lookup. All currency logic stays in the one pure module.CashBalancePaneresolves through it (settings value added to the memo deps).Auto | AIC | CIS | ICA | NCCbutton group (PrUn's currency set is fixed; ECD stays excluded as before).Closes #63.
Testing
resolvePrimaryCurrencyoverride/fallback/no-company/null cases; settings default-null + setter round-trip.npx tsc --noEmitclean; Chrome + Firefox builds green.🤖 Generated with Claude Code