Skip to content

Commit 167d028

Browse files
committed
Merge remote-tracking branch 'origin/main' into ph/usageV2
2 parents d830a40 + eafaefe commit 167d028

File tree

446 files changed

+1486
-737514
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

446 files changed

+1486
-737514
lines changed

.changeset/fuzzy-ants-laugh.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/kind-beers-fold.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"thirdweb": patch
3+
---
4+
5+
Always use 712 signature verification if the smart account is already deployed

.changeset/nervous-frogs-pay.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"thirdweb": patch
3+
---
4+
5+
Fix prompting for generic WC connection on mobile

.changeset/rotten-vans-sleep.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@thirdweb-dev/service-utils": patch
3+
---
4+
5+
Use a cache key that doesn't involve hashing

.changeset/two-trees-tease.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"thirdweb": patch
3+
---
4+
5+
fix (in app wallets): error when calling connect for backend strategy due to `document` reference

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ packages/eslint-config-thirdweb/ @thirdweb-dev/core-platform @edwardysun
1212
packages/tw-tsconfig/ @thirdweb-dev/core-platform @edwardysun
1313

1414
# apps
15-
apps/ @thirdweb-dev/developer-tools @thirdweb-dev/core-platform @jakubkrehel
15+
apps/ @thirdweb-dev/developer-tools @thirdweb-dev/core-platform
1616

1717
# .github folder + .changeset + turbo config is owned by jonas for now
1818
scripts/ @jnsdls @joaquim-verges

.vscode/settings.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,9 @@
2727
},
2828
"[css]": {
2929
"editor.defaultFormatter": "biomejs.biome"
30-
}
30+
},
31+
"eslint.workingDirectories": [
32+
{ "pattern": "./packages/*/" },
33+
{ "pattern": "./apps/*/" }
34+
]
3135
}

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

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import type {
33
AnalyticsQueryParams,
44
InAppWalletStats,
55
RpcMethodStats,
6+
TransactionStats,
67
UserOpStats,
78
WalletStats,
89
WalletUserStats,
@@ -77,14 +78,41 @@ export async function getUserOpUsage(
7778
});
7879

7980
if (res?.status !== 200) {
80-
console.error("Failed to fetch user ops usage");
81+
const reason = await res?.text();
82+
console.error(
83+
`Failed to fetch user ops usage: ${res?.status} - ${res.statusText} - ${reason}`,
84+
);
8185
return [];
8286
}
8387

8488
const json = await res.json();
8589
return json.data as UserOpStats[];
8690
}
8791

92+
export async function getClientTransactions(
93+
params: AnalyticsQueryParams,
94+
): Promise<TransactionStats[]> {
95+
const searchParams = buildSearchParams(params);
96+
const res = await fetchAnalytics(
97+
`v1/transactions/client?${searchParams.toString()}`,
98+
{
99+
method: "GET",
100+
headers: { "Content-Type": "application/json" },
101+
},
102+
);
103+
104+
if (res?.status !== 200) {
105+
const reason = await res?.text();
106+
console.error(
107+
`Failed to fetch client transactions stats: ${res?.status} - ${res.statusText} - ${reason}`,
108+
);
109+
return [];
110+
}
111+
112+
const json = await res.json();
113+
return json.data as TransactionStats[];
114+
}
115+
88116
export async function getRpcMethodUsage(
89117
params: AnalyticsQueryParams,
90118
): Promise<RpcMethodStats[]> {

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

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import "server-only";
2-
import { COOKIE_ACTIVE_ACCOUNT, COOKIE_PREFIX_TOKEN } from "@/constants/cookie";
32
import { API_SERVER_URL } from "@/constants/env";
4-
import { cookies } from "next/headers";
3+
import { getAuthToken } from "../../app/api/lib/getAuthToken";
54

65
export type Project = {
76
id: string;
@@ -21,11 +20,7 @@ export type Project = {
2120
};
2221

2322
export async function getProjects(teamSlug: string) {
24-
const cookiesManager = await cookies();
25-
const activeAccount = cookiesManager.get(COOKIE_ACTIVE_ACCOUNT)?.value;
26-
const token = activeAccount
27-
? cookiesManager.get(COOKIE_PREFIX_TOKEN + activeAccount)?.value
28-
: null;
23+
const token = await getAuthToken();
2924

3025
if (!token) {
3126
return [];
@@ -46,11 +41,7 @@ export async function getProjects(teamSlug: string) {
4641
}
4742

4843
export async function getProject(teamSlug: string, projectSlug: string) {
49-
const cookiesManager = await cookies();
50-
const activeAccount = cookiesManager.get(COOKIE_ACTIVE_ACCOUNT)?.value;
51-
const token = activeAccount
52-
? cookiesManager.get(COOKIE_PREFIX_TOKEN + activeAccount)?.value
53-
: null;
44+
const token = await getAuthToken();
5445

5546
if (!token) {
5647
return null;

apps/dashboard/src/@/components/blocks/NetworkSelectors.tsx

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,9 @@ export function SingleNetworkSelector(props: {
9090
popoverContentClassName?: string;
9191
// if specified - only these chains will be shown
9292
chainIds?: number[];
93+
side?: "left" | "right" | "top" | "bottom";
94+
disableChainId?: boolean;
95+
align?: "center" | "start" | "end";
9396
}) {
9497
const { allChains, idToChain } = useAllChainsData();
9598

@@ -142,14 +145,17 @@ export function SingleNetworkSelector(props: {
142145
/>
143146
{chain.name}
144147
</span>
145-
<Badge variant="outline" className="gap-2 max-sm:hidden">
146-
<span className="text-muted-foreground">Chain ID</span>
147-
{chain.chainId}
148-
</Badge>
148+
149+
{!props.disableChainId && (
150+
<Badge variant="outline" className="gap-2 max-sm:hidden">
151+
<span className="text-muted-foreground">Chain ID</span>
152+
{chain.chainId}
153+
</Badge>
154+
)}
149155
</div>
150156
);
151157
},
152-
[idToChain],
158+
[idToChain, props.disableChainId],
153159
);
154160

155161
const isLoadingChains = allChains.length === 0;
@@ -168,6 +174,8 @@ export function SingleNetworkSelector(props: {
168174
className={props.className}
169175
popoverContentClassName={props.popoverContentClassName}
170176
disabled={isLoadingChains}
177+
side={props.side}
178+
align={props.align}
171179
/>
172180
);
173181
}

0 commit comments

Comments
 (0)