Skip to content

Commit a9adbaf

Browse files
committed
Dashboard: Fix login infinite loop on certain wallets (#6825)
<!-- ## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes" If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000): ## Notes for the reviewer Anything important to call out? Be sure to also clarify these in your comments. ## How to test Unit tests, playground, etc. --> <!-- start pr-codex --> --- ## PR-Codex overview This PR updates the `EnsureValidConnectedWalletLoginClient` component to ensure that wallet addresses are compared in a case-insensitive manner by using the `checksumAddress` function. ### Detailed summary - Added import of `checksumAddress` from `thirdweb/utils`. - Updated the conditional check to compare `connectedAddress` and `props.loggedInAddress` using `checksumAddress` for both values. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->
1 parent dc2e514 commit a9adbaf

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

apps/dashboard/src/app/(app)/components/EnsureValidConnectedWalletLogin/EnsureValidConnectedWalletLoginClient.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import { useDashboardRouter } from "@/lib/DashboardRouter";
44
import { useEffect } from "react";
55
import { useActiveAccount } from "thirdweb/react";
6+
import { checksumAddress } from "thirdweb/utils";
67

78
export function EnsureValidConnectedWalletLoginClient(props: {
89
loggedInAddress: string;
@@ -16,7 +17,10 @@ export function EnsureValidConnectedWalletLoginClient(props: {
1617
return;
1718
}
1819

19-
if (connectedAddress !== props.loggedInAddress) {
20+
if (
21+
checksumAddress(connectedAddress) !==
22+
checksumAddress(props.loggedInAddress)
23+
) {
2024
const currentHref = new URL(window.location.href);
2125
const currentPathname = currentHref.pathname;
2226
const currentSearchParams = currentHref.searchParams.toString();

0 commit comments

Comments
 (0)