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
5 changes: 5 additions & 0 deletions .changeset/violet-planets-remember.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"thirdweb": patch
---

Force pre-eip1559 tx on Homeverse mainnet/testnet
2 changes: 2 additions & 0 deletions apps/dashboard/src/components/buttons/MismatchButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
9 changes: 8 additions & 1 deletion apps/login/src/api/login/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<LoginConfig> {
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;
}
Expand Down
3 changes: 2 additions & 1 deletion packages/thirdweb/src/auth/verify-hash.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,8 @@ export async function verifyEip1271Signature({
contract,
});
return result === EIP_1271_MAGIC_VALUE;
} catch {
} catch (err) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Enhance error logging to include more details about the verification failure, such as contract address and signature data

Spotted by Graphite Reviewer (based on CI logs)

Is this helpful? React 👍 or 👎 to let us know.

console.error("Error verifying EIP-1271 signature", err);
return false;
}
}
4 changes: 3 additions & 1 deletion packages/thirdweb/src/gas/fee-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
];

/**
Expand Down Expand Up @@ -89,7 +91,7 @@ export async function getGasOverridesForTransaction(
}

// return as is
if (defaultGasOverrides.gasPrice) {
if (defaultGasOverrides.gasPrice !== undefined) {
return defaultGasOverrides;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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", () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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}`,
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replace arbitrary timeout with a proper contract deployment check or increase timeout to 5000ms to ensure contract is fully deployed

Spotted by Graphite Reviewer (based on CI logs)

Is this helpful? React 👍 or 👎 to let us know.


const signature = await smartAccount.signMessage({
message: "hello world",
Expand Down
Loading