Skip to content

Commit ca34569

Browse files
committed
remove logs
1 parent 5b3da66 commit ca34569

4 files changed

Lines changed: 7 additions & 12 deletions

File tree

packages/entrykit/src/actions/cachedFeesPerGas.ts

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,23 @@ import { Client, EstimateFeesPerGasReturnType } from "viem";
22
import { estimateFeesPerGas } from "viem/actions";
33

44
type CachedFeesPerGasOptions = {
5-
updateInterval?: number;
5+
refreshInterval?: number;
66
};
77

88
export function cachedFeesPerGas(
99
client: Client,
10-
options: CachedFeesPerGasOptions = { updateInterval: 30_000 },
10+
options: CachedFeesPerGasOptions = { refreshInterval: 10_000 },
1111
): () => Promise<EstimateFeesPerGasReturnType<"eip1559">> {
1212
let fees: EstimateFeesPerGasReturnType<"eip1559"> | null = null;
1313

14-
async function updateFees() {
15-
console.log("updating fees");
14+
async function refreshFees() {
1615
fees = await estimateFeesPerGas(client);
1716
}
1817

19-
updateFees();
20-
setInterval(updateFees, options.updateInterval);
18+
refreshFees();
19+
setInterval(refreshFees, options.refreshInterval);
2120

2221
return async () => {
23-
console.log("asking for fees");
2422
if (fees) return fees;
2523
fees = await estimateFeesPerGas(client);
2624
return fees;

packages/entrykit/src/utils/withFeeCache.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,10 @@ import { Chain, createClient, http } from "viem";
22
import { cachedFeesPerGas } from "../actions/cachedFeesPerGas";
33

44
type WithFeeCacheOptions = {
5-
updateInterval?: number;
5+
refreshInterval?: number;
66
};
77

8-
export function withFeeCache(chain: Chain, options: WithFeeCacheOptions = { updateInterval: 10_000 }): Chain {
9-
console.log("withFeeCache", chain);
8+
export function withFeeCache(chain: Chain, options: WithFeeCacheOptions = { refreshInterval: 10_000 }): Chain {
109
if (chain.fees?.estimateFeesPerGas) {
1110
throw new Error("withFeeCache: estimateFeesPerGas already defined in chain config");
1211
}

packages/world/ts/actions/callFrom.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ export function callFrom(
3939
) => Pick<WalletActions<chain, account>, "writeContract"> {
4040
return (client) => ({
4141
async writeContract(writeArgs) {
42-
console.log("writeContract", writeArgs);
4342
const _writeContract = getAction(client, viem_writeContract, "writeContract");
4443

4544
// Skip if the contract isn't the World or the function called should not be redirected through `callFrom`.

packages/world/ts/actions/sendUserOperationFrom.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ export function sendUserOperationFrom(
4040
) => Pick<BundlerActions<account>, "sendUserOperation"> {
4141
return (client) => ({
4242
async sendUserOperation(args) {
43-
console.log("sendUserOperation", args);
4443
const _sendUserOperation = getAction(client, viem_sendUserOperation, "sendUserOperation");
4544

4645
if (args.callData) {

0 commit comments

Comments
 (0)