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
327 changes: 249 additions & 78 deletions apps/dashboard/src/@/api/universal-bridge/developer.ts

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ export async function PayAnalytics(props: {
client={props.client}
projectClientId={props.projectClientId}
teamId={props.teamId}
authToken={props.authToken}
/>
</div>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export function PaymentHistory(props: {
client: ThirdwebClient;
projectClientId: string;
teamId: string;
authToken: string;
}) {
const [page, setPage] = useState(1);
const { data: payPurchaseData, isLoading } = useQuery<
Expand All @@ -40,6 +41,7 @@ export function PaymentHistory(props: {
limit: pageSize,
offset: (page - 1) * pageSize,
teamId: props.teamId,
authToken: props.authToken,
});
return res;
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export function QuickStartSection(props: {
clientId: string;
teamId: string;
projectWalletAddress?: string;
authToken: string;
}) {
return (
<section>
Expand Down Expand Up @@ -46,6 +47,7 @@ export function QuickStartSection(props: {
clientId={props.clientId}
projectWalletAddress={props.projectWalletAddress}
teamId={props.teamId}
authToken={props.authToken}
>
<Button
className="w-full gap-2 group text-foreground bg-background"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ export function CreatePaymentLinkButton(
clientId: string;
teamId: string;
projectWalletAddress?: string;
authToken: string;
}>,
) {
const [open, setOpen] = useState(false);
Expand All @@ -62,6 +63,7 @@ export function CreatePaymentLinkButton(
projectWalletAddress={props.projectWalletAddress}
setOpen={setOpen}
teamId={props.teamId}
authToken={props.authToken}
/>
</DialogContent>
</Dialog>
Expand All @@ -73,6 +75,7 @@ function CreatePaymentLinkDialogContent(props: {
teamId: string;
setOpen: (open: boolean) => void;
projectWalletAddress?: string;
authToken: string;
}) {
const client = getClientThirdwebClient();

Expand Down Expand Up @@ -125,6 +128,7 @@ function CreatePaymentLinkDialogContent(props: {
amount: toUnits(values.amount.toString(), token.decimals),
},
title: values.title,
authToken: props.authToken,
});

return result;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ export function PaymentLinksTable(props: {
clientId: string;
teamId: string;
projectWalletAddress?: string;
authToken: string;
}) {
return (
<section>
Expand All @@ -57,6 +58,7 @@ export function PaymentLinksTable(props: {
clientId={props.clientId}
projectWalletAddress={props.projectWalletAddress}
teamId={props.teamId}
authToken={props.authToken}
/>
</section>
);
Expand All @@ -66,12 +68,14 @@ function PaymentLinksTableInner(props: {
clientId: string;
teamId: string;
projectWalletAddress?: string;
authToken: string;
}) {
const paymentLinksQuery = useQuery({
queryFn: async () => {
return getPaymentLinks({
clientId: props.clientId,
teamId: props.teamId,
authToken: props.authToken,
});
},
queryKey: ["payment-links", props.clientId, props.teamId],
Expand All @@ -83,6 +87,7 @@ function PaymentLinksTableInner(props: {
return await Promise.all(
paymentLinks.map(async (paymentLink) => {
const { data } = await getPayments({
authToken: props.authToken,
clientId: props.clientId,
teamId: props.teamId,
paymentLinkId: paymentLink.id,
Expand Down Expand Up @@ -134,6 +139,7 @@ function PaymentLinksTableInner(props: {
clientId={props.clientId}
projectWalletAddress={props.projectWalletAddress}
teamId={props.teamId}
authToken={props.authToken}
>
<Button className="gap-2 rounded-full" variant="default" size="sm">
<PlusIcon className="size-4" />
Expand Down Expand Up @@ -228,6 +234,7 @@ function PaymentLinksTableInner(props: {
clientId={props.clientId}
teamId={props.teamId}
paymentLinkId={paymentLink.id}
authToken={props.authToken}
>
<Button size="icon" variant="ghost">
<TrashIcon className="size-4" strokeWidth={1} />
Expand Down Expand Up @@ -277,6 +284,7 @@ function DeletePaymentLinkButton(
paymentLinkId: string;
clientId: string;
teamId: string;
authToken: string;
}>,
) {
const [open, setOpen] = useState(false);
Expand All @@ -287,6 +295,7 @@ function DeletePaymentLinkButton(
clientId: props.clientId,
teamId: props.teamId,
paymentLinkId: id,
authToken: props.authToken,
});
return null;
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ export default async function Page(props: {
clientId={project.publishableKey}
projectWalletAddress={projectWallet?.address}
teamId={project.teamId}
authToken={authToken}
>
<Button className="gap-1.5 rounded-full" size="sm">
<PlusIcon className="size-4" />
Expand Down Expand Up @@ -147,13 +148,15 @@ export default async function Page(props: {
clientId={project.publishableKey}
projectWalletAddress={projectWallet?.address}
teamId={project.teamId}
authToken={authToken}
/>
<QuickStartSection
projectSlug={params.project_slug}
teamSlug={params.team_slug}
clientId={project.publishableKey}
projectWalletAddress={projectWallet?.address}
teamId={project.teamId}
authToken={authToken}
/>

<AdvancedSection
Expand Down
Loading
Loading