Skip to content

Commit aa8e245

Browse files
committed
[Dashboard] New Project > Wallets product grouping and subsections (#8359)
Reorganized wallet-related routes under a new sidebar structure, replacing legacy pages with redirects to new user, server, and sponsored gas wallet sections. Added new layout and overview/configuration pages for server wallets and sponsored gas, updated sidebar navigation to reflect new wallet grouping, and removed legacy Account Abstraction and Vault pages in favor of the new structure. <!-- start pr-codex --> --- ## PR-Codex overview This PR focuses on renaming "in-app wallets" to "user wallets" across the codebase and updating related functionality, including routing and UI components. It also includes the removal of deprecated components and the introduction of new configurations for user wallet management. ### Detailed summary - Renamed "in-app wallets" to "user wallets" in various files. - Updated API error messages to reflect the new terminology. - Refactored routing paths for wallet configurations. - Removed deprecated `ProjectSettingsBreadcrumb` component. - Added new `CountrySelector` component for SMS country selection. - Updated UI components to reflect changes in terminology and functionality. - Removed old vault and account abstraction pages, redirecting to new paths. - Introduced pagination for server wallets and user wallets tables. - Enhanced error handling for API requests related to wallets. > The following files were skipped due to too many changes: `apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/transactions/page.tsx`, `apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/user-wallets/configuration/components/sms-country-select/utils.ts`, `apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/user-wallets/configuration/components/index.tsx` > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex --> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Pages and layouts for Server Wallets, Sponsored Gas, and User Wallets (overview + configuration). * In-app wallet settings UI: branding, JWT/custom auth endpoint, image uploads, SMS country selector, and SMS country data/utilities. * **Navigation Updates** * Sidebar reorganized to group wallet features; submenu discovery and mobile behavior improved. * **Behavioral Changes** * Legacy analytics/settings pages replaced with redirects to new wallet routes. * **UX** * Wallet tables: URL-driven pagination, page-size-aware ranges, and clearer “Showing X–Y of Z” messaging. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
1 parent f964b8a commit aa8e245

File tree

40 files changed

+2613
-1106
lines changed

40 files changed

+2613
-1106
lines changed

apps/dashboard/src/@/api/analytics.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ const cached_getInAppWalletUsage = unstable_cache(
184184
if (res?.status !== 200) {
185185
const reason = await res?.text();
186186
console.error(
187-
`Failed to fetch in-app wallet usage, ${res?.status} - ${res.statusText} - ${reason}`,
187+
`Failed to fetch user wallets usage, ${res?.status} - ${res.statusText} - ${reason}`,
188188
);
189189
return [];
190190
}

apps/dashboard/src/@/components/blocks/full-width-sidebar-layout.tsx

Lines changed: 53 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,11 @@ type ShadcnSidebarBaseLink = {
3838
isActive?: (pathname: string) => boolean;
3939
};
4040

41-
type ShadcnSidebarLink =
41+
export type ShadcnSidebarLink =
4242
| ShadcnSidebarBaseLink
4343
| {
4444
group: string;
45-
links: ShadcnSidebarBaseLink[];
45+
links: ShadcnSidebarLink[];
4646
}
4747
| {
4848
separator: true;
@@ -97,10 +97,7 @@ export function FullWidthSidebarLayout(props: {
9797

9898
function MobileSidebarTrigger(props: { links: ShadcnSidebarLink[] }) {
9999
const activeLink = useActiveShadcnSidebarLink(props.links);
100-
const parentSubNav = props.links.find(
101-
(link) =>
102-
"subMenu" in link && link.links.some((l) => l.href === activeLink?.href),
103-
);
100+
const parentSubNav = findParentSubmenu(props.links, activeLink?.href);
104101

105102
return (
106103
<div className="flex items-center gap-3 border-b px-4 py-4 lg:hidden">
@@ -109,7 +106,7 @@ function MobileSidebarTrigger(props: { links: ShadcnSidebarLink[] }) {
109106
className="h-4 bg-muted-foreground/50"
110107
orientation="vertical"
111108
/>
112-
{parentSubNav && "subMenu" in parentSubNav && (
109+
{parentSubNav && (
113110
<>
114111
<span className="text-sm">{parentSubNav.subMenu.label}</span>
115112
<ChevronRightIcon className="size-4 text-muted-foreground/50 -mx-1.5" />
@@ -131,24 +128,65 @@ function useActiveShadcnSidebarLink(links: ShadcnSidebarLink[]) {
131128
return pathname?.startsWith(link.href);
132129
}
133130

134-
for (const link of links) {
135-
if ("links" in link) {
136-
for (const subLink of link.links) {
137-
if (isActive(subLink)) {
138-
return subLink;
131+
function walk(
132+
navLinks: ShadcnSidebarLink[],
133+
): ShadcnSidebarBaseLink | undefined {
134+
for (const link of navLinks) {
135+
if ("subMenu" in link) {
136+
for (const subLink of link.links) {
137+
if (isActive(subLink)) {
138+
return subLink;
139+
}
140+
}
141+
} else if ("href" in link) {
142+
if (isActive(link)) {
143+
return link;
139144
}
140145
}
141-
} else if ("href" in link) {
142-
if (isActive(link)) {
143-
return link;
146+
147+
if ("links" in link && !("subMenu" in link)) {
148+
const nested = walk(link.links);
149+
if (nested) {
150+
return nested;
151+
}
144152
}
145153
}
154+
155+
return undefined;
146156
}
157+
158+
return walk(links);
147159
}, [links, pathname]);
148160

149161
return activeLink;
150162
}
151163

164+
function findParentSubmenu(
165+
links: ShadcnSidebarLink[],
166+
activeHref: string | undefined,
167+
): Extract<ShadcnSidebarLink, { subMenu: unknown }> | undefined {
168+
if (!activeHref) {
169+
return undefined;
170+
}
171+
172+
for (const link of links) {
173+
if ("subMenu" in link) {
174+
if (link.links.some((subLink) => subLink.href === activeHref)) {
175+
return link;
176+
}
177+
}
178+
179+
if ("links" in link && !("subMenu" in link)) {
180+
const nested = findParentSubmenu(link.links, activeHref);
181+
if (nested) {
182+
return nested;
183+
}
184+
}
185+
}
186+
187+
return undefined;
188+
}
189+
152190
function useIsSubnavActive(links: ShadcnSidebarBaseLink[]) {
153191
const pathname = usePathname();
154192

apps/dashboard/src/@/components/blocks/project-page/project-page.tsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,6 @@ import {
1212
type ProjectPageProps = {
1313
header: ProjectPageHeaderProps;
1414
footer?: ProjectPageFooterProps;
15-
/**
16-
* @deprecated only for legacy pages where we still need internal tabs for the moment, currently:
17-
* - /webhooks
18-
*/
1915
tabs?: TabPathLink[];
2016
};
2117

apps/dashboard/src/@/components/in-app-wallet-users-content/in-app-wallet-users-content.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ export function InAppWalletUsersPageContent(
337337
isFetched={walletsQuery.isFetched}
338338
isPending={walletsQuery.isPending}
339339
tableContainerClassName="rounded-none border-x-0 border-b-0"
340-
title="in-app wallets"
340+
title="User wallets"
341341
/>
342342

343343
<div className="flex justify-center gap-3 border-t bg-card p-6">

apps/dashboard/src/@/components/misc/AnnouncementBanner.tsx

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import Link from "next/link";
55
import { Button } from "@/components/ui/button";
66
import { useLocalStorage } from "@/hooks/useLocalStorage";
77

8-
// biome-ignore lint/correctness/noUnusedVariables: banner is toggled on-demand via API content changes
98
function AnnouncementBannerUI(props: {
109
href: string;
1110
label: string;
@@ -45,12 +44,11 @@ function AnnouncementBannerUI(props: {
4544
}
4645

4746
export function AnnouncementBanner() {
48-
// return (
49-
// <AnnouncementBannerUI
50-
// href="https://blog.thirdweb.com/the-fastest-way-to-build-web3-applications/"
51-
// label="We have re-branded our Engine, Payments, and Connect products. Please read the full blog post for details on changes"
52-
// trackingLabel="product-rebrand"
53-
// />
54-
// );
55-
return null;
47+
return (
48+
<AnnouncementBannerUI
49+
href="https://blog.thirdweb.com/changelog/project-view-update-wallets/"
50+
label="Project View Update - Wallets"
51+
trackingLabel="project-view-update-wallets"
52+
/>
53+
);
5654
}

apps/dashboard/src/@/constants/siwa-example-prompts.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
export const siwaExamplePrompts = [
2-
"How do I add in-app wallet with sign in with google to my react app?",
2+
"How do I add user wallet with sign in with google to my react app?",
33
"How do I send a transaction in Unity?",
44
"What does this contract revert error mean?",
55
"I see thirdweb support id in my console log, can you help me?",

apps/dashboard/src/@/storybook/stubs.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ export function teamSubscriptionsStub(
248248
// In-App Wallets
249249
{
250250
amount: usage.inAppWalletAmount?.amount || 0,
251-
description: `${usage.inAppWalletAmount?.quantity || 0} x In-App Wallets (Tier 1 at $0.00 / month)`,
251+
description: `${usage.inAppWalletAmount?.quantity || 0} x User Wallets (Tier 1 at $0.00 / month)`,
252252
thirdwebSku: "usage:in_app_wallet",
253253
},
254254
// AA Sponsorship

apps/dashboard/src/@/utils/pricing.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export const TEAM_PLANS: Record<
2323
features: [
2424
"Email Support",
2525
"48hr Guaranteed Response",
26-
"Custom In-App Wallet Auth",
26+
"Custom User Wallet Auth",
2727
],
2828
price: 99,
2929
subTitle: "Everything in Starter, plus:",

apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/account-abstraction/Alerts.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ export const SmartWalletsBillingAlert = (props: { teamSlug: string }) => {
66
return (
77
<Alert variant="warning">
88
<CircleAlertIcon className="size-5" />
9-
<AlertTitle>Account Abstraction on Mainnet</AlertTitle>
9+
<AlertTitle>Gas Sponsorship on Mainnet</AlertTitle>
1010
<AlertDescription>
11-
To enable AA on mainnet chains,{" "}
11+
To enable Gas Sponsorship on mainnet chains,{" "}
1212
<UnderlineLink href={`/team/${props.teamSlug}/~/billing`}>
1313
subscribe to a billing plan.
1414
</UnderlineLink>

apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/account-abstraction/factories/AccountFactories/index.tsx

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ import {
1414
TableHeader,
1515
TableRow,
1616
} from "@/components/ui/table";
17-
import { UnderlineLink } from "@/components/ui/UnderlineLink";
1817

1918
export function DefaultFactoriesSection() {
2019
const data = [
@@ -38,13 +37,6 @@ export function DefaultFactoriesSection() {
3837
</h3>
3938
<p className="text-muted-foreground text-sm">
4039
Ready to use account factories that are pre-deployed on each chain.{" "}
41-
<UnderlineLink
42-
href="https://playground.thirdweb.com/connect/account-abstraction/connect"
43-
rel="noopener noreferrer"
44-
target="_blank"
45-
>
46-
Learn how to use these in your apps
47-
</UnderlineLink>
4840
</p>
4941
</div>
5042

0 commit comments

Comments
 (0)