Skip to content

Commit da1b93d

Browse files
committed
fix: type wallet doesn't exists in getUser
1 parent ea855c6 commit da1b93d

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

.changeset/curly-ligers-exist.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"thirdweb": patch
3+
---
4+
5+
update `type` in `getUser` `Profiles` to match tyepscript types

packages/thirdweb/src/wallets/in-app/core/users/getUser.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,12 @@ export async function getUser({
113113
email: item.email,
114114
phone: item.phone,
115115
createdAt: item.createdAt,
116-
profiles: item.linkedAccounts,
116+
profiles: item.linkedAccounts.map((profile) => {
117+
return {
118+
type: (profile.type as string) === "siwe" ? "wallet" : profile.type,
119+
details: profile.details,
120+
};
121+
}),
117122
}))[0] || null
118123
);
119124
}

0 commit comments

Comments
 (0)