Skip to content

Commit 919531b

Browse files
committed
lint
1 parent 271840e commit 919531b

25 files changed

+98
-242
lines changed

apps/playground-web/src/app/connect/pay/embed/LeftSection.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ import {
1313
import Link from "next/link";
1414
import type React from "react";
1515
import { useState } from "react";
16+
import { type Address, isAddress } from "thirdweb";
1617
import { defineChain } from "thirdweb/chains";
1718
import { cn } from "../../../../lib/utils";
1819
import { CollapsibleSection } from "../../sign-in/components/CollapsibleSection";
1920
import { ColorFormGroup } from "../../sign-in/components/ColorFormGroup";
2021
import type { BridgeComponentsPlaygroundOptions } from "../components/types";
21-
import { Address, isAddress } from "thirdweb";
2222

2323
export function LeftSection(props: {
2424
options: BridgeComponentsPlaygroundOptions;

apps/playground-web/src/app/connect/pay/embed/RightSection.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
"use client";
2+
import { useQuery } from "@tanstack/react-query";
23
import { usePathname } from "next/navigation";
34
import { useState } from "react";
45
import { getContract, toUnits } from "thirdweb";
56
import { base } from "thirdweb/chains";
7+
import { getCurrencyMetadata } from "thirdweb/extensions/erc20";
68
import { claimTo } from "thirdweb/extensions/erc1155";
79
import {
810
BuyWidget,
@@ -17,8 +19,6 @@ import { THIRDWEB_CLIENT } from "../../../../lib/client";
1719
import { cn } from "../../../../lib/utils";
1820
import { CodeGen } from "../components/CodeGen";
1921
import type { BridgeComponentsPlaygroundOptions } from "../components/types";
20-
import { useQuery } from "@tanstack/react-query";
21-
import { getCurrencyMetadata } from "thirdweb/extensions/erc20";
2222

2323
const nftContract = getContract({
2424
address: "0xf0d0CBf84005Dd4eC81364D1f5D7d896Bd53D1B8",
@@ -59,11 +59,11 @@ export function RightSection(props: {
5959
const themeObj =
6060
props.options.theme.type === "dark"
6161
? darkTheme({
62-
colors: props.options.theme.darkColorOverrides,
63-
})
62+
colors: props.options.theme.darkColorOverrides,
63+
})
6464
: lightTheme({
65-
colors: props.options.theme.lightColorOverrides,
66-
});
65+
colors: props.options.theme.lightColorOverrides,
66+
});
6767

6868
let embed: React.ReactNode;
6969
if (props.options.payOptions.widget === "buy") {

apps/playground-web/src/app/connect/pay/embed/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
import { use, useState } from "react";
33
import { NATIVE_TOKEN_ADDRESS } from "thirdweb";
44
import { arbitrum } from "thirdweb/chains";
5+
import { checksumAddress } from "thirdweb/utils";
56
import type { BridgeComponentsPlaygroundOptions } from "../components/types";
67
import { LeftSection } from "./LeftSection";
78
import { RightSection } from "./RightSection";
8-
import { checksumAddress } from "thirdweb/utils";
99

1010
// NOTE: Only set the values that are actually the default values used by PayEmbed component
1111
const defaultConnectOptions: BridgeComponentsPlaygroundOptions = {

apps/playground-web/src/components/pay/direct-payment.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
"use client";
2-
import { CheckoutWidget } from "thirdweb/react";
3-
import { THIRDWEB_CLIENT } from "../../lib/client";
42
import { toUnits } from "thirdweb";
53
import { base } from "thirdweb/chains";
4+
import { CheckoutWidget } from "thirdweb/react";
5+
import { THIRDWEB_CLIENT } from "../../lib/client";
66

77
export function BuyMerchPreview() {
88
return (

apps/playground-web/src/components/pay/embed.tsx

Lines changed: 0 additions & 40 deletions
This file was deleted.

apps/playground-web/src/components/pay/transaction-button.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ import { base, baseSepolia, polygon } from "thirdweb/chains";
66
import { transfer } from "thirdweb/extensions/erc20";
77
import { claimTo, getNFT } from "thirdweb/extensions/erc1155";
88
import {
9-
TransactionWidget,
109
TransactionButton,
10+
TransactionWidget,
1111
getDefaultToken,
1212
useActiveAccount,
1313
useReadContract,

packages/thirdweb/src/react/core/hooks/pay/useBuyWithFiatQuotesForProviders.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { toUnits } from "../../../../utils/units.js";
88
/**
99
* @internal
1010
*/
11-
export type UseBuyWithFiatQuotesForProvidersParams = {
11+
type UseBuyWithFiatQuotesForProvidersParams = {
1212
/**
1313
* A client is the entry point to the thirdweb SDK.
1414
*/
@@ -38,15 +38,15 @@ export type UseBuyWithFiatQuotesForProvidersParams = {
3838
/**
3939
* @internal
4040
*/
41-
export type OnrampQuoteQueryOptions = Omit<
41+
type OnrampQuoteQueryOptions = Omit<
4242
UseQueryOptions<Awaited<ReturnType<typeof prepareOnramp>>>,
4343
"queryFn" | "queryKey" | "enabled"
4444
>;
4545

4646
/**
4747
* @internal
4848
*/
49-
export type UseBuyWithFiatQuotesForProvidersResult = {
49+
type UseBuyWithFiatQuotesForProvidersResult = {
5050
data: Awaited<ReturnType<typeof prepareOnramp>> | undefined;
5151
isLoading: boolean;
5252
error: Error | null;

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { isRetryable, mapBridgeError } from "../errors/mapBridgeError.js";
44
/**
55
* Parameters for the useBridgeError hook
66
*/
7-
export interface UseBridgeErrorParams {
7+
interface UseBridgeErrorParams {
88
/**
99
* The error to process. Can be an ApiError or generic Error.
1010
*/
@@ -14,7 +14,7 @@ export interface UseBridgeErrorParams {
1414
/**
1515
* Result returned by the useBridgeError hook
1616
*/
17-
export interface UseBridgeErrorResult {
17+
interface UseBridgeErrorResult {
1818
/**
1919
* The mapped/normalized error, null if no error provided
2020
*/

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

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,14 @@ import type { Token } from "../../../bridge/types/Token.js";
66
import type { ThirdwebClient } from "../../../client/client.js";
77
import { checksumAddress } from "../../../utils/address.js";
88

9-
export interface UseBridgeQuoteParams {
9+
interface UseBridgeQuoteParams {
1010
originToken: Token;
1111
destinationToken: Token;
1212
destinationAmount: bigint;
1313
client: ThirdwebClient;
1414
enabled?: boolean;
1515
}
1616

17-
export type BridgeQuoteResult = NonNullable<
18-
ReturnType<typeof useBridgeQuote>["data"]
19-
>;
20-
2117
export function useBridgeQuote({
2218
originToken,
2319
destinationToken,

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export interface StepExecutorOptions {
5252
/**
5353
* Internal flattened transaction type
5454
*/
55-
export interface FlattenedTx extends RouteTransaction {
55+
interface FlattenedTx extends RouteTransaction {
5656
/** Index in flat array */
5757
_index: number;
5858
/** Parent step index */
@@ -62,7 +62,7 @@ export interface FlattenedTx extends RouteTransaction {
6262
/**
6363
* Public return type of useStepExecutor
6464
*/
65-
export interface StepExecutorResult {
65+
interface StepExecutorResult {
6666
currentStep?: RouteStep;
6767
currentTxIndex?: number;
6868
progress: number; // 0–100

0 commit comments

Comments
 (0)