Skip to content

Commit e078db5

Browse files
committed
Updates
Remove console.logs Update Connect Button Styling
1 parent 7ab9e20 commit e078db5

File tree

9 files changed

+25
-238
lines changed

9 files changed

+25
-238
lines changed

apps/playground-web/src/app/api/airdrop/route.ts

Lines changed: 0 additions & 155 deletions
This file was deleted.

apps/playground-web/src/app/api/claimTo/route.ts

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,6 @@ dotenv.config();
88
const BASESEP_CHAIN_ID = "84532";
99
const BACKEND_WALLET_ADDRESS = process.env.ENGINE_BACKEND_WALLET as string;
1010

11-
console.log("Environment Variables:");
12-
console.log("CHAIN_ID:", BASESEP_CHAIN_ID);
13-
console.log("BACKEND_WALLET_ADDRESS:", BACKEND_WALLET_ADDRESS);
14-
console.log("ENGINE_URL:", process.env.ENGINE_URL);
15-
console.log(
16-
"ACCESS_TOKEN:",
17-
process.env.ENGINE_ACCESS_TOKEN ? "Set" : "Not Set",
18-
);
19-
2011
const engine = new Engine({
2112
url: process.env.ENGINE_URL as string,
2213
accessToken: process.env.ENGINE_ACCESS_TOKEN as string,
@@ -138,15 +129,13 @@ function startPolling(queueId: string) {
138129
if (Date.now() - startTime > maxPollingTime) {
139130
clearInterval(pollingInterval);
140131
pollingProcesses.delete(queueId);
141-
console.log(`Polling timeout for queue ID: ${queueId}`);
142132
return;
143133
}
144134

145135
const result = await pollToMine(queueId);
146136
if (result.status === "Mined" || result.status === "error") {
147137
clearInterval(pollingInterval);
148138
pollingProcesses.delete(queueId);
149-
console.log("Final result:", result);
150139
}
151140
} catch (error) {
152141
console.error("Error in polling process:", error);
@@ -159,28 +148,19 @@ function startPolling(queueId: string) {
159148
}
160149

161150
async function pollToMine(queueId: string): Promise<ClaimResult> {
162-
console.log(`Polling for queue ID: ${queueId}`);
163151
const status = await engine.transaction.status(queueId);
164-
console.log(`Current status: ${status.result.status}`);
165152

166153
switch (status.result.status) {
167154
case "queued":
168-
console.log("Transaction is queued");
169155
return { queueId, status: "Queued" };
170156
case "sent":
171-
console.log("Transaction is submitted to the network");
172157
return { queueId, status: "Sent" };
173158
case "mined": {
174-
console.log(
175-
"Transaction mined! 🥳 ERC721 token has been claimed",
176-
queueId,
177-
);
178159
const transactionHash = status.result.transactionHash;
179160
const blockExplorerUrl =
180161
status.result.chainId === BASESEP_CHAIN_ID
181162
? `https://base-sepolia.blockscout.com/tx/${transactionHash}`
182163
: "";
183-
console.log("View transaction on the blockexplorer:", blockExplorerUrl);
184164
return {
185165
queueId,
186166
status: "Mined",

apps/playground-web/src/app/api/erc20BatchMintTo/route.ts

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,8 @@ import type { Address } from "thirdweb";
66

77
dotenv.config();
88

9-
const BASESEP_CHAIN_ID = "84532";
109
const BACKEND_WALLET_ADDRESS = process.env.ENGINE_BACKEND_WALLET as string;
1110

12-
console.log("Environment Variables:");
13-
console.log("CHAIN_ID:", BASESEP_CHAIN_ID);
14-
console.log("BACKEND_WALLET_ADDRESS:", BACKEND_WALLET_ADDRESS);
15-
console.log("ENGINE_URL:", process.env.ENGINE_URL);
16-
console.log(
17-
"ACCESS_TOKEN:",
18-
process.env.ENGINE_ACCESS_TOKEN ? "Set" : "Not Set",
19-
);
20-
2111
const engine = new Engine({
2212
url: process.env.ENGINE_URL as string,
2313
accessToken: process.env.ENGINE_ACCESS_TOKEN as string,
@@ -39,12 +29,6 @@ export async function POST(req: NextRequest) {
3929
try {
4030
const { data, contractAddress } = await req.json();
4131

42-
console.log("Received request with:", {
43-
contractAddress,
44-
dataLength: data.length,
45-
sampleData: data[0],
46-
});
47-
4832
const receivers: Receiver[] = data.map((entry: DataEntry) => ({
4933
toAddress: entry.toAddress as Address,
5034
amount: entry.amount,
@@ -75,7 +59,7 @@ export async function POST(req: NextRequest) {
7559
amounts: firstChunk.map((r) => r.amount),
7660
timestamp: Date.now(),
7761
chainId: Number.parseInt(chain),
78-
network: "Base Sep" as const,
62+
network: "Base Sepolia" as const,
7963
};
8064

8165
// Start polling in the background

apps/playground-web/src/app/api/mintTo/route.ts

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,6 @@ const CHAIN_ID = "84532";
88
const CONTRACT_ADDRESS = "0x8CD193648f5D4E8CD9fD0f8d3865052790A680f6";
99
const BACKEND_WALLET_ADDRESS = process.env.ENGINE_BACKEND_WALLET as string;
1010

11-
// Add logging for environment variables
12-
console.log("Environment Variables:");
13-
console.log("CHAIN_ID:", CHAIN_ID);
14-
console.log("BACKEND_WALLET_ADDRESS:", BACKEND_WALLET_ADDRESS);
15-
console.log("CONTRACT_ADDRESS:", CONTRACT_ADDRESS);
16-
console.log("ENGINE_URL:", process.env.ENGINE_URL);
17-
console.log(
18-
"ACCESS_TOKEN:",
19-
process.env.ENGINE_ACCESS_TOKEN ? "Set" : "Not Set",
20-
);
21-
2211
const engine = new Engine({
2312
url: process.env.ENGINE_URL as string,
2413
accessToken: process.env.ENGINE_ACCESS_TOKEN as string,
@@ -27,7 +16,6 @@ const engine = new Engine({
2716
export async function POST(req: NextRequest) {
2817
try {
2918
const body = await req.json();
30-
console.log("Request body:", body);
3119

3220
const receiver = body.receiver || body.toAddress;
3321
const metadataWithSupply = body.metadataWithSupply;
@@ -39,12 +27,6 @@ export async function POST(req: NextRequest) {
3927
);
4028
}
4129

42-
console.log(
43-
`Attempting to mint for receiver: ${receiver}, metadataWithSupply:`,
44-
metadataWithSupply,
45-
);
46-
console.log("Using CONTRACT_ADDRESS:", CONTRACT_ADDRESS);
47-
4830
const res = await engine.erc1155.mintTo(
4931
CHAIN_ID,
5032
CONTRACT_ADDRESS,
@@ -63,7 +45,7 @@ export async function POST(req: NextRequest) {
6345
amount: metadataWithSupply.supply || "1",
6446
timestamp: Date.now(),
6547
chainId: Number.parseInt(CHAIN_ID),
66-
network: "Base Sep" as const,
48+
network: "Base Sepolia" as const,
6749
};
6850

6951
// Start polling in the background

apps/playground-web/src/app/navLinks.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -89,14 +89,6 @@ export const navLinks: SidebarLink[] = [
8989
name: "Webhooks",
9090
href: "/engine/webhooks",
9191
},
92-
// {
93-
// name: "Session Keys",
94-
// href: "/engine/account-abstraction/session-keys",
95-
// },
96-
// {
97-
// name: "Smart Backend Wallets",
98-
// href: "/engine/account-abstraction/smart-backend-wallets",
99-
// },
10092
],
10193
},
10294
{

apps/playground-web/src/components/engine/airdrop/TransactionResults.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ interface ClaimTransactionResults {
2929
amount: string;
3030
timestamp?: number;
3131
chainId: number;
32-
network: "Ethereum" | "Base Sep" | "OP Sep";
32+
network: "Ethereum" | "Base Sepolia" | "OP Sepolia";
3333
}
3434

3535
interface ClaimTransactionResultsProps {
@@ -66,7 +66,7 @@ export function ClaimTransactionResults({
6666
amount: "0.5",
6767
timestamp: Date.now() - 30 * 60 * 1000,
6868
chainId: 1,
69-
network: "Base Sep",
69+
network: "Base Sepolia",
7070
errorMessage: undefined,
7171
};
7272

@@ -159,14 +159,14 @@ export function ClaimTransactionResults({
159159
</TableCell>
160160
<TableCell>
161161
<span className="flex items-center gap-2">
162-
{result.network === "Base Sep" && (
162+
{result.network === "Base Sepolia" && (
163163
<img
164164
src="/BaseSep.png"
165165
alt="Base"
166166
className="h-4 w-4"
167167
/>
168168
)}
169-
{result.network === "OP Sep" && (
169+
{result.network === "OP Sepolia" && (
170170
<img
171171
src="/OP.png"
172172
alt="Optimism Sep"
@@ -193,9 +193,9 @@ export function ClaimTransactionResults({
193193
// Keeping OP here for consistency. Will be adding a component for Optimism soon.
194194
const getExplorerUrl = () => {
195195
switch (result.network) {
196-
case "Base Sep":
196+
case "Base Sepolia":
197197
return `https://base-sepolia.blockscout.com/address/${result.toAddress}?tab=tokens`;
198-
case "OP Sep":
198+
case "OP Sepolia":
199199
return `https://optimism-sepolia.blockscout.com/address/${result.toAddress}?tab=tokens`;
200200
case "Ethereum":
201201
return `https://etherscan.io/address/${result.toAddress}?tab=tokens`;

apps/playground-web/src/components/engine/airdrop/airdrop-erc20.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ interface ClaimTransactionResults {
2323
amount: string;
2424
timestamp?: number;
2525
chainId: number;
26-
network: "Ethereum" | "Base Sep" | "OP Sep";
26+
network: "Ethereum" | "Base Sepolia" | "OP Sepolia";
2727
}
2828

2929
interface CsvRow {
@@ -38,7 +38,7 @@ interface BatchResult {
3838
status: "Queued" | "Sent" | "Mined" | "error";
3939
timestamp: number;
4040
chainId: number;
41-
network: "Ethereum" | "Base Sep" | "OP Sep";
41+
network: "Ethereum" | "Base Sepolia" | "OP Sepolia";
4242
}
4343

4444
// Setting dummy addresses so no one gets spammed.
@@ -157,7 +157,7 @@ export function AirdropERC20() {
157157
toAddress: "",
158158
amount: "",
159159
chainId: 84532,
160-
network: "Base Sep",
160+
network: "Base Sepolia",
161161
},
162162
]);
163163
} finally {

0 commit comments

Comments
 (0)