Skip to content

feat(frontend): token selector step for Liquidium Supply#13513

Open
DenysKarmazynDFINITY wants to merge 2 commits into
mainfrom
feat/liquidium-supply-token-select
Open

feat(frontend): token selector step for Liquidium Supply#13513
DenysKarmazynDFINITY wants to merge 2 commits into
mainfrom
feat/liquidium-supply-token-select

Conversation

@DenysKarmazynDFINITY

Copy link
Copy Markdown
Contributor

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.

@DenysKarmazynDFINITY DenysKarmazynDFINITY requested a review from a team as a code owner July 10, 2026 14:26
Copilot AI review requested due to automatic review settings July 10, 2026 14:26
@zeropath-ai

zeropath-ai Bot commented Jul 10, 2026

Copy link
Copy Markdown

No security or compliance issues detected. Reviewed everything up to 5581f4f.

Security Overview
Detected Code Changes
Change Type Relevant files
Enhancement ► src/frontend/src/lib/components/liquidium/LiquidiumSelectTokenForm.svelte
    Add token selection form for Liquidium
► src/frontend/src/lib/components/liquidium/supply/LiquidiumSupplyBtcWizard.svelte
    Add onSelectToken prop and pass through in BTC supply flow
► src/frontend/src/lib/components/liquidium/supply/LiquidiumSupplyEthWizard.svelte
    Add onSelectToken prop and pass through in ETH supply flow
► src/frontend/src/lib/components/liquidium/supply/LiquidiumSupplyForm.svelte
    Introduce onSelectToken to enable token selector via form
► src/frontend/src/lib/config/lend-borrow.config.ts
    Add TOKENS_LIST step to liquidium supply wizard steps
► src/frontend/src/lib/derived/liquidium.derived.ts
    Compute liquidiumSupplyMarkets to filter available markets based on portfolio
Enhancement ► src/frontend/src/lib/components/liquidium/supply/LiquidiumSupplyModal.svelte
    Integrate LiquidiumSelectTokenForm and token picker flow
► src/frontend/src/lib/components/liquidium/supply/LiquidiumSupplyTokensList.svelte
    Add token list UI for selecting supply tokens
► src/frontend/src/lib/tests/lib/components/liquidium/supply/LiquidiumSupplyTokensList.spec.ts
    Add tests for token list behavior and selection
► src/frontend/src/tests/lib/components/liquidium/LiquidiumSelectTokenForm.spec.ts
    Add tests for select-token prompt and token picker opening
► src/frontend/src/tests/lib/derived/liquidium.derived.spec.ts
    Add tests for liquidiumSupplyMarkets derived store
Enhancement ► src/frontend/src/lib/types/i18n.d.ts
    Add select_supply_token field to I18nLiquidium interface
► src/frontend/src/lib/i18n/en.json
    Add English translation for select_supply_token
► src/frontend/src/lib/i18n/* (multiple languages)*/
    Add select_supply_token key across locales
► src/frontend/src/lib/i18n/cs.json
    Add select_supply_token key
► src/frontend/src/lib/i18n/de.json
    Add select_supply_token key
► src/frontend/src/lib/i18n/es.json
    Add select_supply_token key
► src/frontend/src/lib/i18n/fr.json
    Add select_supply_token key
► src/frontend/src/lib/i18n/hi.json
    Add select_supply_token key
► src/frontend/src/lib/i18n/it.json
    Add select_supply_token key
► src/frontend/src/lib/i18n/ja.json
    Add select_supply_token key
► src/frontend/src/lib/i18n/ko-KR.json
    Add select_supply_token key
► src/frontend/src/lib/i18n/pl.json
    Add select_supply_token key
► src/frontend/src/lib/i18n/pt.json
    Add select_supply_token key
► src/frontend/src/lib/i18n/ru.json
    Add select_supply_token key
► src/frontend/src/lib/i18n/vi.json
    Add select_supply_token key
► src/frontend/src/lib/i18n/zh-CN.json
    Add select_supply_token key
Bug Fix / Refactor ► src/frontend/src/lib/utils/wizard-modal.utils.ts
    Update step type imports to include WizardStepsLiquidiumSupply
► src/frontend/src/lib/enums/wizard-steps.ts
    Add TOKENS_LIST to WizardStepsLiquidiumSupply enum

@DenysKarmazynDFINITY DenysKarmazynDFINITY force-pushed the feat/liquidium-supply-token-select branch from 03e554c to e83fae5 Compare July 10, 2026 14:28

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread src/frontend/src/lib/components/liquidium/supply/LiquidiumSupplyModal.svelte Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants