Skip to content

Commit 6a885e6

Browse files
committed
fix(sdk): remove and prevent console logs
1 parent 708c353 commit 6a885e6

File tree

7 files changed

+12
-34
lines changed

7 files changed

+12
-34
lines changed

packages/thirdweb/biome.json

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,24 @@
55
"rules": {
66
"nursery": {
77
"noProcessEnv": "warn"
8+
},
9+
"suspicious": {
10+
"noConsoleLog": "error"
811
}
912
}
1013
},
11-
"overrides": [{
12-
"include": ["src/**/*.test.ts","src/**/*.test.tsx", "src/stories/**"],
13-
"linter": {
14-
"rules": {
15-
"nursery": {
16-
"noProcessEnv": "off"
14+
"overrides": [
15+
{
16+
"include": ["src/**/*.test.ts", "src/**/*.test.tsx", "src/stories/**"],
17+
"linter": {
18+
"rules": {
19+
"nursery": {
20+
"noProcessEnv": "off"
21+
}
1722
}
1823
}
1924
}
20-
}],
25+
],
2126
"files": {
2227
"ignore": [
2328
"src/crypto/aes/lib/md5.ts",

packages/thirdweb/src/contract/deployment/zksync/zkDeployDeterministic.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,6 @@ export async function zkDeployContractDeterministic(
7979
});
8080
}
8181

82-
console.log(
83-
`deploying contract via create2 factory at: ${predictedAddress}`,
84-
);
85-
8682
// deploy with create2 factory
8783
const factory = getContract({
8884
address: create2FactoryAddress,

packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/BuyScreen.tsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -156,11 +156,9 @@ type BuyScreenContentProps = {
156156
*/
157157
function BuyScreenContent(props: BuyScreenContentProps) {
158158
const { client, supportedDestinations, connectLocale, payOptions } = props;
159-
console.log("BuyScreenContent");
160159

161160
const activeAccount = useActiveAccount();
162161
const { payer, setPayer } = usePayerSetup();
163-
console.log("payer", payer);
164162

165163
const [screen, setScreen] = useState<SelectedScreen>({
166164
id: "main",
@@ -498,8 +496,6 @@ function BuyScreenContent(props: BuyScreenContentProps) {
498496
);
499497
}
500498

501-
console.log("SCREEN", screen.id);
502-
503499
return (
504500
<Container animate="fadein">
505501
<div>

packages/thirdweb/src/storage/upload/mobile.ts

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,7 @@ export async function uploadBatchMobile(
4343
);
4444
}, 30000);
4545

46-
xhr.upload.addEventListener("loadstart", () => {
47-
console.log(`[${Date.now()}] [IPFS] Started`);
48-
});
49-
5046
xhr.upload.addEventListener("progress", (event) => {
51-
console.log(`[IPFS] Progress Event ${event.loaded}/${event.total}`);
52-
5347
clearTimeout(timer);
5448

5549
if (event.loaded < event.total) {
@@ -61,15 +55,10 @@ export async function uploadBatchMobile(
6155
),
6256
);
6357
}, 30000);
64-
} else {
65-
console.log(
66-
`[${Date.now()}] [IPFS] Uploaded files. Waiting for response.`,
67-
);
6858
}
6959
});
7060

7161
xhr.addEventListener("load", () => {
72-
console.log(`[${Date.now()}] [IPFS] Load`);
7362
clearTimeout(timer);
7463

7564
if (xhr.status >= 200 && xhr.status < 300) {
@@ -102,7 +91,6 @@ export async function uploadBatchMobile(
10291
});
10392

10493
xhr.addEventListener("error", () => {
105-
console.log("[IPFS] Load");
10694
clearTimeout(timer);
10795

10896
if (

packages/thirdweb/src/transaction/actions/zksync/send-eip712-transaction.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ describe("sendEip712Transaction", () => {
4949
platformFeeRecipient: TEST_ACCOUNT_A.address, // platformFeeRecipient
5050
},
5151
});
52-
console.log("deployed address", address);
5352
expect(address).toBeDefined();
5453
expect(address.length).toBe(42);
5554
});

packages/thirdweb/src/wallets/smart/smart-wallet-dev.test.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,13 +77,10 @@ describe.runIf(process.env.TW_SECRET_KEY).skip.sequential(
7777
to: smartAccount.address,
7878
value: 0n,
7979
});
80-
81-
console.log("Sending transaction...");
8280
const receipt = await sendTransaction({
8381
transaction: tx,
8482
account: smartAccount,
8583
});
86-
console.log("Transaction sent:", receipt.transactionHash);
8784
expect(receipt.transactionHash).toBeDefined();
8885
});
8986

@@ -127,7 +124,6 @@ describe.runIf(process.env.TW_SECRET_KEY).skip.sequential(
127124
platformFeeRecipient: smartAccount.address, // platformFeeRecipient
128125
},
129126
});
130-
console.log("deployed address", address);
131127
expect(address).toBeDefined();
132128
expect(address.length).toBe(42);
133129
});

packages/thirdweb/src/wallets/smart/smart-wallet-zksync.test.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,6 @@ describe.runIf(process.env.TW_SECRET_KEY).todo(
145145
}),
146146
account: account,
147147
});
148-
console.log(tx.transactionHash);
149148
expect(tx.transactionHash.length).toBe(66);
150149
});
151150

@@ -168,7 +167,6 @@ describe.runIf(process.env.TW_SECRET_KEY).todo(
168167
}),
169168
account: account,
170169
});
171-
console.log(tx.transactionHash);
172170
expect(tx.transactionHash.length).toBe(66);
173171
});
174172
},

0 commit comments

Comments
 (0)