Skip to content

Commit a3a9e63

Browse files
committed
lint
1 parent da3e776 commit a3a9e63

File tree

6 files changed

+42
-33
lines changed

6 files changed

+42
-33
lines changed

apps/playground-web/src/components/auth/auth-button.tsx

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,25 @@ import {
88
} from "@/app/connect/auth/server/actions/auth";
99
import { THIRDWEB_CLIENT } from "@/lib/client";
1010
import { ConnectButton } from "thirdweb/react";
11+
import { createWallet, inAppWallet } from "thirdweb/wallets";
1112

1213
export function AuthButton() {
1314
return (
1415
<ConnectButton
1516
client={THIRDWEB_CLIENT}
17+
wallets={[
18+
inAppWallet({
19+
auth: {
20+
options: ["google", "telegram", "github"],
21+
mode: "redirect",
22+
},
23+
}),
24+
createWallet("io.metamask"),
25+
createWallet("com.coinbase.wallet"),
26+
createWallet("me.rainbow"),
27+
createWallet("io.rabby"),
28+
createWallet("io.zerion.wallet"),
29+
]}
1630
auth={{
1731
isLoggedIn: (address) => isLoggedIn(address),
1832
doLogin: (params) => login(params),

packages/thirdweb/src/react/core/hooks/connection/ConnectEmbedProps.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -289,11 +289,6 @@ export type ConnectEmbedProps = {
289289
*/
290290
auth?: SiweAuthOptions;
291291

292-
/**
293-
* @hidden
294-
*/
295-
siweLogin?: () => Promise<void>;
296-
297292
/**
298293
* Customize the welcome screen. This prop is only applicable when modalSize prop is set to "wide". On "wide" Modal size, a welcome screen is shown on the right side of the modal.
299294
*

packages/thirdweb/src/react/native/ui/connect/ConnectButton.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,9 @@ export function ConnectButton(props: ConnectButtonProps) {
122122
) : (
123123
<ThemedButton theme={theme} onPress={() => openModal()}>
124124
{status === "connecting" ||
125-
siweAuth.isLoggingIn ||
126-
siweAuth.isLoading ||
127-
siweAuth.isLoggingOut ? (
125+
siweAuth.isLoggingIn ||
126+
siweAuth.isLoading ||
127+
siweAuth.isLoggingOut ? (
128128
<>
129129
<ThemedSpinner color={theme.colors.primaryButtonText} />
130130
</>

packages/thirdweb/src/react/web/ui/ConnectWallet/Modal/ConnectEmbed.tsx

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ import {
1111
} from "../../../../core/design-system/CustomThemeProvider.js";
1212
import { radius } from "../../../../core/design-system/index.js";
1313
import {
14-
useSiweAuth,
1514
type SiweAuthOptions,
15+
useSiweAuth,
1616
} from "../../../../core/hooks/auth/useSiweAuth.js";
1717
import type { ConnectEmbedProps } from "../../../../core/hooks/connection/ConnectEmbedProps.js";
1818
import { useActiveAccount } from "../../../../core/hooks/wallets/useActiveAccount.js";
@@ -327,21 +327,21 @@ const ConnectEmbedContent = (props: {
327327
};
328328
size: "compact" | "wide";
329329
header:
330-
| {
331-
title?: string;
332-
titleIcon?: string;
333-
}
334-
| true
335-
| undefined;
330+
| {
331+
title?: string;
332+
titleIcon?: string;
333+
}
334+
| true
335+
| undefined;
336336
localeId: LocaleId;
337337
onConnect: ((wallet: Wallet) => void) | undefined;
338338
recommendedWallets: Wallet[] | undefined;
339339
showAllWallets: boolean | undefined;
340340
walletConnect:
341-
| {
342-
projectId?: string;
343-
}
344-
| undefined;
341+
| {
342+
projectId?: string;
343+
}
344+
| undefined;
345345
wallets: Wallet[];
346346
welcomeScreen: WelcomeScreen | undefined;
347347
}) => {

packages/thirdweb/src/react/web/ui/PayEmbed.tsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,25 +10,25 @@ import type { WalletId } from "../../../wallets/wallet-types.js";
1010
import { CustomThemeProvider } from "../../core/design-system/CustomThemeProvider.js";
1111
import type { Theme } from "../../core/design-system/index.js";
1212
import {
13-
useSiweAuth,
1413
type SiweAuthOptions,
14+
useSiweAuth,
1515
} from "../../core/hooks/auth/useSiweAuth.js";
1616
import type {
1717
ConnectButton_connectModalOptions,
1818
PayUIOptions,
1919
} from "../../core/hooks/connection/ConnectButtonProps.js";
20+
import { useActiveAccount } from "../../core/hooks/wallets/useActiveAccount.js";
21+
import { useActiveWallet } from "../../core/hooks/wallets/useActiveWallet.js";
2022
import { useConnectionManager } from "../../core/providers/connection-manager.js";
2123
import type { SupportedTokens } from "../../core/utils/defaultTokens.js";
24+
import { AutoConnect } from "../../web/ui/AutoConnect/AutoConnect.js";
2225
import { EmbedContainer } from "./ConnectWallet/Modal/ConnectEmbed.js";
2326
import { useConnectLocale } from "./ConnectWallet/locale/getConnectLocale.js";
2427
import BuyScreen from "./ConnectWallet/screens/Buy/BuyScreen.js";
2528
import { ExecutingTxScreen } from "./TransactionButton/ExecutingScreen.js";
2629
import { DynamicHeight } from "./components/DynamicHeight.js";
2730
import { Spinner } from "./components/Spinner.js";
2831
import type { LocaleId } from "./types.js";
29-
import { useActiveAccount } from "../../core/hooks/wallets/useActiveAccount.js";
30-
import { useActiveWallet } from "../../core/hooks/wallets/useActiveWallet.js";
31-
import { AutoConnect } from "../../web/ui/AutoConnect/AutoConnect.js";
3232

3333
/**
3434
* Props of [`PayEmbed`](https://portal.thirdweb.com/references/typescript/v5/PayEmbed) component
@@ -473,10 +473,10 @@ export type PayEmbedConnectOptions = {
473473
* ```
474474
*/
475475
autoConnect?:
476-
| {
477-
timeout: number;
478-
}
479-
| boolean;
476+
| {
477+
timeout: number;
478+
}
479+
| boolean;
480480

481481
/**
482482
* Metadata of the app that will be passed to connected wallet. Setting this is highly recommended.

packages/thirdweb/src/wallets/connection/autoConnectCore.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,9 @@ const _autoConnectCore = async ({
9292
clientId: props.client.clientId,
9393
ecosystem: isEcosystemWallet(wallet)
9494
? {
95-
id: wallet.id,
96-
partnerId: wallet.getConfig()?.partnerId,
97-
}
95+
id: wallet.id,
96+
partnerId: wallet.getConfig()?.partnerId,
97+
}
9898
: undefined,
9999
});
100100
await clientStorage.saveAuthCookie(urlToken.authCookie);
@@ -150,9 +150,9 @@ const _autoConnectCore = async ({
150150
const connectedWallet = await (connectOverride
151151
? connectOverride(activeWallet)
152152
: manager.connect(activeWallet, {
153-
client: props.client,
154-
accountAbstraction: props.accountAbstraction,
155-
}));
153+
client: props.client,
154+
accountAbstraction: props.accountAbstraction,
155+
}));
156156
if (connectedWallet) {
157157
autoConnected = true;
158158
try {

0 commit comments

Comments
 (0)