Skip to content

Add optional swapToken display hints for prominent token cost in host UI#602

Draft
neynar-chatbot-agent wants to merge 1 commit into
mainfrom
cursor/swap-token-display-hints-46ce
Draft

Add optional swapToken display hints for prominent token cost in host UI#602
neynar-chatbot-agent wants to merge 1 commit into
mainfrom
cursor/swap-token-display-hints-46ce

Conversation

@neynar-chatbot-agent

Copy link
Copy Markdown

Summary

User feedback (NEYN-10665) asked for a more prominent display of token cost during mini app swap flows (e.g. word-a-day requiring 5,000,000 tokens). This repository defines the mini app SDK contract; the Farcaster client renders the swap sheet.

Changes

  • Extended SwapTokenOptions in @farcaster/miniapp-core with optional display?: { headline?: string; subline?: string } so mini apps can pass human-readable copy the host can show prominently (formatted totals, “required to participate”, etc.). sellAmount remains the source of truth for the transaction.
  • Documented the field and usage example on the swapToken docs page.

Follow-up (outside this repo)

Host / miniapp-host client implementations should read display.headline and display.subline when present and render them prominently in the swap confirmation UI. The word-a-day app should pass e.g. display: { headline: "5,000,000 tokens", subline: "Required to participate" } alongside sellAmount.

Testing

  • pnpm --filter @farcaster/miniapp-core typecheck
  • pnpm check

Linear Issue: NEYN-10665

Open in Web Open in Cursor 

Optional display.headline and display.subline on swapToken options let
mini apps pass human-readable cost context for host swap sheets while
sellAmount stays the on-chain source of truth. Documented in swap-token
SDK page with example.
@vercel

vercel Bot commented Apr 26, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
miniapps-docs Ready Ready Preview, Comment Apr 26, 2026 2:37pm

Request Review

@changeset-bot

changeset-bot Bot commented Apr 26, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 95301fc

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 13 packages
Name Type
@farcaster/miniapp-core Patch
@farcaster/frame-core Patch
@farcaster/mini-app-solana Patch
@farcaster/miniapp-host Patch
@farcaster/miniapp-node Patch
@farcaster/miniapp-sdk Patch
vanilla Patch
@farcaster/frame-host Patch
@farcaster/miniapp-host-react-native Patch
@farcaster/frame-node Patch
@farcaster/frame-sdk Patch
@farcaster/frame-host-react-native Patch
react-ts Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

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