feat(swap): native KeepKey swap in a side panel; rebrand ShapeShift nav entry#254
Merged
Conversation
…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.
This was referenced Jun 18, 2026
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
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 matureSwapDialog). This PR is purely the modal → side-panel re-house plus the KeepKey nav rebrand, branched offdevelop.Changes
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 atZ.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.TopNavshapeshifttab →swapwith a KeepKey swap-arrows icon (drops the ShapeShift fox). The tab now dispatchesswap-cmd:open(handled by the existingSwapRpcMount) to open the in-app panel instead of launchingapp.shapeshift.com.swapnav label across all 15 locales; removed the now-orphanshapeshiftnav key.Test plan
tsc -p tsconfig.json— zero new errors vs thedevelopbaseline.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.