From 0ac3ae28193a8623aaf7faf84e56001f3367e6e6 Mon Sep 17 00:00:00 2001 From: Rick Staa Date: Tue, 16 Jun 2026 17:04:24 +0200 Subject: [PATCH 1/2] feat: add Bridge LPT menu option and generalize embed modal Add a "Bridge LPT" entry to the desktop nav popover (new-window link) and mobile drawer (embedded bridge.arbitrum.io iframe modal), letting users bridge LPT from Ethereum to Arbitrum One. Rename LlamaswapModal -> EmbedModal since it now hosts both the DefiLlama swap and the Arbitrum bridge embeds. Closes #704 Co-Authored-By: Claude Opus 4.8 (1M context) --- components/Drawer/index.tsx | 33 +++++++++++++++++-- .../{LlamaswapModal => EmbedModal}/index.tsx | 4 +-- layouts/main.tsx | 6 ++++ 3 files changed, 38 insertions(+), 5 deletions(-) rename components/{LlamaswapModal => EmbedModal}/index.tsx (80%) diff --git a/components/Drawer/index.tsx b/components/Drawer/index.tsx index 860eb764..a5509203 100644 --- a/components/Drawer/index.tsx +++ b/components/Drawer/index.tsx @@ -6,7 +6,7 @@ import Router, { useRouter } from "next/router"; import { useEffect } from "react"; import Account from "../Account"; -import LlamaswapModal from "../LlamaswapModal"; +import EmbedModal from "../EmbedModal"; import Logo from "../Logo"; const Index = ({ @@ -159,7 +159,7 @@ const Index = ({ Docs - - + + + + Bridge LPT + + } + > + + { +const EmbedModal = ({ trigger, children }) => { return ( {trigger} @@ -11,4 +11,4 @@ const Index = ({ trigger, children }) => { ); }; -export default Index; +export default EmbedModal; diff --git a/layouts/main.tsx b/layouts/main.tsx index e3c203f2..3f4722ab 100644 --- a/layouts/main.tsx +++ b/layouts/main.tsx @@ -734,6 +734,12 @@ const Layout = ({ children, title = "Livepeer Explorer" }) => { > Get LPT + + Bridge LPT + Date: Tue, 16 Jun 2026 17:56:32 +0200 Subject: [PATCH 2/2] fix: a11y and DRY cleanup for LPT menu embeds - Add title attributes to the Get LPT / Bridge LPT iframes. - Render modal triggers as real buttons so they are keyboard-focusable. - Extract the swap/bridge URLs into constants/links.ts to keep the desktop and mobile surfaces in sync. - Use portal.arbitrum.io for the bridge link (the embeddable Arbitrum portal; the earlier framing concern was a Cloudflare bot-challenge artifact, not the real app's headers). Co-Authored-By: Claude Opus 4.8 (1M context) Co-Authored-By: Copilot Co-Authored-By: coderabbitai[bot] --- components/Drawer/index.tsx | 23 ++++++++++++++++++----- constants/links.ts | 9 +++++++++ layouts/main.tsx | 5 +++-- 3 files changed, 30 insertions(+), 7 deletions(-) create mode 100644 constants/links.ts diff --git a/components/Drawer/index.tsx b/components/Drawer/index.tsx index a5509203..b486bf6f 100644 --- a/components/Drawer/index.tsx +++ b/components/Drawer/index.tsx @@ -1,5 +1,6 @@ import { DrawerItem } from "@layouts/main"; -import { Box, Flex, Link as A, Text } from "@livepeer/design-system"; +import { Box, Flex, Link as A } from "@livepeer/design-system"; +import { BRIDGE_LPT_URL, GET_LPT_URL } from "constants/links"; import { IS_L2 } from "lib/chains"; import Link from "next/link"; import Router, { useRouter } from "next/router"; @@ -162,12 +163,17 @@ const Index = ({ Get LPT @@ -176,25 +182,31 @@ const Index = ({ > Bridge LPT @@ -203,13 +215,14 @@ const Index = ({ > LPT on Arbitrum via the DefiLlama aggregator. +export const GET_LPT_URL = `https://swap.defillama.com/?chain=arbitrum&from=0x0000000000000000000000000000000000000000&to=${ARBITRUM_LPT_ADDRESS}`; + +// Bridge LPT from Ethereum to Arbitrum One via the Arbitrum bridge portal. +export const BRIDGE_LPT_URL = `https://portal.arbitrum.io/bridge?destinationChain=arbitrum-one&sourceChain=ethereum&token=${ETHEREUM_LPT_ADDRESS}`; diff --git a/layouts/main.tsx b/layouts/main.tsx index 3f4722ab..9c7659de 100644 --- a/layouts/main.tsx +++ b/layouts/main.tsx @@ -39,6 +39,7 @@ import { useProtocolQuery, useTreasuryProposalsQuery, } from "apollo"; +import { BRIDGE_LPT_URL, GET_LPT_URL } from "constants/links"; import { BigNumber } from "ethers"; import { CHAIN_INFO, DEFAULT_CHAIN_ID } from "lib/chains"; import dynamic from "next/dynamic"; @@ -730,13 +731,13 @@ const Layout = ({ children, title = "Livepeer Explorer" }) => { Get LPT Bridge LPT