Skip to content

Commit 98aea1e

Browse files
authored
[Portal] Payments Docs (#7651)
1 parent 620e294 commit 98aea1e

File tree

195 files changed

+4381
-6439
lines changed

Some content is hidden

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

195 files changed

+4381
-6439
lines changed

apps/dashboard/src/@/components/chat/CustomChats.tsx

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -413,19 +413,15 @@ function StyledMarkdownRenderer(props: {
413413
}) {
414414
return (
415415
<MarkdownRenderer
416-
className="text-foreground [&>*:first-child]:mt-0 [&>*:first-child]:border-none [&>*:first-child]:pb-0 [&>*:last-child]:mb-0"
416+
className="[&>*:first-child]:mt-0 [&>*:first-child]:border-none [&>*:first-child]:pb-0 [&>*:last-child]:mb-0"
417417
code={{
418418
className: "bg-card",
419419
ignoreFormattingErrors: true,
420420
}}
421421
inlineCode={{ className: "border-none" }}
422-
li={{ className: "text-foreground" }}
423422
markdownText={props.text}
424423
p={{
425-
className:
426-
props.type === "assistant"
427-
? "text-foreground"
428-
: "text-foreground leading-normal",
424+
className: props.type === "assistant" ? "" : "leading-normal",
429425
}}
430426
skipHtml
431427
/>

apps/nebula/src/@/components/blocks/MarkdownRenderer/markdown-renderer.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,8 @@ export const MarkdownRenderer: React.FC<{
146146
li: ({ children: c, ...props }) => (
147147
<li
148148
className={cn(
149-
"mb-1.5 text-muted-foreground leading-loose [&>p]:m-0",
150149
markdownProps.li?.className,
150+
"mb-1.5 text-muted-foreground leading-loose [&>p]:m-0",
151151
)}
152152
{...cleanedProps(props)}
153153
>
@@ -156,16 +156,16 @@ export const MarkdownRenderer: React.FC<{
156156
),
157157
ol: (props) => (
158158
<ol
159-
className="mb-4 list-outside list-decimal pl-5 [&_ol_li:first-of-type]:mt-1.5 [&_ul_li:first-of-type]:mt-1.5"
160159
{...cleanedProps(props)}
160+
className="mb-4 list-outside list-decimal pl-5 [&_ol_li:first-of-type]:mt-1.5 [&_ul_li:first-of-type]:mt-1.5"
161161
/>
162162
),
163163

164164
p: (props) => (
165165
<p
166166
className={cn(
167-
"mb-4 text-muted-foreground leading-loose",
168167
markdownProps.p?.className,
168+
"mb-4 text-muted-foreground leading-loose",
169169
)}
170170
{...cleanedProps(props)}
171171
/>
@@ -200,8 +200,8 @@ export const MarkdownRenderer: React.FC<{
200200
ul: (props) => {
201201
return (
202202
<ul
203-
className="mb-4 list-outside list-disc pl-5 [&_ol_li:first-of-type]:mt-1.5 [&_ul_li:first-of-type]:mt-1.5"
204203
{...cleanedProps(props)}
204+
className="mb-4 list-outside list-disc pl-5 [&_ol_li:first-of-type]:mt-1.5 [&_ul_li:first-of-type]:mt-1.5"
205205
/>
206206
);
207207
},

apps/nebula/src/app/(app)/components/Chats.tsx

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -401,19 +401,15 @@ function StyledMarkdownRenderer(props: {
401401
}) {
402402
return (
403403
<MarkdownRenderer
404-
className="text-foreground [&>*:first-child]:mt-0 [&>*:first-child]:border-none [&>*:first-child]:pb-0 [&>*:last-child]:mb-0"
404+
className="[&>*:first-child]:mt-0 [&>*:first-child]:border-none [&>*:first-child]:pb-0 [&>*:last-child]:mb-0"
405405
code={{
406406
className: "bg-transparent",
407407
ignoreFormattingErrors: true,
408408
}}
409409
inlineCode={{ className: "border-none" }}
410-
li={{ className: "text-foreground" }}
411410
markdownText={props.text}
412411
p={{
413-
className:
414-
props.type === "assistant"
415-
? "text-foreground"
416-
: "text-foreground leading-normal",
412+
className: props.type === "assistant" ? "" : "leading-normal",
417413
}}
418414
skipHtml
419415
/>

apps/portal/public/llms-full.txt

Lines changed: 2556 additions & 210 deletions
Large diffs are not rendered by default.

apps/portal/public/llms.txt

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
---
66
**UI Components**
77
---
8-
# Universal Bridge
8+
# Payments
99
---
1010
## Widgets
1111
* [Widgets.BuyWidget](https://portal.thirdweb.com/references/typescript/v5/widgets/BuyWidget): Widget is a prebuilt UI for purchasing a specific token.
@@ -21,7 +21,6 @@
2121
* [WalletProvider](https://portal.thirdweb.com/references/typescript/v5/WalletProvider): A React context provider component that supplies Wallet-related data to its child components.
2222
---
2323
# Wallet Connection
24-
* [AutoConnectProps](https://portal.thirdweb.com/references/typescript/v5/AutoConnect): Enable Account abstraction for all wallets. This will connect to the users's smart account based on the connected personal wallet and the given options.
2524
* [ConnectButton](https://portal.thirdweb.com/references/typescript/v5/ConnectButton): A fully featured wallet connection component that allows to:
2625
* [ConnectEmbed](https://portal.thirdweb.com/references/typescript/v5/ConnectEmbed): An inline wallet connection component that allows to:
2726
* [SiteEmbed](https://portal.thirdweb.com/references/typescript/v5/SiteEmbed): Embeds another thirdweb-supported site for seamless in-app and ecosystem wallet connection.
@@ -135,7 +134,7 @@
135134
* [DEPLOY.deployERC1155Contract](https://portal.thirdweb.com/references/typescript/v5/deploy/deployERC1155Contract): Deploys an thirdweb ERC1155 contract of the given type. On chains where the thirdweb infrastructure contracts are not deployed, this function will deploy them as well.
136135
* [DEPLOY.deployERC20Contract](https://portal.thirdweb.com/references/typescript/v5/deploy/deployERC20Contract): Deploys an thirdweb ERC20 contract of the given type. On chains where the thirdweb infrastructure contracts are not deployed, this function will deploy them as well.
137136
* [DEPLOY.deployERC721Contract](https://portal.thirdweb.com/references/typescript/v5/deploy/deployERC721Contract): Deploys an thirdweb ERC721 contract of the given type. On chains where the thirdweb infrastructure contracts are not deployed, this function will deploy them as well.
138-
137+
* [DEPLOY.deployPackContract](https://portal.thirdweb.com/references/typescript/v5/deploy/deployPackContract): \[Pack contract is incompatible with Pectra update. Support for this contract is being removed in next release.\]
139138
* [DEPLOY.deployPublishedContract](https://portal.thirdweb.com/references/typescript/v5/deploy/deployPublishedContract): Deploy an instance of a published contract on a given chain
140139
* [DEPLOY.deploySplitContract](https://portal.thirdweb.com/references/typescript/v5/deploy/deploySplitContract): Deploys a thirdweb [Split contract](https://thirdweb.com/thirdweb.eth/Split)On chains where the thirdweb infrastructure contracts are not deployed, this function will deploy them as well.
141140
* [DEPLOY.prepareDeterministicDeployTransaction](https://portal.thirdweb.com/references/typescript/v5/deploy/prepareDeterministicDeployTransaction): Deploy a contract deterministically - will maintain the same address across chains. This is meant to be used with published contracts configured with the 'direct deploy' method. Under the hood, this uses a keyless transaction with a common create2 factory.
@@ -982,7 +981,7 @@
982981
* [TransferableERC721.setTransferable](https://portal.thirdweb.com/references/typescript/v5/transferableerc721/setTransferable): Prepares a transaction to call the "setTransferable" function on the contract.
983982
* [TransferableERC721.setTransferableFor](https://portal.thirdweb.com/references/typescript/v5/transferableerc721/setTransferableFor): Prepares a transaction to call the "setTransferableFor" function on the contract.
984983
---
985-
# Universal Bridge
984+
# Payments
986985
---
987986
## Buy
988987
* [Buy.prepare](https://portal.thirdweb.com/references/typescript/v5/buy/prepare): Prepares a _finalized_ Universal Bridge quote for the provided buy request with transaction data. This function will return everything `quote` does, with the addition of a series of prepared transactions and the associated expiration timestamp.
@@ -1029,6 +1028,7 @@
10291028
* [ERC7579.erc7579](https://portal.thirdweb.com/references/typescript/v5/erc7579): Config for a ERC7579 modular smart wallet.
10301029
---
10311030
# Wallet Connection
1031+
* [AutoConnectProps](https://portal.thirdweb.com/references/typescript/v5/AutoConnect): Enable Account abstraction for all wallets. This will connect to the users's smart account based on the connected personal wallet and the given options.
10321032
* [AutoConnect](https://portal.thirdweb.com/references/typescript/v5/autoConnect): AutoConnect last connected wallet on page reload or revisit. Note: If you are using `ConnectButton` or `ConnectEmbed` components, You don't need to use this component as it is already included.
10331033
---
10341034
# Wallet Utilities
@@ -1113,7 +1113,7 @@
11131113
* [getTransactions](https://portal.thirdweb.com/references/typescript/v5/getTransactions): Get transactions for a wallet
11141114
---
11151115
# Engine
1116-
* [createServerWallet](https://portal.thirdweb.com/references/typescript/v5/createServerWallet): Create a server wallet.
1116+
* [createServerWallet](https://portal.thirdweb.com/references/typescript/v5/createServerWallet): Create a new server wallet.
11171117
* [getServerWallets](https://portal.thirdweb.com/references/typescript/v5/getServerWallets): List all server wallets.
11181118
* [getTransactionStatus](https://portal.thirdweb.com/references/typescript/v5/getTransactionStatus): Get the execution status of a transaction.
11191119
* [searchTransactions](https://portal.thirdweb.com/references/typescript/v5/searchTransactions): Search for transactions by their ids.
@@ -1254,6 +1254,8 @@
12541254
* [installPublishedExtension](https://portal.thirdweb.com/references/typescript/v5/installPublishedExtension): Install a published extension on a dynamic contract
12551255
* [uninstallExtension](https://portal.thirdweb.com/references/typescript/v5/uninstallExtension): Uninstall an extension on a dynamic contract
12561256
* [activateStylusContract](https://portal.thirdweb.com/references/typescript/v5/activateStylusContract): Activate a stylus contract by calling ArbWasm Precompile
1257+
* [deployWithStylusConstructor](https://portal.thirdweb.com/references/typescript/v5/deployWithStylusConstructor): Deploy stylus contract with constructor params
1258+
* [isContractActivated](https://portal.thirdweb.com/references/typescript/v5/isContractActivated): Reference for isContractActivated
12571259
* [convertCryptoToFiat](https://portal.thirdweb.com/references/typescript/v5/convertCryptoToFiat): Get a price of a token (using tokenAddress + chainId) in fiat. Only USD is supported at the moment.
12581260
* [convertFiatToCrypto](https://portal.thirdweb.com/references/typescript/v5/convertFiatToCrypto): Convert a fiat value to a token. Currently only USD is supported.
12591261
* [getBuyHistory](https://portal.thirdweb.com/references/typescript/v5/getBuyHistory): Get Buy transaction history for a given wallet address.

apps/portal/redirects.mjs

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -711,6 +711,7 @@ const walletRedirects = {
711711
};
712712

713713
const paymentRedirects = {
714+
"/pay": "/payments",
714715
"/checkouts": "/payments",
715716
"/checkouts/api-reference": "/payments/nft-checkout/api-reference",
716717
"/checkouts/checkout-link": "/payments/nft-checkout/checkout-link",
@@ -741,7 +742,6 @@ const paymentRedirects = {
741742
"/connect/pay/buy-with-fiat": "/connect/pay/overview",
742743
"/connect/pay/enable-test-mode": "/connect/pay/guides/enable-test-mode",
743744
"/connect/pay/guides/enable-test-mode": "/connect/pay/testing-pay",
744-
"/payments/:match*": "/connect/pay/overview",
745745
};
746746

747747
const contractRedirects = {
@@ -921,7 +921,6 @@ const otherRedirects = {
921921
// connect
922922
"/connect/connect": "/connect/sign-in",
923923
"/connect/ecosystems/:path*": "/connect/wallet/overview",
924-
"/connect/embedded-wallet/:path*": "/connect/in-app-wallet/:path*",
925924
"/connect/embedded-wallet/how-to/get-embedded-wallet-details-on-server":
926925
"/connect/in-app-wallet/how-to/get-in-app-wallet-details-on-server",
927926
"/connect/in-app-wallet/how-to/get-in-app-wallet-details-on-server":
@@ -1016,11 +1015,23 @@ const otherRedirects = {
10161015
"/unity/wallets/providers/smart-wallet":
10171016
"/unity/wallets/providers/account-abstraction",
10181017
"/wallet/get-started/overview": "/connect/wallet/overview",
1019-
// wallets > connect redirects
1020-
"/wallets": "/connect",
1021-
"/wallets/auth/:path*": "/connect/auth/:path*",
1022-
"/wallets/connect/:path*": "/connect/connect/:path*",
1023-
"/wallets/embedded-wallet/:path*": "/connect/embedded-wallet/:path*",
1018+
// connect > wallets
1019+
"/connect/:path*": "/wallets/:path*",
1020+
"/connect/wallet/:path*": "/wallets/:path*",
1021+
"/connect/auth/:path*": "/wallets/auth/:path*",
1022+
"/connect/connect/:path*": "/wallets/connect/:path*",
1023+
"/connect/embedded-wallet/:path*": "/wallets/embedded-wallet/:path*",
1024+
"/connect/wallet/sign-in-methods/configure": "/wallets/users",
1025+
"/connect/wallet/server": "/wallets/server",
1026+
"/connect/account-abstraction/get-started": "/wallets/sponsor-gas",
1027+
"/connect/account-abstraction/:path*": "/wallets/sponsor-gas",
1028+
"/wallets/in-app-wallet/custom-auth/configuration": "/wallets/custom-auth",
1029+
"/connect/wallets/user-management/link-multiple-identity":
1030+
"/wallets/link-profiles",
1031+
"/connect/wallets/user-management/export-private-key":
1032+
"/wallets/export-private-key",
1033+
"/wallets/wallet/server": "/wallets/server",
1034+
"/wallets/wallet/sign-in-methods/configure": "/wallets/users",
10241035
// account abstraction rename
10251036
"/wallets/smart-wallet/:path*": "/connect/account-abstraction/:path*",
10261037
"/web3-api/:path*": "/infrastructure/engine/overview",

apps/portal/src/app/Header.tsx

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@ import { ThirdwebIcon } from "../icons/thirdweb";
3232

3333
const links = [
3434
{
35-
href: "/connect",
35+
href: "/wallets",
3636
name: "Wallets",
3737
},
3838
{
39-
href: "/pay",
39+
href: "/payments",
4040
name: "Payments",
4141
},
4242
{
@@ -196,9 +196,10 @@ const supportLinks = [
196196
export function Header() {
197197
const [showBurgerMenu, setShowBurgerMenu] = useState(false);
198198
const router = useRouter();
199+
const pathname = usePathname();
199200

200201
return (
201-
<header className="flex w-full flex-col gap-2 border-b bg-background p-2 lg:px-4">
202+
<header className="flex w-full flex-col gap-2 border-b bg-background pt-4 px-4 lg:px-8 overflow-hidden">
202203
<div className="container flex items-center justify-between gap-6">
203204
{/* Top row */}
204205
<div className="flex items-center gap-2">
@@ -273,7 +274,7 @@ export function Header() {
273274
{links.map((link) => {
274275
return (
275276
<li
276-
className="flex items-center"
277+
className="flex items-center py-4 relative overflow-hidden"
277278
key={link.href}
278279
onClick={() => {
279280
setShowBurgerMenu(false);
@@ -283,6 +284,9 @@ export function Header() {
283284
}}
284285
>
285286
<NavLink href={link.href} name={link.name} />
287+
{pathname.includes(link.href) && (
288+
<div className="bg-violet-700 h-1 inset-x-0.5 rounded-full absolute -bottom-0.5" />
289+
)}
286290
</li>
287291
);
288292
})}
@@ -506,7 +510,9 @@ function NavLink(props: {
506510
<Link
507511
className={clsx(
508512
"font-medium text-base transition-colors hover:text-foreground xl:text-sm",
509-
pathname === props.href ? "text-foreground" : "text-muted-foreground ",
513+
pathname.includes(props.href)
514+
? "text-foreground"
515+
: "text-muted-foreground",
510516
props.icon ? "flex flex-row gap-3" : "",
511517
)}
512518
href={props.href}
@@ -515,7 +521,7 @@ function NavLink(props: {
515521
>
516522
{props.icon ? (
517523
<>
518-
<props.icon className="size-6 text-muted-foreground" />
524+
<props.icon className="size-6" />
519525
<span className="my-auto">{props.name}</span>
520526
</>
521527
) : (

0 commit comments

Comments
 (0)