Skip to content
This repository was archived by the owner on Feb 5, 2025. It is now read-only.

Commit 9508542

Browse files
authored
fix: Update Paymaster URL environment variable. (#510)
1 parent 6a727f4 commit 9508542

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

.changeset/rare-shirts-flow.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@coinbase/build-onchain-apps': patch
3+
---
4+
5+
- **fix**: Update Paymaster URL environment variable. By @cpcramer

template/web/app/paymaster-bundler/_components/PaymasterBundlerDemo.tsx

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ import { CallStatus } from './CallStatus';
88

99
// Use the local API URL to target the Paymaster directly without a proxy
1010
// if running on localhost, otherwise use the Paymaster Proxy.
11-
const paymasterURL = process.env.NEXT_PRIVATE_PAYMASTER_URL;
11+
const paymasterURL = process.env.NEXT_PUBLIC_PAYMASTER_URL;
1212
const isLocalEnv = isLocal();
1313
const defaultUrl = isLocalEnv ? paymasterURL : `${document.location.origin}/api/paymaster-proxy`;
1414

1515
export default function PaymasterBundlerDemo() {
1616
const { address } = useAccount();
17-
const { data: transactionID, writeContracts } = useWriteContracts();
17+
const { data: callID, writeContracts } = useWriteContracts();
1818
const contract = usePaymasterBundlerContract();
1919

2020
if (contract.status !== 'ready') {
@@ -76,12 +76,7 @@ export default function PaymasterBundlerDemo() {
7676
>
7777
Mint NFT
7878
</button>
79-
{transactionID && <CallStatus id={transactionID} />}
80-
{transactionID && (
81-
<div className={clsx('mt-4 overflow-x-auto rounded-lg bg-gray-800 p-4 text-lg')}>
82-
<strong>Transaction ID:</strong> <span className="break-all">{transactionID}</span>
83-
</div>
84-
)}
79+
{callID && <CallStatus id={callID} />}
8580
</section>
8681
</div>
8782
);

template/web/src/utils/paymasterClient.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { paymasterActionsEip7677 } from 'permissionless/experimental';
33
import { createClient, http } from 'viem';
44
import { baseSepolia } from 'viem/chains';
55

6-
const paymasterService = process.env.NEXT_PRIVATE_PAYMASTER_URL ?? '';
6+
const paymasterService = process.env.NEXT_PUBLIC_PAYMASTER_URL ?? '';
77

88
export const paymasterClient = createClient({
99
chain: baseSepolia,

0 commit comments

Comments
 (0)