Skip to content

Commit e650434

Browse files
authored
[SDK] Fix: Chain name label (#7442)
1 parent 6712911 commit e650434

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

packages/thirdweb/src/react/core/hooks/useStepExecutor.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ export function useStepExecutor(
237237
if (tx.action === "approval" || tx.action === "fee") {
238238
// don't poll status for approval transactions, just wait for confirmation
239239
await waitForReceipt(result);
240-
await new Promise((resolve) => setTimeout(resolve, 1000)); // Add an extra second delay for RPC to catch up to new state
240+
await new Promise((resolve) => setTimeout(resolve, 2000)); // Add an extra 2 second delay for RPC to catch up to new state
241241
return;
242242
}
243243

packages/thirdweb/src/react/web/ui/Bridge/payment-details/PaymentDetails.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import { useQuery } from "@tanstack/react-query";
33
import { useMemo } from "react";
44
import { trackPayEvent } from "../../../../../analytics/track/pay.js";
5+
import { defineChain } from "../../../../../chains/utils.js";
56
import type { ThirdwebClient } from "../../../../../client/client.js";
67
import { useCustomTheme } from "../../../../core/design-system/CustomThemeProvider.js";
78
import { radius, spacing } from "../../../../core/design-system/index.js";
@@ -105,7 +106,10 @@ export function PaymentDetails({
105106
});
106107

107108
const chainsQuery = useChainsQuery(
108-
preparedQuote.steps.flatMap((s) => s.transactions.map((t) => t.chain)),
109+
preparedQuote.steps.flatMap((s) => [
110+
defineChain(s.originToken.chainId),
111+
defineChain(s.destinationToken.chainId),
112+
]),
109113
10,
110114
);
111115
const chainsMetadata = useMemo(

0 commit comments

Comments
 (0)