Skip to content

Commit 49eeaeb

Browse files
Shawclaude
andcommitted
fix(cloud-frontend,cloud-shared): remove mainnet chain + allow x-steward-tenant CORS header
- Remove Ethereum mainnet from wagmi chains in StewardWalletProviders to stop spurious Alchemy 429 floods on page load (mainnet not needed for BSC payments or SIWE signing) - Add X-Steward-Tenant to CORS_ALLOW_HEADER_NAMES so Railway Steward proxy stops rejecting the header in preflight responses Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 11bb847 commit 49eeaeb

2 files changed

Lines changed: 3 additions & 5 deletions

File tree

packages/cloud-frontend/src/pages/login/steward-wallet-providers.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import {
1515
} from "@solana/wallet-adapter-wallets";
1616
import { useMemo } from "react";
1717
import { http, WagmiProvider } from "wagmi";
18-
import { base, bsc, mainnet } from "wagmi/chains";
18+
import { base, bsc } from "wagmi/chains";
1919

2020
const DEFAULT_SOLANA_RPC_URL = "https://api.mainnet-beta.solana.com";
2121
const FALLBACK_WALLETCONNECT_PROJECT_ID = "YOUR_WC_PROJECT_ID";
@@ -49,11 +49,8 @@ export function StewardWalletProviders({
4949
"Sign in to chat with your Eliza Cloud agent and manage your account",
5050
appUrl,
5151
projectId: walletConnectProjectId,
52-
chains: [mainnet, base, bsc],
52+
chains: [base, bsc],
5353
transports: {
54-
[mainnet.id]: alchemyKey
55-
? http(`https://eth-mainnet.g.alchemy.com/v2/${alchemyKey}`)
56-
: http("https://eth.publicnode.com"),
5754
[base.id]: alchemyKey
5855
? http(`https://base-mainnet.g.alchemy.com/v2/${alchemyKey}`)
5956
: http("https://base-rpc.publicnode.com"),

packages/cloud-shared/src/lib/cors-constants.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ export const CORS_ALLOW_HEADER_NAMES = [
3030
"X-PAYMENT",
3131
"X-PAYMENT-RESPONSE",
3232
"X-PAYMENT-STATUS",
33+
"X-Steward-Tenant",
3334
] as const;
3435

3536
export const CORS_ALLOW_HEADERS = CORS_ALLOW_HEADER_NAMES.join(", ");

0 commit comments

Comments
 (0)