diff --git a/.changeset/rare-shirts-flow.md b/.changeset/rare-shirts-flow.md new file mode 100644 index 00000000..d2beb589 --- /dev/null +++ b/.changeset/rare-shirts-flow.md @@ -0,0 +1,5 @@ +--- +'@coinbase/build-onchain-apps': patch +--- + +- **fix**: Update Paymaster URL environment variable. By @cpcramer diff --git a/template/web/app/paymaster-bundler/_components/PaymasterBundlerDemo.tsx b/template/web/app/paymaster-bundler/_components/PaymasterBundlerDemo.tsx index 44f64fc7..bdd4e39a 100644 --- a/template/web/app/paymaster-bundler/_components/PaymasterBundlerDemo.tsx +++ b/template/web/app/paymaster-bundler/_components/PaymasterBundlerDemo.tsx @@ -8,13 +8,13 @@ import { CallStatus } from './CallStatus'; // Use the local API URL to target the Paymaster directly without a proxy // if running on localhost, otherwise use the Paymaster Proxy. -const paymasterURL = process.env.NEXT_PRIVATE_PAYMASTER_URL; +const paymasterURL = process.env.NEXT_PUBLIC_PAYMASTER_URL; const isLocalEnv = isLocal(); const defaultUrl = isLocalEnv ? paymasterURL : `${document.location.origin}/api/paymaster-proxy`; export default function PaymasterBundlerDemo() { const { address } = useAccount(); - const { data: transactionID, writeContracts } = useWriteContracts(); + const { data: callID, writeContracts } = useWriteContracts(); const contract = usePaymasterBundlerContract(); if (contract.status !== 'ready') { @@ -76,12 +76,7 @@ export default function PaymasterBundlerDemo() { > Mint NFT - {transactionID && } - {transactionID && ( -
- Transaction ID: {transactionID} -
- )} + {callID && } ); diff --git a/template/web/src/utils/paymasterClient.ts b/template/web/src/utils/paymasterClient.ts index f2b9686d..4a0f0acc 100644 --- a/template/web/src/utils/paymasterClient.ts +++ b/template/web/src/utils/paymasterClient.ts @@ -3,7 +3,7 @@ import { paymasterActionsEip7677 } from 'permissionless/experimental'; import { createClient, http } from 'viem'; import { baseSepolia } from 'viem/chains'; -const paymasterService = process.env.NEXT_PRIVATE_PAYMASTER_URL ?? ''; +const paymasterService = process.env.NEXT_PUBLIC_PAYMASTER_URL ?? ''; export const paymasterClient = createClient({ chain: baseSepolia,