feat(frontend): token selector step for Liquidium Supply#13513
Open
DenysKarmazynDFINITY wants to merge 2 commits into
Open
feat(frontend): token selector step for Liquidium Supply#13513DenysKarmazynDFINITY wants to merge 2 commits into
DenysKarmazynDFINITY wants to merge 2 commits into
Conversation
|
✅ No security or compliance issues detected. Reviewed everything up to 5581f4f. Security Overview
Detected Code Changes
|
03e554c to
e83fae5
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Adds an in-wizard token selector to the Liquidium Supply modal so users can switch the supplied token from within the flow and the modal can be launched without a pre-selected market (“neutral” entry point), aligning behavior with other token-picking wizards (Swap/Trade).
Changes:
- Introduces a new Liquidium Supply token-list wizard step and supporting UI (select-token prompt + tokens list modal step).
- Adds a derived store (
liquidiumSupplyMarkets) to drive the supply-available token list (excluding unavailable / borrowed markets). - Updates wizard step enums/config/i18n and adds/extends unit tests for the new step and components.
Reviewed changes
Copilot reviewed 30 out of 31 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/frontend/src/tests/lib/derived/liquidium.derived.spec.ts | Adds coverage for the new liquidiumSupplyMarkets derived store behavior. |
| src/frontend/src/tests/lib/config/lend-borrow.config.spec.ts | Updates expected Liquidium Supply wizard step list to include the new token list step. |
| src/frontend/src/tests/lib/components/liquidium/supply/LiquidiumSupplyTokensList.spec.ts | New tests for the supply token list UI (exclusion of selected token, selection callback, neutral launch). |
| src/frontend/src/tests/lib/components/liquidium/LiquidiumSelectTokenForm.spec.ts | New tests for the neutral “select token” prompt form behavior. |
| src/frontend/src/lib/utils/wizard-modal.utils.ts | Extends goToWizardStep typing to include Liquidium Supply step names. |
| src/frontend/src/lib/types/i18n.d.ts | Adds the select_supply_token Liquidium i18n key to typings. |
| src/frontend/src/lib/i18n/zh-CN.json | Adds select_supply_token translation key (empty → falls back to en via merge). |
| src/frontend/src/lib/i18n/vi.json | Adds select_supply_token translation key (empty → falls back to en via merge). |
| src/frontend/src/lib/i18n/ru.json | Adds select_supply_token translation key (empty → falls back to en via merge). |
| src/frontend/src/lib/i18n/pt.json | Adds select_supply_token translation key (empty → falls back to en via merge). |
| src/frontend/src/lib/i18n/pl.json | Adds select_supply_token translation key (empty → falls back to en via merge). |
| src/frontend/src/lib/i18n/ko-KR.json | Adds select_supply_token translation key (empty → falls back to en via merge). |
| src/frontend/src/lib/i18n/ja.json | Adds select_supply_token translation key (empty → falls back to en via merge). |
| src/frontend/src/lib/i18n/it.json | Adds select_supply_token translation key (empty → falls back to en via merge). |
| src/frontend/src/lib/i18n/hi.json | Adds select_supply_token translation key (empty → falls back to en via merge). |
| src/frontend/src/lib/i18n/fr.json | Adds select_supply_token translation key (empty → falls back to en via merge). |
| src/frontend/src/lib/i18n/es.json | Adds select_supply_token translation key (empty → falls back to en via merge). |
| src/frontend/src/lib/i18n/en.json | Adds the English string for select_supply_token. |
| src/frontend/src/lib/i18n/de.json | Adds select_supply_token translation key (empty → falls back to en via merge). |
| src/frontend/src/lib/i18n/cs.json | Adds select_supply_token translation key (empty → falls back to en via merge). |
| src/frontend/src/lib/i18n/ar.json | Adds select_supply_token translation key (empty → falls back to en via merge). |
| src/frontend/src/lib/enums/wizard-steps.ts | Adds TOKENS_LIST to WizardStepsLiquidiumSupply. |
| src/frontend/src/lib/derived/liquidium.derived.ts | Adds liquidiumSupplyMarkets derived store to compute supply-eligible markets. |
| src/frontend/src/lib/config/lend-borrow.config.ts | Adds Liquidium Supply token list step to the wizard step configuration. |
| src/frontend/src/lib/components/stake/StakeForm.svelte | Makes the token logo optionally selectable by threading isSelectable/onClick through to the input. |
| src/frontend/src/lib/components/liquidium/supply/LiquidiumSupplyTokensList.svelte | New token-list step UI for selecting the supply market/token. |
| src/frontend/src/lib/components/liquidium/supply/LiquidiumSupplyModal.svelte | Refactors modal to support neutral launch + in-flow token selection step and market switching. |
| src/frontend/src/lib/components/liquidium/supply/LiquidiumSupplyForm.svelte | Enables token selection interaction from the amount form via optional onSelectToken. |
| src/frontend/src/lib/components/liquidium/supply/LiquidiumSupplyEthWizard.svelte | Passes onSelectToken down so ETH supply flow can open the token list. |
| src/frontend/src/lib/components/liquidium/supply/LiquidiumSupplyBtcWizard.svelte | Passes onSelectToken down so BTC supply flow can open the token list. |
| src/frontend/src/lib/components/liquidium/LiquidiumSelectTokenForm.svelte | New neutral-launch form that prompts token selection before enabling the supply flow. |
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.
Motivation
The Liquidium Supply modal only ever supplied the token of the market card it was launched from — there was no way to switch tokens inside the wizard, and no way to open the flow without a pre-selected market. This adds an in-wizard token selector (mirroring the Swap/Trade flows) so the user can change the supplied token from the amount input, and makes the modal usable as a "neutral" entry point (no market pre-selected) for the upcoming box-header "+ Supply" action.