Skip to content

Commit 84d3dc4

Browse files
committed
adds missing async to connect docs (#5864)
<!-- start pr-codex --> ## PR-Codex overview This PR focuses on updating the `handleLogin` and `handlePostLogin` functions to use an `async` callback within the `connect` function, enhancing the handling of asynchronous operations in the in-app wallet connection process. ### Detailed summary - Changed `connect(() => {...})` to `connect(async () => {...})` in multiple files. - Updated `handlePostLogin` in `apps/portal/src/app/connect/in-app-wallet/custom-auth/configuration/page.mdx`. - Updated `handleLogin` in various files: - `apps/portal/src/app/connect/in-app-wallet/guides/build-your-own-ui/page.mdx` - `apps/portal/src/app/react/v5/in-app-wallet/build-your-own-ui/page.mdx` - `apps/portal/src/app/react/v5/in-app-wallet/get-started/page.mdx` - Other instances in similar files. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->
1 parent fdf3d5b commit 84d3dc4

File tree

4 files changed

+15
-15
lines changed
  • apps/portal/src/app

4 files changed

+15
-15
lines changed

apps/portal/src/app/connect/in-app-wallet/custom-auth/configuration/page.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ import { useConnect } from "thirdweb/react";
146146
const { connect } = useConnect();
147147

148148
const handlePostLogin = async (jwt: string) => {
149-
await connect(() => {
149+
await connect(async () => {
150150
const wallet = inAppWallet();
151151
await wallet.connect({
152152
client,

apps/portal/src/app/connect/in-app-wallet/guides/build-your-own-ui/page.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ import { useConnect } from "thirdweb/react";
7979
const { connect } = useConnect();
8080

8181
const handleLogin = async () => {
82-
await connect(() => {
82+
await connect(async () => {
8383
const wallet = inAppWallet();
8484
await wallet.connect({
8585
client,
@@ -194,7 +194,7 @@ import { inAppWallet, hasStoredPasskey } from "thirdweb/wallets/in-app";
194194
const { connect } = useConnect();
195195

196196
const handleLogin = async () => {
197-
await connect(() => {
197+
await connect(async () => {
198198
const wallet = inAppWallet();
199199
const hasPasskey = await hasStoredPasskey(client);
200200
await wallet.connect({

apps/portal/src/app/react/v5/in-app-wallet/build-your-own-ui/page.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ import { useConnect } from "thirdweb/react";
8282
const { connect } = useConnect();
8383

8484
const handleLogin = async () => {
85-
await connect(() => {
85+
await connect(async () => {
8686
const wallet = inAppWallet();
8787
await wallet.connect({
8888
client,
@@ -113,7 +113,7 @@ const preLogin = async (email: string) => {
113113

114114
const handleLogin = async (email: string, verificationCode: string) => {
115115
// verify email and connect
116-
await connect(() => {
116+
await connect(async () => {
117117
const wallet = inAppWallet();
118118
await wallet.connect({
119119
client,
@@ -144,7 +144,7 @@ const preLogin = async (phoneNumber: string) => {
144144

145145
const handleLogin = async (phoneNumber: string, verificationCode: string) => {
146146
// verify phone number and connect
147-
await connect(() => {
147+
await connect(async () => {
148148
const wallet = inAppWallet();
149149
await wallet.connect({
150150
client,
@@ -171,7 +171,7 @@ import { inAppWallet, hasStoredPasskey } from "thirdweb/wallets/in-app";
171171
const { connect } = useConnect();
172172

173173
const handleLogin = async () => {
174-
await connect(() => {
174+
await connect(async () => {
175175
const wallet = inAppWallet({
176176
auth: {
177177
passkeyDomain: "example.com", // defaults to current url

apps/portal/src/app/react/v5/in-app-wallet/get-started/page.mdx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ import { useConnect } from "thirdweb/react";
136136
const { connect } = useConnect();
137137

138138
const handleLogin = async () => {
139-
await connect(() => {
139+
await connect(async () => {
140140
const wallet = inAppWallet();
141141
await wallet.connect({
142142
client,
@@ -167,7 +167,7 @@ const preLogin = async (email: string) => {
167167

168168
const handleLogin = async (email: string, verificationCode: string) => {
169169
// verify email and connect
170-
await connect(() => {
170+
await connect(async () => {
171171
const wallet = inAppWallet();
172172
await wallet.connect({
173173
client,
@@ -198,7 +198,7 @@ const preLogin = async (phoneNumber: string) => {
198198

199199
const handleLogin = async (phoneNumber: string, verificationCode: string) => {
200200
// verify phone number and connect
201-
await connect(() => {
201+
await connect(async () => {
202202
const wallet = inAppWallet();
203203
await wallet.connect({
204204
client,
@@ -225,7 +225,7 @@ import { inAppWallet, hasStoredPasskey } from "thirdweb/wallets/in-app";
225225
const { connect } = useConnect();
226226

227227
const handleLogin = async () => {
228-
await connect(() => {
228+
await connect(async () => {
229229
const wallet = inAppWallet({
230230
auth: {
231231
passkeyDomain: "example.com", // defaults to current url
@@ -253,7 +253,7 @@ import { sepolia } from "thirdweb/chains";
253253
const { connect } = useConnect();
254254

255255
const handleLogin = async () => {
256-
await connect(() => {
256+
await connect(async () => {
257257
const wallet = inAppWallet();
258258
await wallet.connect({
259259
client,
@@ -276,7 +276,7 @@ import { inAppWallet } from "thirdweb/wallets/in-app";
276276
const { connect } = useConnect();
277277

278278
const handleLogin = async () => {
279-
await connect(() => {
279+
await connect(async () => {
280280
const wallet = inAppWallet();
281281
await wallet.connect({
282282
client,
@@ -302,7 +302,7 @@ import { inAppWallet } from "thirdweb/wallets/in-app";
302302
const { connect } = useConnect();
303303

304304
const handleLogin = async () => {
305-
await connect(() => {
305+
await connect(async () => {
306306
const wallet = inAppWallet();
307307
await wallet.connect({
308308
client,
@@ -324,7 +324,7 @@ import { inAppWallet } from "thirdweb/wallets/in-app";
324324
const { connect } = useConnect();
325325

326326
const handleLogin = async () => {
327-
await connect(() => {
327+
await connect(async () => {
328328
const wallet = inAppWallet();
329329
await wallet.connect({
330330
client,

0 commit comments

Comments
 (0)