Skip to content

Commit 0ff3ed4

Browse files
committed
Merge branch 'yash/extension-manager-dynamic-contracts' of github.com:thirdweb-dev/js into yash/extension-manager-dynamic-contracts
2 parents dc0c656 + ace20de commit 0ff3ed4

File tree

14 files changed

+68
-55
lines changed

14 files changed

+68
-55
lines changed

apps/dashboard/src/components/pay/PayConfig.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ export const PayConfig: React.FC<PayConfigProps> = (props) => {
125125
<Form {...form}>
126126
<form onSubmit={handleSubmit} autoComplete="off">
127127
<SettingsCard
128-
bottomText="Shared Fees will are sent to recipient address"
128+
bottomText="Shared Fees are sent to recipient address"
129129
errorText={form.getFieldState("payoutAddress").error?.message}
130130
saveButton={{
131131
type: "submit",

apps/dashboard/src/components/smart-wallets/SponsorshipPolicies/index.tsx

Lines changed: 29 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -112,24 +112,31 @@ export function AccountAbstractionSettingsPage(
112112

113113
const policy = props.bundlerService;
114114

115-
const transformedQueryData = useMemo(
116-
() => ({
115+
const transformedQueryData = useMemo(() => {
116+
const allowedContractAddresses = policy.allowedContractAddresses?.filter(
117+
(x) => x !== "",
118+
);
119+
120+
const allowedWallets = policy.allowedWallets?.filter((x) => x !== "");
121+
const blockedWallets = policy.blockedWallets?.filter((x) => x !== "");
122+
123+
// there is a bug in API server that makes `allowedChainIds` an array with `0` if we set it to null
124+
const allowedChainIds = policy.allowedChainIds?.filter((x) => x !== 0);
125+
126+
return {
117127
allowedChainIds:
118-
policy.allowedChainIds && policy.allowedChainIds?.length > 0
119-
? policy.allowedChainIds
120-
: null,
128+
allowedChainIds && allowedChainIds?.length > 0 ? allowedChainIds : null,
121129
allowedContractAddresses:
122-
policy.allowedContractAddresses &&
123-
policy.allowedContractAddresses?.length > 0
124-
? joinWithComma(policy.allowedContractAddresses)
130+
allowedContractAddresses && allowedContractAddresses.length > 0
131+
? joinWithComma(allowedContractAddresses)
125132
: null,
126133
allowedWallets:
127-
policy.allowedWallets && policy.allowedWallets?.length > 0
128-
? joinWithComma(policy.allowedWallets)
134+
allowedWallets && allowedWallets?.length > 0
135+
? joinWithComma(allowedWallets)
129136
: null,
130137
blockedWallets:
131-
policy.blockedWallets && policy.blockedWallets?.length > 0
132-
? joinWithComma(policy.blockedWallets)
138+
blockedWallets && blockedWallets?.length > 0
139+
? joinWithComma(blockedWallets)
133140
: null,
134141
bypassWallets:
135142
policy.bypassWallets && policy.bypassWallets?.length > 0
@@ -148,14 +155,13 @@ export function AccountAbstractionSettingsPage(
148155
},
149156
globalLimit: policy.limits?.global ?? null,
150157
allowedOrBlockedWallets:
151-
policy.allowedWallets && policy.allowedWallets?.length > 0
158+
allowedWallets && allowedWallets?.length > 0
152159
? "allowed"
153-
: policy.blockedWallets && policy.blockedWallets?.length > 0
160+
: blockedWallets && blockedWallets?.length > 0
154161
? "blocked"
155162
: null,
156-
}),
157-
[policy],
158-
);
163+
};
164+
}, [policy]);
159165

160166
const form = useForm<z.infer<typeof aaSettingsFormSchema>>({
161167
resolver: zodResolver(aaSettingsFormSchema),
@@ -212,11 +218,12 @@ export function AccountAbstractionSettingsPage(
212218

213219
const parsedValues: Omit<ProjectBundlerService, "name" | "actions"> =
214220
{
215-
allowedContractAddresses:
216-
values.allowedContractAddresses !== null
217-
? toArrFromList(values.allowedContractAddresses)
218-
: null,
219-
allowedChainIds: values.allowedChainIds,
221+
allowedContractAddresses: values.allowedContractAddresses
222+
? toArrFromList(values.allowedContractAddresses)
223+
: null,
224+
225+
// don't set null - `updateProject` API adds chainId 0 to the list if its null and makes it `[0]`
226+
allowedChainIds: values.allowedChainIds || [],
220227
allowedWallets:
221228
values.allowedOrBlockedWallets === "allowed" &&
222229
values.allowedWallets !== null

apps/playground-web/src/app/connect/pay/commerce/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ function BuyMerch() {
4444
Commerce
4545
</h2>
4646
<p className="max-w-[600px]">
47-
Take paymets from Fiat or Crypto directly to your seller wallet.
47+
Take payments from Fiat or Crypto directly to your seller wallet.
4848
<br />
4949
Get notified for every sale through webhooks, which lets you trigger
5050
any action you want like shipping physical goods, activating services

apps/playground-web/src/app/connect/sign-in/embed/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export const metadata: Metadata = {
99
metadataBase,
1010
title: "Sign In, Account Abstraction and SIWE Auth | thirdweb ConnectEmbed",
1111
description:
12-
"Let users sign up with their email, phone number, social media accounts or directly with a wallet. Seemlessly integrate account abstraction and SIWE auth.",
12+
"Let users sign up with their email, phone number, social media accounts or directly with a wallet. Seamlessly integrate account abstraction and SIWE auth.",
1313
};
1414

1515
export default function Page() {

apps/playground-web/src/app/connect/sign-in/headless/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export const metadata: Metadata = {
1010
metadataBase,
1111
title: "Sign In, Account Abstraction and SIWE Auth | thirdweb Connect",
1212
description:
13-
"Let users sign up with their email, phone number, social media accounts or directly with a wallet. Seemlessly integrate account abstraction and SIWE auth.",
13+
"Let users sign up with their email, phone number, social media accounts or directly with a wallet. Seamlessly integrate account abstraction and SIWE auth.",
1414
};
1515

1616
export default function Page() {

apps/portal/src/app/api/search/extraction/index.ts

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,8 @@ function extractPageLLMContent(
155155

156156
const htmlToMarkdown = new NodeHtmlMarkdown({
157157
keepDataImages: false,
158+
ignore: ["button"],
159+
maxConsecutiveNewlines: 2,
158160
});
159161

160162
let linksContent = "";
@@ -167,10 +169,7 @@ function extractPageLLMContent(
167169
let description = "";
168170
for (const p of paragraphs) {
169171
// skip noindex or no-llm paragraphs
170-
if (
171-
p.getAttribute("data-noindex") === "true" ||
172-
p.getAttribute("data-no-llm") === "true"
173-
) {
172+
if (p.closest("[data-noindex]") || p.closest("[data-no-llm]")) {
174173
continue;
175174
}
176175

@@ -180,7 +179,7 @@ function extractPageLLMContent(
180179
}
181180
}
182181

183-
linksContent += `* [${pageTitle}](${pageUrl}): ${description}`;
182+
linksContent += `* [${pageTitle}](${pageUrl}): ${description || `Reference for ${pageTitle}`}`;
184183

185184
// Remove noindex and no-llm elements
186185
const contentElements = main.querySelectorAll("*");
@@ -204,12 +203,18 @@ function extractPageLLMContent(
204203
// prefix all the relative links with the `https://portal.thirdweb.com`
205204
const links = main.querySelectorAll("a");
206205
for (const link of links) {
207-
const [path, hash] = link.getAttribute("href")?.split("#") || [];
208-
if (path?.startsWith("/")) {
209-
link.setAttribute(
210-
"href",
211-
`https://portal.thirdweb.com${path}${hash ? `#${hash}` : ""}`,
212-
);
206+
const href = link.getAttribute("href");
207+
if (href?.startsWith("/")) {
208+
link.setAttribute("href", `https://portal.thirdweb.com${href}`);
209+
}
210+
}
211+
212+
// prefix all relative image links with the `https://portal.thirdweb.com`
213+
const images = main.querySelectorAll("img");
214+
for (const image of images) {
215+
const src = image.getAttribute("src");
216+
if (src?.startsWith("/")) {
217+
image.setAttribute("src", `https://portal.thirdweb.com${src}`);
213218
}
214219
}
215220

apps/portal/src/app/connect/account-abstraction/batching-transactions/page.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export const metadata = createMetadata({
1212
description: "How to batch transactions with smart accounts",
1313
});
1414

15-
Batching transactions allows sending multiple transactions in a single user operation. This can be useful to save on fees, reduce number of user confimations or to ensure that multiple transactions are executed atomically.
15+
Batching transactions allows sending multiple transactions in a single user operation. This can be useful to save on fees, reduce number of user confirmations or to ensure that multiple transactions are executed atomically.
1616

1717
A typical example is to do an approval and a transfer in a single userOperation. This way, the transfer will only happen if the approval is successful.
1818

apps/portal/src/app/connect/page.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ Get started with Connect in your preferred language.
8383
- **Connect to 500+ different wallet providers** with support for every EVM network
8484
- **Log in and authenticate your users** with customizable and secure [email, phone, passkeys and social login](https://portal.thirdweb.com/connect/in-app-wallet/overview) flows.
8585
- **Sponsor transactions** to seamlessly onboard non-native or new crypto users with [Account Abstraction](https://portal.thirdweb.com/connect/account-abstraction/overview).
86-
- **Perform wallet actions** like connecting and disconnecting wallets, viewing balance, displaying ENS names, and execute transactions with our [perfomant, reliable and type safe API](https://portal.thirdweb.com/connect/blockchain-api)
86+
- **Perform wallet actions** like connecting and disconnecting wallets, viewing balance, displaying ENS names, and execute transactions with our [performant, reliable and type safe API](https://portal.thirdweb.com/connect/blockchain-api)
8787
- **Easily integrate with thirdweb's contracts** to enable users to interact with your application.
8888
- **Facilitate payments** by letting user top up their wallets or do onchain purchases with a credit card with [Pay](https://portal.thirdweb.com/connect/pay/overview).
8989

apps/portal/src/app/nebula/faqs/page.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ The context size or window is 128k tokens or approximately 96,000 words which ma
4646
Nebula is not currently open source. We are exploring open sourcing Nebula in the future.
4747
</Details>
4848

49+
<Details summary="Can Nebula be used in a stateless manner?">
50+
Depending on the use case, Nebula can be used in a stateless manner by not reusing the same session. Nebula learns from each session, so having more contextual requests will be beneficial and are recommended.
51+
</Details>
52+
4953
<Details summary="When will pricing be available for Nebula?">
5054
Pricing options will be available in beta. Nebula is still being tested in alpha.
5155
</Details>

apps/portal/src/app/nebula/mcp-server/integrations/claude-desktop/page.mdx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# Claude Desktop
22

3-
43
Learn how to add the MCP server to Claude Desktop:
54

65
1. Install the MCP: `pipx install thirdweb-mcp`

0 commit comments

Comments
 (0)