diff --git a/.changeset/violet-planets-remember.md b/.changeset/violet-planets-remember.md new file mode 100644 index 00000000000..23679b6574d --- /dev/null +++ b/.changeset/violet-planets-remember.md @@ -0,0 +1,5 @@ +--- +"thirdweb": patch +--- + +Force pre-eip1559 tx on Homeverse mainnet/testnet diff --git a/apps/dashboard/src/components/buttons/MismatchButton.tsx b/apps/dashboard/src/components/buttons/MismatchButton.tsx index 53b0f6321d9..e4beb8202f9 100644 --- a/apps/dashboard/src/components/buttons/MismatchButton.tsx +++ b/apps/dashboard/src/components/buttons/MismatchButton.tsx @@ -61,6 +61,8 @@ const GAS_FREE_CHAINS = [ 300, // zksync sepolia 7225878, // Saakuru Mainnet 247253, // Saakuru Testnet + 19011, // Homeverse Mainnet + 40875, // Homeverse Testnet ]; function useIsNetworkMismatch(txChainId: number) { diff --git a/apps/login/src/api/login/config.ts b/apps/login/src/api/login/config.ts index 9f8744985e1..4aa10be7f2c 100644 --- a/apps/login/src/api/login/config.ts +++ b/apps/login/src/api/login/config.ts @@ -2,10 +2,17 @@ import "server-only"; import type { InAppWalletAuth } from "thirdweb/wallets"; import type { Permission } from "../../components/permission-card"; -export async function getLoginConfig(clientId: string) { +export async function getLoginConfig(clientId: string): Promise { if (clientId === "demo") { return DEMO_ENVIRONMENT; } + // temporary manual config + if (clientId === "b24106adfb2ec212e6ec4d3b2e04db9e") { + return { + ...DEFAULT_CONFIG, + sessionKeySignerAddress: "0xb89e32a18350d6df5bf0b89a227E098013C4Fa72", + }; + } // TODO: implement fetch for config from API server return DEFAULT_CONFIG; } diff --git a/packages/thirdweb/src/auth/verify-hash.ts b/packages/thirdweb/src/auth/verify-hash.ts index 3093161341b..3163d2c518a 100644 --- a/packages/thirdweb/src/auth/verify-hash.ts +++ b/packages/thirdweb/src/auth/verify-hash.ts @@ -196,7 +196,8 @@ export async function verifyEip1271Signature({ contract, }); return result === EIP_1271_MAGIC_VALUE; - } catch { + } catch (err) { + console.error("Error verifying EIP-1271 signature", err); return false; } } diff --git a/packages/thirdweb/src/gas/fee-data.ts b/packages/thirdweb/src/gas/fee-data.ts index ee0357015d4..3e38d35a59c 100644 --- a/packages/thirdweb/src/gas/fee-data.ts +++ b/packages/thirdweb/src/gas/fee-data.ts @@ -40,6 +40,8 @@ const FORCE_GAS_PRICE_CHAIN_IDS = [ 1942999413, // Humanity Testnet 1952959480, // Lumia Testnet 994873017, // Lumia Mainnet + 19011, // Homeverse Mainnet + 40875, // Homeverse Testnet ]; /** @@ -89,7 +91,7 @@ export async function getGasOverridesForTransaction( } // return as is - if (defaultGasOverrides.gasPrice) { + if (defaultGasOverrides.gasPrice !== undefined) { return defaultGasOverrides; } diff --git a/packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/fiat/currencies.test.tsx b/packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/fiat/currencies.test.tsx index eadc9fbd0f9..635408855c7 100644 --- a/packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/fiat/currencies.test.tsx +++ b/packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/fiat/currencies.test.tsx @@ -8,7 +8,7 @@ import { currencies, getCurrencyMeta, usdCurrency } from "./currencies.js"; describe("Currency Utilities", () => { it("should have correct number of currencies", () => { - expect(currencies.length).toBe(5); + expect(currencies.length).toBe(7); }); it("should have USD as the first currency", () => { diff --git a/packages/thirdweb/src/transaction/actions/estimate-gas-cost.ts b/packages/thirdweb/src/transaction/actions/estimate-gas-cost.ts index dcbbddb10f9..235695efa2a 100644 --- a/packages/thirdweb/src/transaction/actions/estimate-gas-cost.ts +++ b/packages/thirdweb/src/transaction/actions/estimate-gas-cost.ts @@ -38,7 +38,7 @@ export async function estimateGasCost( transaction.chain, ); const gasPrice = fees.maxFeePerGas || fees.gasPrice; - if (!gasPrice) { + if (gasPrice === undefined) { throw new Error( `Unable to determine gas price for chain ${transaction.chain.id}`, ); diff --git a/packages/thirdweb/src/wallets/smart/smart-wallet-integration-v07.test.ts b/packages/thirdweb/src/wallets/smart/smart-wallet-integration-v07.test.ts index 10a773ca52c..67047caa9c8 100644 --- a/packages/thirdweb/src/wallets/smart/smart-wallet-integration-v07.test.ts +++ b/packages/thirdweb/src/wallets/smart/smart-wallet-integration-v07.test.ts @@ -109,7 +109,7 @@ describe.runIf(process.env.TW_SECRET_KEY)( smartAccount, accountContract, }); - await new Promise((resolve) => setTimeout(resolve, 1000)); // pause for a second to prevent race condition + await new Promise((resolve) => setTimeout(resolve, 3000)); // pause for a second to prevent race condition const signature = await smartAccount.signMessage({ message: "hello world",