Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert";
import { TrackedLinkTW } from "@/components/ui/tracked-link";
import {
type Account,
type ApiKeyService,
accountStatus,
} from "@3rdweb-sdk/react/hooks/useApi";
Expand All @@ -25,7 +24,6 @@ export function AccountAbstractionPage(props: {
apiKeyServices: ApiKeyService[];
billingStatus: "validPayment" | (string & {}) | null;
tab?: string;
twAccount: Account;
}) {
const { apiKeyServices } = props;

Expand Down Expand Up @@ -81,11 +79,9 @@ export function AccountAbstractionPage(props: {

<SmartWallets
smartWalletsLayoutSlug={`/team/${props.teamSlug}/${props.projectSlug}/connect/account-abstraction`}
apiKeyServices={apiKeyServices}
trackingCategory={TRACKING_CATEGORY}
clientId={props.projectKey}
tab={props.tab}
twAccount={props.twAccount}
/>
</div>
<div className="h-14" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { ChakraProviderSetup } from "@/components/ChakraProviderSetup";
import type { Metadata } from "next";
import { notFound, redirect } from "next/navigation";
import { getAbsoluteUrl } from "../../../../../../lib/vercel-utils";
import { getValidAccount } from "../../../../../account/settings/getAccount";
import { getAPIKeyForProjectId } from "../../../../../api/lib/getAPIKeys";
import { AccountAbstractionPage } from "./AccountAbstractionPage";

Expand All @@ -14,10 +13,7 @@ export default async function Page(props: {
}) {
const { team_slug, project_slug } = await props.params;

const [account, team, project] = await Promise.all([
getValidAccount(
`/${team_slug}/${project_slug}/connect/account-abstraction`,
),
const [team, project] = await Promise.all([
getTeamBySlug(team_slug),
getProject(team_slug, project_slug),
]);
Expand Down Expand Up @@ -45,7 +41,6 @@ export default async function Page(props: {
projectKey={project.publishableKey}
apiKeyServices={apiKey.services || []}
tab={(await props.searchParams).tab}
twAccount={account}
/>
</ChakraProviderSetup>
);
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,6 @@ export default async function Layout(props: {
path: `/team/${team_slug}/${project_slug}/connect/in-app-wallets/users`,
exactMatch: true,
},
{
name: "Configuration",
path: `/team/${team_slug}/${project_slug}/connect/in-app-wallets/config`,
exactMatch: true,
},
]}
/>

Expand Down
25 changes: 1 addition & 24 deletions apps/dashboard/src/components/smart-wallets/index.tsx
Original file line number Diff line number Diff line change
@@ -1,32 +1,23 @@
"use client";

import { TabLinks } from "@/components/ui/tabs";
import {
type Account,
type ApiKeyService,
useUserOpUsageAggregate,
} from "@3rdweb-sdk/react/hooks/useApi";
import { useUserOpUsageAggregate } from "@3rdweb-sdk/react/hooks/useApi";
import { AccountAbstractionAnalytics } from "./AccountAbstractionAnalytics";
import { AccountAbstractionSummary } from "./AccountAbstractionAnalytics/AccountAbstractionSummary";
import { AccountFactories } from "./AccountFactories";
import { AccountAbstractionSettingsPage } from "./SponsorshipPolicies";

interface SmartWalletsProps {
apiKeyServices: ApiKeyService[];
trackingCategory: string;
clientId: string;
smartWalletsLayoutSlug: string;
tab?: string;
twAccount: Account;
}

export const SmartWallets: React.FC<SmartWalletsProps> = ({
apiKeyServices,
trackingCategory,
clientId,
smartWalletsLayoutSlug,
tab = "analytics",
twAccount,
}) => {
const aggregateUserOpUsageQuery = useUserOpUsageAggregate({
clientId,
Expand All @@ -48,12 +39,6 @@ export const SmartWallets: React.FC<SmartWalletsProps> = ({
isActive: tab === "analytics",
isDisabled: false,
},
{
name: "Sponsorship Policies",
href: `${smartWalletsLayoutSlug}?tab=config`,
isActive: tab === "config",
isDisabled: false,
},
{
name: "Account Factories",
href: `${smartWalletsLayoutSlug}?tab=factories`,
Expand All @@ -72,14 +57,6 @@ export const SmartWallets: React.FC<SmartWalletsProps> = ({
{tab === "factories" && (
<AccountFactories trackingCategory={trackingCategory} />
)}

{tab === "config" && (
<AccountAbstractionSettingsPage
apiKeyServices={apiKeyServices}
trackingCategory={trackingCategory}
twAccount={twAccount}
/>
)}
</div>
);
};
Loading