Skip to content

Commit aabd220

Browse files
committed
cleanup unused
1 parent a67e980 commit aabd220

File tree

5 files changed

+5
-45
lines changed

5 files changed

+5
-45
lines changed

apps/dashboard/src/@3rdweb-sdk/react/hooks/useApi.ts

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,6 @@ export const accountPlan = {
2929
enterprise: "enterprise",
3030
} as const;
3131

32-
type AccountStatus = (typeof accountStatus)[keyof typeof accountStatus];
33-
type AccountPlan = (typeof accountPlan)[keyof typeof accountPlan];
34-
3532
export type AuthorizedWallet = {
3633
id: string;
3734
accountId: string;
@@ -47,30 +44,17 @@ export type Account = {
4744
id: string;
4845
isStaff: boolean;
4946
creatorWalletAddress: string;
50-
status: AccountStatus;
51-
plan: AccountPlan;
5247
name?: string;
5348
email?: string;
5449
advancedEnabled: boolean;
55-
currentBillingPeriodStartsAt: string;
56-
currentBillingPeriodEndsAt: string;
5750
emailConfirmedAt?: string;
5851
unconfirmedEmail?: string;
59-
trialPeriodEndedAt?: string;
6052
emailConfirmationWalletAddress?: string;
61-
stripePaymentActionUrl?: string;
6253
onboardSkipped?: boolean;
63-
paymentAttemptCount?: number;
6454
notificationPreferences?: {
6555
billing: "email" | "none";
6656
updates: "email" | "none";
6757
};
68-
recurringPaymentFailures: {
69-
subscriptionId: string;
70-
subscriptionDescription: string;
71-
paymentFailureCode: string;
72-
serviceCutoffDate: string;
73-
}[];
7458
// TODO - add image URL
7559
};
7660

@@ -194,33 +178,16 @@ export interface UpdateKeyInput {
194178
redirectUrls: string[];
195179
}
196180

197-
interface UsageBundler {
198-
chainId: number;
199-
sumTransactionFee: string;
200-
}
201-
202181
interface UsageStorage {
203182
sumFileSizeBytes: number;
204183
}
205184

206-
interface UsageEmbeddedWallets {
207-
countWalletAddresses: number;
208-
}
209-
210185
export interface UsageBillableByService {
211186
usage: {
212-
bundler: UsageBundler[];
213187
storage: UsageStorage;
214-
embeddedWallets: UsageEmbeddedWallets;
215-
};
216-
billableUsd: {
217-
bundler: number;
218-
storage: number;
219-
embeddedWallets: number;
220188
};
221189
limits: {
222190
storage: number;
223-
embeddedWallets: number;
224191
};
225192
rateLimits: {
226193
storage: number;

apps/dashboard/src/app/api/testnet-faucet/claim/route.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ export const POST = async (req: NextRequest) => {
7474
const account: { data: Account } = await accountRes.json();
7575

7676
// Make sure the logged-in account has verified its email
77-
if (account.data.status === "noCustomer") {
77+
if (!account.data.email) {
7878
return NextResponse.json(
7979
{
8080
error: "Account owner hasn't verified email",

apps/dashboard/src/app/team/[team_slug]/(team)/~/usage/overview/components/Usage.tsx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,6 @@ export const Usage: React.FC<UsageProps> = ({
4141
return {
4242
total: `${toSize(Math.min(consumedBytes, limitBytes), "MB")} of ${toSize(limitBytes)} included storage used`,
4343
progress: percent,
44-
...(usageData.billableUsd.storage > 0
45-
? {
46-
overage: usageData.billableUsd.storage,
47-
}
48-
: {}),
4944
totalUsage: `Total Usage: ${toSize(consumedBytes, "MB")}`,
5045
};
5146
}, [usageData]);

apps/dashboard/src/components/onboarding/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ export const Onboarding: React.FC<{
6767
);
6868
}
6969
// skip when going thru claiming trial growth
70-
else if (account?.trialPeriodEndedAt) {
70+
else if (account?.onboardSkipped) {
7171
setState("skipped");
7272
}
7373
// user hasn't skipped onboarding, has valid email and no valid payment yet

apps/dashboard/src/components/onboarding/on-boarding-ui.client.tsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,7 @@ function OnboardingUI(props: {
4242
break;
4343
case "confirming":
4444
// after confirming, only show plan if user has not skipped onboarding earlier or trial period has ended
45-
nextStep =
46-
account.onboardSkipped || account?.trialPeriodEndedAt
47-
? "skipped"
48-
: "plan";
45+
nextStep = account.onboardSkipped ? "skipped" : "plan";
4946
break;
5047
case "confirmLinking":
5148
nextStep = "skipped";
@@ -145,7 +142,8 @@ function OnboardingUI(props: {
145142
setState("skipped");
146143
skipOnboarding();
147144
}}
148-
canTrialGrowth={!account.trialPeriodEndedAt}
145+
// TODO: what can we do here? assume true for the moment
146+
canTrialGrowth={true}
149147
/>
150148
</Suspense>
151149
)}

0 commit comments

Comments
 (0)