Skip to content

Commit

Permalink
Fix for check if launcher is being used
Browse files Browse the repository at this point in the history
  • Loading branch information
WyattMufson committed Oct 24, 2024
1 parent fb71501 commit 3890e70
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
1 change: 1 addition & 0 deletions examples/connect-electron/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"@electron-toolkit/preload": "catalog:",
"@electron-toolkit/utils": "catalog:",
"@treasure-dev/tdk-react": "workspace:*",
"@treasure-dev/launcher": "workspace:*",
"thirdweb": "catalog:"
},
"devDependencies": {
Expand Down
3 changes: 2 additions & 1 deletion packages/react/src/hooks/useLauncher.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ export const useLauncher = ({
onAuthTokenUpdated,
}: Props) => {
const authToken = getAuthTokenOverride?.() ?? getTreasureLauncherAuthToken();
const isUsingTreasureLauncher = authToken !== undefined;
const isUsingTreasureLauncher =
authToken !== undefined && authToken.length > 0;

const openLauncherAccountModal = (size?: "lg" | "xl" | "2xl" | "3xl") => {
if (!isUsingTreasureLauncher) {
Expand Down
17 changes: 10 additions & 7 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 3890e70

Please sign in to comment.