Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 27 additions & 7 deletions packages/thirdweb/biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,39 @@
"rules": {
"nursery": {
"noProcessEnv": "warn"
},
"suspicious": {
"noConsole": {
"level": "error",
"options": {
"allow": ["error", "warn"]
}
}
}
}
},
"overrides": [{
"include": ["src/**/*.test.ts","src/**/*.test.tsx", "src/stories/**"],
"linter": {
"rules": {
"nursery": {
"noProcessEnv": "off"
"overrides": [
{
"include": ["src/**/*.test.ts", "src/**/*.test.tsx", "src/stories/**"],
"linter": {
"rules": {
"nursery": {
"noProcessEnv": "off"
}
}
}
},
{
"include": ["src/cli/bin.ts", "src/cli/commands/**"],
"linter": {
"rules": {
"suspicious": {
"noConsole": "off"
}
}
}
}
}],
],
"files": {
"ignore": [
"src/crypto/aes/lib/md5.ts",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,6 @@ export async function zkDeployContractDeterministic(
});
}

console.log(
`deploying contract via create2 factory at: ${predictedAddress}`,
);

// deploy with create2 factory
const factory = getContract({
address: create2FactoryAddress,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,11 +156,9 @@ type BuyScreenContentProps = {
*/
function BuyScreenContent(props: BuyScreenContentProps) {
const { client, supportedDestinations, connectLocale, payOptions } = props;
console.log("BuyScreenContent");

const activeAccount = useActiveAccount();
const { payer, setPayer } = usePayerSetup();
console.log("payer", payer);

const [screen, setScreen] = useState<SelectedScreen>({
id: "main",
Expand Down Expand Up @@ -498,8 +496,6 @@ function BuyScreenContent(props: BuyScreenContentProps) {
);
}

console.log("SCREEN", screen.id);

return (
<Container animate="fadein">
<div>
Expand Down
12 changes: 0 additions & 12 deletions packages/thirdweb/src/storage/upload/mobile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,7 @@ export async function uploadBatchMobile(
);
}, 30000);

xhr.upload.addEventListener("loadstart", () => {
console.log(`[${Date.now()}] [IPFS] Started`);
});

xhr.upload.addEventListener("progress", (event) => {
console.log(`[IPFS] Progress Event ${event.loaded}/${event.total}`);

clearTimeout(timer);

if (event.loaded < event.total) {
Expand All @@ -61,15 +55,10 @@ export async function uploadBatchMobile(
),
);
}, 30000);
} else {
console.log(
`[${Date.now()}] [IPFS] Uploaded files. Waiting for response.`,
);
}
});

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

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

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

if (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ describe("sendEip712Transaction", () => {
platformFeeRecipient: TEST_ACCOUNT_A.address, // platformFeeRecipient
},
});
console.log("deployed address", address);
expect(address).toBeDefined();
expect(address.length).toBe(42);
});
Expand Down
9 changes: 0 additions & 9 deletions packages/thirdweb/src/wallets/smart/lib/bundler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import {
formatUserOperationReceipt,
} from "../types.js";
import {
DEBUG,
ENTRYPOINT_ADDRESS_v0_6,
MANAGED_ACCOUNT_GAS_BUFFER,
getDefaultBundlerUrl,
Expand Down Expand Up @@ -267,10 +266,6 @@ async function sendBundlerRequest(args: {
}) {
const { options, operation, params } = args;

if (DEBUG) {
console.debug(`>>> sending ${operation} with payload:`, params);
}

const bundlerUrl = options.bundlerUrl ?? getDefaultBundlerUrl(options.chain);
const fetchWithHeaders = getClientFetch(options.client);
const response = await fetchWithHeaders(bundlerUrl, {
Expand Down Expand Up @@ -301,9 +296,5 @@ Code: ${code}`,
);
}

if (DEBUG) {
console.debug(`<<< ${operation} result:`, res);
}

return res.result;
}
3 changes: 0 additions & 3 deletions packages/thirdweb/src/wallets/smart/lib/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ import type { Chain } from "../../../chains/types.js";
import { getAddress } from "../../../utils/address.js";
import { getThirdwebDomains } from "../../../utils/domains.js";

// dev only
export const DEBUG = false;

export const DUMMY_SIGNATURE =
"0xfffffffffffffffffffffffffffffff0000000000000000000000000000000007aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1c";

Expand Down
10 changes: 1 addition & 9 deletions packages/thirdweb/src/wallets/smart/lib/paymaster.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,7 @@ import type {
UserOperationV06,
UserOperationV07,
} from "../types.js";
import {
DEBUG,
ENTRYPOINT_ADDRESS_v0_6,
getDefaultBundlerUrl,
} from "./constants.js";
import { ENTRYPOINT_ADDRESS_v0_6, getDefaultBundlerUrl } from "./constants.js";
import { hexlifyUserOp } from "./utils.js";

/**
Expand Down Expand Up @@ -80,10 +76,6 @@ Code: ${code}`,
);
}

if (DEBUG) {
console.debug("Paymaster result:", res);
}

if (res.result) {
// some paymasters return a string, some return an object with more data
if (typeof res.result === "string") {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,10 @@ describe.runIf(process.env.TW_SECRET_KEY).skip.sequential(
to: smartAccount.address,
value: 0n,
});

console.log("Sending transaction...");
const receipt = await sendTransaction({
transaction: tx,
account: smartAccount,
});
console.log("Transaction sent:", receipt.transactionHash);
expect(receipt.transactionHash).toBeDefined();
});

Expand Down Expand Up @@ -127,7 +124,6 @@ describe.runIf(process.env.TW_SECRET_KEY).skip.sequential(
platformFeeRecipient: smartAccount.address, // platformFeeRecipient
},
});
console.log("deployed address", address);
expect(address).toBeDefined();
expect(address.length).toBe(42);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,6 @@ describe.runIf(process.env.TW_SECRET_KEY).todo(
}),
account: account,
});
console.log(tx.transactionHash);
expect(tx.transactionHash.length).toBe(66);
});

Expand All @@ -168,7 +167,6 @@ describe.runIf(process.env.TW_SECRET_KEY).todo(
}),
account: account,
});
console.log(tx.transactionHash);
expect(tx.transactionHash.length).toBe(66);
});
},
Expand Down
Loading