diff --git a/examples/privy-next-yield-demo/.env.local.example b/examples/privy-next-yield-demo/.env.local.example index 0065c04..a1d43ee 100644 --- a/examples/privy-next-yield-demo/.env.local.example +++ b/examples/privy-next-yield-demo/.env.local.example @@ -4,7 +4,7 @@ PRIVY_APP_SECRET=your-privy-app-secret # Vault Configuration NEXT_PUBLIC_VAULT_ID=your-vault-id -NEXT_PUBLIC_FEE_RECIPIENT=0x...fee-recipient-address +NEXT_PUBLIC_ADMIN_WALLET_ID=your-admin-wallet-id # Webhook (optional — for real-time transaction status updates) PRIVY_WEBHOOK_SECRET=your-privy-webhook-secret diff --git a/examples/privy-next-yield-demo/README.md b/examples/privy-next-yield-demo/README.md index 6c5b88e..7caa590 100644 --- a/examples/privy-next-yield-demo/README.md +++ b/examples/privy-next-yield-demo/README.md @@ -44,8 +44,8 @@ NEXT_PUBLIC_VAULT_ID=your-vault-id # Webhook Secret (for transaction updates) PRIVY_WEBHOOK_SECRET=your-webhook-secret -# Optional: Fee Recipient Address (for display purposes) -NEXT_PUBLIC_FEE_RECIPIENT=0x... +# Privy Admin Wallet (not relevant if you are using an external wallet) +NEXT_PUBLIC_ADMIN_WALLET_ID=your-admin-wallet-id ``` Get your Privy credentials from [dashboard.privy.io](https://dashboard.privy.io). @@ -115,7 +115,7 @@ The app uses the **Privy Home** design system with: ## Learn More -- [Privy Documentation](https://docs.privy.io) +- [Privy Documentation](https://docs.privy.io/transaction-management/earn/overview) - [Privy Yield API](https://docs.privy.io/guide/yield) - [Morpho Protocol](https://morpho.org) - [Base Network](https://base.org) diff --git a/examples/privy-next-yield-demo/src/app/app-dashboard/page.tsx b/examples/privy-next-yield-demo/src/app/app-dashboard/page.tsx index f279af9..57a1cf1 100644 --- a/examples/privy-next-yield-demo/src/app/app-dashboard/page.tsx +++ b/examples/privy-next-yield-demo/src/app/app-dashboard/page.tsx @@ -11,14 +11,14 @@ import { FeeRecipientCard } from "@/components/FeeRecipientCard"; import { TransactionHistory } from "@/components/TransactionHistory"; import { FullScreenLoader } from "@/components/ui/fullscreen-loader"; import { Header } from "@/components/ui/header"; -import { getFeeRecipientWalletId } from "@/lib/constants"; +import { getAdminWalletId } from "@/lib/constants"; export default function AppDashboard() { const { ready, authenticated, logout } = usePrivy(); const router = useRouter(); const [refreshKey, setRefreshKey] = useState(0); - const feeRecipientWalletId = getFeeRecipientWalletId(); + const adminWalletId = getAdminWalletId(); useEffect(() => { if (ready && !authenticated) { @@ -55,11 +55,11 @@ export default function AppDashboard() {
- Fee recipient wallet ID not configured. Set NEXT_PUBLIC_FEE_RECIPIENT_WALLET_ID in your environment. + Admin wallet ID not configured. Set NEXT_PUBLIC_ADMIN_WALLET_ID in your environment.
)} diff --git a/examples/privy-next-yield-demo/src/lib/constants.ts b/examples/privy-next-yield-demo/src/lib/constants.ts index 4a82553..a36c9e2 100644 --- a/examples/privy-next-yield-demo/src/lib/constants.ts +++ b/examples/privy-next-yield-demo/src/lib/constants.ts @@ -12,7 +12,7 @@ export const PRIVY_API_URL = 'https://api.privy.io/v1'; // Environment variables (set these in .env.local) export const getVaultId = () => process.env.NEXT_PUBLIC_VAULT_ID || ''; -export const getFeeRecipientWalletId = () => process.env.NEXT_PUBLIC_FEE_RECIPIENT_WALLET_ID || ''; +export const getAdminWalletId = () => process.env.NEXT_PUBLIC_ADMIN_WALLET_ID || ''; // Format USDC amount for display (from smallest unit to human readable) export function formatUSDC(amount: string | bigint): string {