Skip to content

Commit 7f87bbc

Browse files
[thirdweb] fix: Force pre-EIP1559 transactions on Homeverse chains
1 parent 1405289 commit 7f87bbc

File tree

6 files changed

+14
-4
lines changed

6 files changed

+14
-4
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"thirdweb": patch
3+
---
4+
5+
Force pre-eip1559 tx on Homeverse mainnet/testnet

apps/dashboard/src/components/buttons/MismatchButton.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ const GAS_FREE_CHAINS = [
6161
300, // zksync sepolia
6262
7225878, // Saakuru Mainnet
6363
247253, // Saakuru Testnet
64+
19011, // Homeverse Mainnet
65+
40875, // Homeverse Testnet
6466
];
6567

6668
function useIsNetworkMismatch(txChainId: number) {

packages/thirdweb/src/auth/verify-hash.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,8 @@ export async function verifyEip1271Signature({
196196
contract,
197197
});
198198
return result === EIP_1271_MAGIC_VALUE;
199-
} catch {
199+
} catch (err) {
200+
console.error("Error verifying EIP-1271 signature", err);
200201
return false;
201202
}
202203
}

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ const FORCE_GAS_PRICE_CHAIN_IDS = [
4040
1942999413, // Humanity Testnet
4141
1952959480, // Lumia Testnet
4242
994873017, // Lumia Mainnet
43+
19011, // Homeverse Mainnet
44+
40875, // Homeverse Testnet
4345
];
4446

4547
/**
@@ -89,7 +91,7 @@ export async function getGasOverridesForTransaction(
8991
}
9092

9193
// return as is
92-
if (defaultGasOverrides.gasPrice) {
94+
if (defaultGasOverrides.gasPrice !== undefined) {
9395
return defaultGasOverrides;
9496
}
9597

packages/thirdweb/src/transaction/actions/estimate-gas-cost.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export async function estimateGasCost(
3838
transaction.chain,
3939
);
4040
const gasPrice = fees.maxFeePerGas || fees.gasPrice;
41-
if (!gasPrice) {
41+
if (gasPrice === undefined) {
4242
throw new Error(
4343
`Unable to determine gas price for chain ${transaction.chain.id}`,
4444
);

packages/thirdweb/src/wallets/smart/smart-wallet-integration-v07.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ describe.runIf(process.env.TW_SECRET_KEY)(
109109
smartAccount,
110110
accountContract,
111111
});
112-
await new Promise((resolve) => setTimeout(resolve, 1000)); // pause for a second to prevent race condition
112+
await new Promise((resolve) => setTimeout(resolve, 3000)); // pause for a second to prevent race condition
113113

114114
const signature = await smartAccount.signMessage({
115115
message: "hello world",

0 commit comments

Comments
 (0)