Skip to content

feat(swap): native KeepKey swap in a side panel; rebrand ShapeShift nav entry#254

Merged
BitHighlander merged 2 commits into
developfrom
feat/swap-sidepanel
Jun 18, 2026
Merged

feat(swap): native KeepKey swap in a side panel; rebrand ShapeShift nav entry#254
BitHighlander merged 2 commits into
developfrom
feat/swap-sidepanel

Conversation

@BitHighlander

Copy link
Copy Markdown
Collaborator

Summary

Brings KeepKey's swap into a native side panel and rebrands the swap nav entry to KeepKey — no more bounce to the external ShapeShift site.

Swap logic, RPC, tracking, history, and translations are unchanged — they already live on develop (the mature SwapDialog). This PR is purely the modal → side-panel re-house plus the KeepKey nav rebrand, branched off develop.

Changes

  • SwapDialog → side panel. The outer modal chrome (centered overlay + 760/1040px card + maxH) becomes a fixed right-slide panel (w {base:100vw, md:520px}, pinned header/footer, scrolling body). Nested asset-picker / provider-health / quote-details modals already render at Z.assetPicker, so they float over the panel unchanged. The complete/submitted view's 2-column grid (which widened the old modal to 1040px) is forced to a single column for the fixed-width panel; the HERO divider is made unconditional.
  • KeepKey nav rebrand. TopNav shapeshift tab → swap with a KeepKey swap-arrows icon (drops the ShapeShift fox). The tab now dispatches swap-cmd:open (handled by the existing SwapRpcMount) to open the in-app panel instead of launching app.shapeshift.com.
  • Per-asset entry. The AssetPage swap pill opens the same panel (same component, now rendered as a panel).
  • i18n. Localized swap nav label across all 15 locales; removed the now-orphan shapeshift nav key.

Test plan

  • tsc -p tsconfig.json — zero new errors vs the develop baseline.
  • Device smoke: open Swap from the nav tab and from an asset's Swap pill; run quote → review → sign; confirm the asset-picker / provider-health / quote dialogs float over the panel; confirm the panel scrolls and the post-swap complete view renders single-column at 520px.

Open question (deliberately not changed here)

The swap UI still shows "Powered by ShapeShift API" (footer) and the AppStore still lists ShapeShift as an external dApp. These are factual third-party attributions (the backend aggregates routes via the ShapeShift API), distinct from the nav branding. Left as-is — say the word if you want those rebranded/removed too.

…av entry

Re-house the swap flow from a centered modal into a right-slide side panel,
and replace the external-ShapeShift nav tab with a native KeepKey "Swap" entry
that opens the panel in-app.

- SwapDialog: outer modal chrome (centered overlay + 760/1040px card + maxH)
  -> fixed right-slide panel (w {base:100vw, md:520px}, pinned header/footer,
  scrolling body). Nested asset-picker / provider-health / quote modals already
  render at Z.assetPicker, so they float over the panel unchanged. Complete-view
  grid forced to a single column (the old 2-col widened the modal to 1040px,
  which a fixed-width panel can't do); HERO divider made unconditional.
- TopNav: "shapeshift" nav tab -> "swap" with a KeepKey swap-arrows icon
  (drops the ShapeShift fox).
- App: the swap tab now dispatches swap-cmd:open (handled by the existing
  SwapRpcMount) instead of launching app.shapeshift.com. The per-asset swap
  entry (AssetPage) opens the same panel.
- i18n: localized "swap" nav label across all 15 locales; drop the now-orphan
  "shapeshift" nav key.

Lifted from develop's mature swap (unchanged logic/RPC/tracking/history);
this change is purely the modal->panel shell + the KeepKey nav rebrand.
… OFF)

Add SWAP_SIDEPANEL, a Vite build-time flag (src/mainview/lib/flags.ts) that
gates the entire native swap surface so stable builds can ship with it hidden
until the side-panel UX is proven, while dev/canary builds get it ON.

- flags.ts: SWAP_SIDEPANEL = import.meta.env.VITE_SWAP_SIDEPANEL is "1"/"true".
  Default OFF (unset). Frontend-only (import.meta.env is absent in the Bun
  backend bundle, so this lives under mainview/, not shared/).
- Gates, OFF => swap fully hidden: TopNav drops the "Swap" tab; AssetPage hides
  the per-asset Swap pill and its dialog; App skips mounting SwapRpcMount;
  SwapDialog returns null as a catch-all (covers ActivityTracker resume too).
- package.json: dev / dev:hmr / hmr / build:canary set VITE_SWAP_SIDEPANEL=1;
  build / build:stable leave it unset. Flip the default (or drop the flag)
  once proven.
@BitHighlander
BitHighlander merged commit 109c7f5 into develop Jun 18, 2026
1 check passed
BitHighlander added a commit that referenced this pull request Jun 19, 2026
Revert swap-into-vault work (#254#257) — wrong project
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.

1 participant