Skip to content

Commit bcab0b4

Browse files
committed
moved 89/88 override to defaultGasOverride
1 parent 2e19c16 commit bcab0b4

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

packages/thirdweb/src/gas/fee-data.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ const FORCE_GAS_PRICE_CHAIN_IDS = [
4747
2020, // Ronin Mainnet
4848
2021, // Ronin Testnet (Saigon)
4949
98866, // Plume mainnet
50+
89, // Viction Testnet
51+
88, // Viction Mainnet
5052
];
5153

5254
/**
@@ -135,8 +137,16 @@ export async function getDefaultGasOverrides(
135137
resolvedFeeType === "legacy" ||
136138
FORCE_GAS_PRICE_CHAIN_IDS.includes(chain.id)
137139
) {
140+
const gasPrice = await getGasPrice({ chain, client, percentMultiplier: 10 })
141+
if(chain.id === 88 || chain.id === 89) {
142+
return {
143+
maxPriorityFeePerGas: gasPrice || 0n,
144+
maxFeePerGas: gasPrice || 0n
145+
}
146+
}
147+
138148
return {
139-
gasPrice: await getGasPrice({ chain, client, percentMultiplier: 10 }),
149+
gasPrice,
140150
};
141151
}
142152
const feeData = await getDynamicFeeData(client, chain);

packages/thirdweb/src/wallets/smart/lib/userop.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -269,11 +269,6 @@ async function getGasFees(args: {
269269
maxPriorityFeePerGas =
270270
resolvedMaxPriorityFeePerGas ?? feeData.maxPriorityFeePerGas ?? 0n;
271271
maxFeePerGas = resolvedMaxFeePerGas ?? feeData.maxFeePerGas ?? 0n;
272-
273-
if(chain.id === 88 || chain.id === 89) {
274-
maxPriorityFeePerGas = maxPriorityFeePerGas || feeData.gasPrice || 0n
275-
maxFeePerGas = maxFeePerGas || feeData.gasPrice || 0n
276-
}
277272
}
278273
}
279274
return { maxFeePerGas, maxPriorityFeePerGas };

0 commit comments

Comments
 (0)