Compare commits

..
Author SHA1 Message Date
Joaquim VergesGitHubgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
4e6daac6dd Version Packages (#6972)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-05-07 16:03:49 -07:00
Joaquim VergesandGitHub 5f6403bb8d [SDK] Fix hex value handling for smart wallet execution (#6974) 2025-05-07 15:56:47 -07:00
saminaGitHubgraphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>Joaquim Verges
4c5fc839d6 New engine docs (#6951)
Signed-off-by: samina <[email protected]>
Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
Co-authored-by: Joaquim Verges <[email protected]>
2025-05-07 14:25:21 -07:00
Joe-ThirdwebandGitHub f6eff13492 [Dashboard]: Adding new assets forPlume chains (#6971) 2025-05-07 23:03:59 +02:00
omahsandGitHub ebbda37d5a Fix typos (#6970) 2025-05-07 23:03:11 +02:00
c81fed3617 [TOOL-3337] Dashboard: Engine cloud - DO NOT MERGE (#6639)
Co-authored-by: Prithvish Baidya <[email protected]>
Co-authored-by: Joaquim Verges <[email protected]>
2025-05-08 06:53:10 +12:00
MananTank ec50f8cc3c [NEB-231] Show Image response in Nebula, minor refactor (#6964)
<!--

## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes"

If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000):

## Notes for the reviewer

Anything important to call out? Be sure to also clarify these in your comments.

## How to test

Unit tests, playground, etc.

-->

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on enhancing the chat functionality in the `nebula-app` by introducing support for image messages and refactoring the message history structure. It also adds new components for image handling and feedback actions.

### Detailed summary
- Added `request_id` to action messages in `Chats.stories.tsx`.
- Introduced `NebulaSessionHistoryMessage` type in `types.ts`.
- Updated `history` in `SessionInfo` to use `NebulaSessionHistoryMessage`.
- Implemented image message handling in `chat.ts`.
- Refactored `promptNebula` to include `request_id`.
- Created `NebulaImage` component for rendering images.
- Added `MessageActions` component for user feedback.
- Refactored `ChatPageContent` to utilize new message parsing logic.
- Updated message rendering in `Chats` to support image types.
- Removed redundant code for message handling in `ChatPageContent`.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
2025-05-07 14:17:51 +00:00
Joaquim VergesGitHubgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
3315a53653 Version Packages (#6968)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-05-07 01:57:16 -07:00
Joaquim VergesandGitHub 4e42158c7b [SDK] Handle Hedera native currency decimals for smart wallet calls (#6969) 2025-05-07 01:54:43 -07:00
Joaquim VergesandGitHub 5a069fe657 [PayEmbed] Always connect to destination chain if available (#6967) 2025-05-06 19:05:12 -07:00
Joaquim VergesandGitHub 490497c68b [Checkout] Enhance redirect handling for different payment types (#6959) 2025-05-06 19:04:41 -07:00
Joaquim VergesGitHubgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
bdb4c31a6a Version Packages (#6966)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-05-06 18:34:04 -07:00
MananTank 171594d66a [NEB-237] Fix Nebula OG Image (#6965)
<!--

## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes"

If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000):

## Notes for the reviewer

Anything important to call out? Be sure to also clarify these in your comments.

## How to test

Unit tests, playground, etc.

-->

<!-- start pr-codex -->

---

## PR-Codex overview
This PR removes a block of code that redirects requests for the `nebula-app` path to a new URL format. This change likely simplifies the routing logic in the application.

### Detailed summary
- Removed the conditional block that checked if the first path was `nebula-app`.
- Deleted the logic to construct a new URL and redirect to `nebula.thirdweb.com`.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
2025-05-06 23:48:37 +00:00
Joaquim VergesandGitHub 760b250bc3 [SDK] Fix MetaMask deeplink parsing (#6963) 2025-05-06 16:48:19 -07:00
MananTank 669a95f983 Nebula: Context selection updates (#6961)
<!--

## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes"

If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000):

## Notes for the reviewer

Anything important to call out? Be sure to also clarify these in your comments.

## How to test

Unit tests, playground, etc.

-->

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on updating the wallet management system in the `Nebula` application. It enhances context handling, modifies wallet address management, and improves the integration of active accounts.

### Detailed summary
- Replaced `activeAccountAddress` with `selectedAddress` in multiple components.
- Updated context handling to use `setContext`.
- Enhanced `WalletSelector` to use the new `selectedAddress`.
- Refactored state management for context filters in `ChatPageContent`.
- Added memoization for context filters to optimize performance.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
2025-05-06 23:37:15 +00:00
Phillip HoandGitHub 928113bb0b chore: Support Engine Core and Webhook usage events (#6960) 2025-05-07 06:02:11 +07:00
gregandGitHub c8b8b2faad Fix: Adds checkout error boundary (#6962) 2025-05-06 14:41:26 -07:00
MananTank 9d40b13299 DX: Improved auto imports (#6950)
Taken from:

https://x.com/dillionverma/status/1917639091228926311
2025-05-06 10:51:30 +00:00
Joaquim VergesandGitHub bda0f3edb8 [Checkout] Add theme support and improve client configuration (#6958) 2025-05-06 03:31:56 -07:00
Joaquim VergesGitHubgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
dfa3ee0231 Version Packages (#6949)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-05-06 00:00:14 -07:00
gregandGitHub 3a100c98ef fix: hide common extension name (#6957) 2025-05-05 23:56:31 -07:00
gregandGitHub 08cff4b6c2 Feature: Adds chains function (#6956) 2025-05-05 23:46:56 -07:00
gregfromstl f2b4fe6727 Feature: Checkout page (#6954)
<!--

## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes"

If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000):

## Notes for the reviewer

Anything important to call out? Be sure to also clarify these in your comments.

## How to test

Unit tests, playground, etc.

-->

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on enhancing the checkout experience in the `dashboard` app by integrating analytics and improving the layout and structure of the checkout components.

### Detailed summary
- Removed a redirect from `"/checkout"` to `"/connect"` in `apps/dashboard/redirects.js`.
- Added `THIRDWEB_ANALYTICS_DOMAIN` to `urls.ts`.
- Created `Providers` component to wrap children with `ThirdwebProvider`.
- Enhanced `CheckoutLayout` with `ThemeProvider` and layout structure.
- Updated `CheckoutEmbed` to utilize new analytics domain and handle payment success.
- Implemented a new `RoutesPage` for handling checkout logic and parameters.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
2025-05-06 06:36:40 +00:00
gregandGitHub 6dd2b09450 [SDK] Feature: Adds sortBy to Bridge.routes (#6955) 2025-05-05 22:15:12 -07:00
gregandGitHub 736c3f8558 [SDK] Feature: Add maxSteps to bridge quote functions (#6953) 2025-05-05 20:25:54 -07:00
gregGitHubgraphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
055e451fd0 [Portal] Clean up UB docs (#6952)
Signed-off-by: greg <[email protected]>
Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
2025-05-05 19:46:38 -07:00
MananTank 2c6bd620b5 Dashboard: Remove unused assets (#6948)
<!--

## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes"

If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000):

## Notes for the reviewer

Anything important to call out? Be sure to also clarify these in your comments.

## How to test

Unit tests, playground, etc.

-->

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on the deletion of numerous asset files from the `apps/dashboard/public` directory and an update to the `logUnusedAssets.ts` script to adjust how asset file names are checked within the content.

### Detailed summary
- Deleted multiple asset files from `apps/dashboard/public/logos`, `apps/dashboard/public/assets`, and `apps/dashboard/public/assets/community/gallery`.
- Modified the `logUnusedAssets.ts` script:
  - Changed the condition to check for asset file names to include a leading slash: `if (content.includes(`/${assetFileName.name}`))`.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
2025-05-05 22:46:39 +00:00
MananTank 98e0cbdc71 [TOOL-4373] Dashboard: replace /team/~/~ with /team/<team-slug>/~ wherever possible (#6946)
<!--

## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes"

If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000):

## Notes for the reviewer

Anything important to call out? Be sure to also clarify these in your comments.

## How to test

Unit tests, playground, etc.

-->

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on enhancing the billing components in the dashboard by adding `teamSlug` as a prop to various components, allowing for better integration of team-specific billing information.

### Detailed summary
- Added `teamSlug` prop to `<CreditsInfoCard />` in `Billing/index.tsx`.
- Updated `<SmartWalletsBillingAlert />` to receive `teamSlug` in `AccountAbstractionPage.tsx`.
- Modified `CreditsInfoCard` to use `teamSlug` prop.
- Enhanced `SmartWalletsBillingAlert` to accept `teamSlug` as a prop.
- Passed `teamSlug` to the `href` in `SmartWalletsBillingAlert`.
- Included `teamSlug` in `CreditsItem` component.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
2025-05-05 22:46:39 +00:00
MananTank 1bc036ce6f Dashboard: Remove OPCreditsGrantedModal (#6945)
<!--

## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes"

If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000):

## Notes for the reviewer

Anything important to call out? Be sure to also clarify these in your comments.

## How to test

Unit tests, playground, etc.

-->

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on removing several components related to onboarding and image handling from the project, as well as updating the `layout.tsx` file to eliminate the use of the `OpCreditsGrantedModalWrapperServer` component.

### Detailed summary
- Deleted the following files:
  - `apps/dashboard/src/components/Image/index.tsx`
  - `apps/dashboard/public/assets/dashboard/confetti.gif`
  - `apps/dashboard/src/components/icons/brand-icons/OpenseaIcon.tsx`
  - `apps/dashboard/src/components/onboarding/OpCreditsGrantedModal.tsx`
  - `apps/dashboard/src/components/onboarding/OpCreditsGrantedModalWrapper.tsx`
  - `apps/dashboard/src/components/onboarding/OpCreditsGrantedModalWrapperServer.tsx`
- Removed the `<OpCreditsGrantedModalWrapperServer />` component from the `layout.tsx` file.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
2025-05-05 22:46:39 +00:00
MananTank 9f90b87c31 [TOOL-4366] Redirect /team to last visited team (#6938)
<!--

## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes"

If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000):

## Notes for the reviewer

Anything important to call out? Be sure to also clarify these in your comments.

## How to test

Unit tests, playground, etc.

-->

<!-- start pr-codex -->

---

## PR-Codex overview
This PR updates the team management functionality in the `TeamRootPage` component by replacing the method for retrieving the team with a new function that checks for the last visited team or defaults to a standard team. This improves user experience by remembering the last team visited.

### Detailed summary
- Replaced `getDefaultTeam` with `getLastVisitedTeamOrDefaultTeam` in `TeamRootPage`.
- Updated the condition to check if a team is available.
- Changed the redirect URL to use the slug of the newly retrieved `team`.
- Added `getLastVisitedTeamOrDefaultTeam` function in `team.ts` to handle team retrieval logic using cookies.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
2025-05-05 22:38:17 +00:00
MananTank e9d0b6e3d2 SDK: do not attempt autoconnect again if already successfull (#6900)
<!--

## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes"

If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000):

## Notes for the reviewer

Anything important to call out? Be sure to also clarify these in your comments.

## How to test

Unit tests, playground, etc.

-->

<!-- start pr-codex -->

---

## PR-Codex overview
This PR introduces a new `force` option for the auto-connect functionality in the `thirdweb` wallet, allowing users to force an auto-connect attempt even if a previous attempt was successful.

### Detailed summary
- Added `force` option to `AutoConnectProps` in `autoConnect.ts`.
- Updated `autoConnectCore` to respect the `force` option, allowing multiple connect attempts.
- Modified tests in `autoConnectCore.test.ts` to include the `force` option in various scenarios.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
2025-05-05 22:20:15 +00:00
GiselleNessi ee065b8d10 removed wrong link for connectButton theme (#6937)
<!--

## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes"

If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000):

## Notes for the reviewer

Anything important to call out? Be sure to also clarify these in your comments.

## How to test

Unit tests, playground, etc.

-->

<!-- start pr-codex -->

---

## PR-Codex overview
This PR updates the link for the `ConnectButton` component's theme documentation from Notion to the official Thirdweb portal, ensuring users have access to the most accurate and current information.

### Detailed summary
- Changed the link for the `ConnectButton` component's theme documentation from Notion to the official Thirdweb portal.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
2025-05-05 19:18:07 +00:00
GiselleNessi b17078b025 [Portal] removed nebula waitlist CTA (#6936)
<!--

## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes"

If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000):

## Notes for the reviewer

Anything important to call out? Be sure to also clarify these in your comments.

## How to test

Unit tests, playground, etc.

-->

<!-- start pr-codex -->

---

## PR-Codex overview
This PR updates the `page.mdx` file for the Nebula project, transitioning its status from Alpha to Beta and adding a new feature to encourage users to try the live version.

### Detailed summary
- Added `ArticleIconCard` component import from `@doc`.
- Changed status from Alpha to Beta.
- Introduced a new section with a `Stack` containing an `ArticleIconCard` to promote trying Nebula live.
- Updated the link in the `ArticleIconCard` to point to the live Nebula page.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
2025-05-05 19:13:45 +00:00
MananTank a4c9b28149 [TOOL-4374] Dashboard: Update Team name and slug validation (#6935)
<!--

## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes"

If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000):

## Notes for the reviewer

Anything important to call out? Be sure to also clarify these in your comments.

## How to test

Unit tests, playground, etc.

-->

<!-- start pr-codex -->

---

## PR-Codex overview
This PR introduces validation schemas for team slugs and names using `zod`, refactors the `TeamInfoForm` and `TeamGeneralSettingsPageUI` components to utilize these schemas, and enhances form handling and error messaging.

### Detailed summary
- Added `teamSlugSchema` and `teamNameSchema` for validation.
- Refactored `TeamInfoForm` to use `teamNameSchema` and `teamSlugSchema`.
- Updated form submission handling in `TeamInfoForm` and `TeamSlugFormControl`.
- Improved error handling and messaging for team name and slug inputs.
- Removed redundant validations and constants from `TeamInfoForm`.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
2025-05-05 18:23:28 +00:00
Joaquim VergesGitHubgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
96155016d1 Version Packages (#6920)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-05-04 15:51:41 -07:00
MananTank b08efa1778 Dashboard: Fix Nebula floating chat authToken query cache key (#6932)
<!--

## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes"

If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000):

## Notes for the reviewer

Anything important to call out? Be sure to also clarify these in your comments.

## How to test

Unit tests, playground, etc.

-->

<!-- start pr-codex -->

---

## PR-Codex overview
This PR enhances the `NebulaChatButton` component by adding an `isLoggedIn` prop across various instances, affecting its behavior based on user authentication. It also updates the `useNebulaAuthToken` hook to accept an `isLoggedIn` parameter, improving its functionality.

### Detailed summary
- Added `isLoggedIn` prop to `NebulaChatButton` in:
  - `layout.tsx` for chain page
  - `page.tsx` for support page
  - `layout.tsx` for contract page
- Updated `NebulaChatButton` to pass `isLoggedIn` to `NebulaChatUIContainer`.
- Modified `useNebulaAuthToken` to accept `isLoggedIn` and updated query key accordingly.
- Changed loading state check from `isPending` to `isFetching`.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
2025-05-03 09:39:12 +00:00
FirekeeperandGitHub 6745ba092c [SDK] force type 1 ronin+saigon (#6927) 2025-05-02 20:47:39 -07:00
MananTank 80bf795760 [TOOL-4292] Dashboard: Show Team selector page for '~' team slug (#6930)
<!--

## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes"

If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000):

## Notes for the reviewer

Anything important to call out? Be sure to also clarify these in your comments.

## How to test

Unit tests, playground, etc.

-->

<!-- start pr-codex -->

---

## PR-Codex overview
This PR removes a redirect feature for team paths in the `middleware.ts` file and introduces a new page component in `page.tsx` that allows users to select a team when they belong to multiple teams, enhancing the team selection experience.

### Detailed summary
- Removed redirect logic for `/team/~/...` paths in `middleware.ts`.
- Added a new page component in `page.tsx` for team selection.
- Implemented fetching of teams and authentication token using `Promise.all`.
- Included UI elements for displaying teams and their details.
- Introduced `createTeamLink` function to generate team-specific links.
- Utilized components like `GradientAvatar`, `TeamHeader`, and `AppFooter` for layout.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
2025-05-02 22:00:21 +00:00
MananTank 7ae174fed5 Dashboard: Update banner text (#6931)
<!--

## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes"

If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000):

## Notes for the reviewer

Anything important to call out? Be sure to also clarify these in your comments.

## How to test

Unit tests, playground, etc.

-->

<!-- start pr-codex -->

---

## PR-Codex overview
This PR updates the `label` prop of the `AnnouncementBannerUI` component to enhance the messaging about the Nebula App.

### Detailed summary
- Changed the `label` prop from "Nebula AI Beta is out and open to all" to "Announcing Nebula App — the most powerful AI for blockchains! Try it now!" in the `AnnouncementBannerUI` component.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
2025-05-02 20:33:25 +00:00
MananTank c803893a17 [TOOL-4347] Dashboard: Use Nebula auth token for nebula floating chat (#6928)
<!--

## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes"

If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000):

## Notes for the reviewer

Anything important to call out? Be sure to also clarify these in your comments.

## How to test

Unit tests, playground, etc.

-->

<!-- start pr-codex -->

---

## PR-Codex overview
This PR primarily focuses on enhancing the `NebulaChatButton` component by modifying authentication handling, improving the login process, and introducing a new method for managing the Nebula authentication token.

### Detailed summary
- Removed `authToken` from several components.
- Updated `doLogin` function to accept `loginPayload`.
- Introduced `getNebulaAuthToken` to manage token retrieval.
- Replaced `Suspense` with a new `ChatContent` component for better token handling.
- Added `useNebulaAuthToken` hook to fetch authentication token using React Query.
- Enhanced error handling and login flow in `doNebulaLogin`.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
2025-05-02 19:51:17 +00:00
MananTank 4839173d00 [TOOL-4354] Nebula: Configure erc20Value for swap prepared transaction (#6926)
<!--

## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes"

If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000):

## Notes for the reviewer

Anything important to call out? Be sure to also clarify these in your comments.

## How to test

Unit tests, playground, etc.

-->

<!-- start pr-codex -->

---

## PR-Codex overview
This PR introduces logic to handle transactions involving native tokens in the `SwapTransactionCardLayout` component. It determines if the transaction involves selling a native token and adjusts the transaction data accordingly.

### Detailed summary
- Added a constant `isSellingNativeToken` to check if the transaction involves selling the native token.
- Updated the transaction object to conditionally set `erc20Value` based on whether the native token is being sold.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
2025-05-02 15:04:48 +00:00
MananTank 1e82083a3c [NEB-229] Nebula: follow-up prompt improvements, preserve reasoning UI on error (#6925)
<!--

## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes"

If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000):

## Notes for the reviewer

Anything important to call out? Be sure to also clarify these in your comments.

## How to test

Unit tests, playground, etc.

-->

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on enhancing the `ChatPageContent` and `Chats` components by managing message handling and improving the logic for sending prompts based on the presence of subsequent messages.

### Detailed summary
- Removed logic to delete the last message if it is of type `presence` in `ChatPageContent.tsx`.
- Added `nextMessage` prop to `RenderMessage` in `Chats.tsx`.
- Updated `onTxSettled` to prevent sending prompts if the `nextMessage` is of type `action`.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
2025-05-02 14:56:24 +00:00
Joaquim VergesandGitHub 20d182b228 [Changeset] Optimize token query in PayEmbed with Insight (#6924) 2025-05-01 19:50:49 -07:00
Joaquim VergesandGitHub a96fa915cf [SDK] Optimize token balance fetching with Insight API (#6923) 2025-05-01 19:46:52 -07:00
Joaquim VergesandGitHub 4b58eca7c8 Update dependencies in pnpm-lock.yaml (#6921) 2025-05-01 16:53:05 -07:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
6e87370687 chore(deps-dev): bump vite from 6.3.2 to 6.3.4 in the npm_and_yarn group (#6909)
Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-01 16:41:31 -07:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>Joaquim Verges
465cf8c990 chore(deps): bump viem from 2.27.2 to 2.28.0 (#6882)
Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Joaquim Verges <[email protected]>
2025-05-01 16:33:20 -07:00
Joaquim VergesandGitHub 98cce77cf1 [SDK] Add ZERO_ADDRESS check to isNativeToken function (#6918) 2025-05-01 16:19:41 -07:00
Joaquim VergesandGitHub 5f0049f35f [Dashboard] Add teamId to fee management API calls (#6919) 2025-05-01 16:19:06 -07:00
MananTank 9a63cd4b57 [TOOL-4346] Dashboard: Show Project ID in project settings page (#6917)
<!--

## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes"

If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000):

## Notes for the reviewer

Anything important to call out? Be sure to also clarify these in your comments.

## How to test

Unit tests, playground, etc.

-->

<!-- start pr-codex -->

---

## PR-Codex overview
This PR introduces a new component, `ProjectIdCard`, to display the project ID in the `ProjectGeneralSettingsPage`. This component allows users to copy the project ID easily.

### Detailed summary
- Added `ProjectIdCard` component to display project ID.
- Integrated `ProjectIdCard` into `ProjectGeneralSettingsPage`.
- `ProjectIdCard` includes a `SettingsCard` with a title, description, and a `CopyTextButton` for copying the project ID.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
2025-05-01 22:55:35 +00:00
MananTank 004f3776cf [TOOL-4336] Dashboard: Fix contracts on custom chains not shown in contracts table (#6916)
<!--

## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes"

If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000):

## Notes for the reviewer

Anything important to call out? Be sure to also clarify these in your comments.

## How to test

Unit tests, playground, etc.

-->

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on refactoring the chain fetching functionality within the application. It renames and updates the `getChains` function to `getChainsForNebula`, introduces a new utility `fetchChainWithLocalOverrides`, and modifies various components to utilize these changes.

### Detailed summary
- Renamed `getChains` to `getChainsForNebula` in `getChainIds.ts`.
- Updated references to `getChains` in `page.tsx` and `login/page.tsx` to use `getChainsForNebula`.
- Introduced `fetchChainWithLocalOverrides` in `fetchChainWithLocalOverrides.ts`.
- Replaced `fetchChain` with `fetchChainWithLocalOverrides` in `getSortedDeployedContracts.tsx` and `getContractFromParams.ts`.
- Removed redundant local chain fetching logic from `getContractFromParams.ts`.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
2025-05-01 20:59:33 +00:00
Joaquim VergesGitHubgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
e197639b38 Version Packages (#6915)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-05-01 13:28:52 -07:00
Joaquim VergesandGitHub e23f53bd78 [SDK] Fix React Native exports (#6914) 2025-05-01 13:13:43 -07:00
MananTank ea1ec6b2b1 [NEB-69] Nebula: Add UI for Swap and Approve transactions (#6898)
<!--

## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes"

If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000):

## Notes for the reviewer

Anything important to call out? Be sure to also clarify these in your comments.

## How to test

Unit tests, playground, etc.

-->

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on refactoring transaction handling in the `Nebula` application, improving message types, and enhancing UI components for transaction approval and execution.

### Detailed summary
- Updated `TransactionButton` spacing from `gap-3` to `gap-2`.
- Changed message types from `"send_transaction"` to `"action"` with a `subtype`.
- Removed `InvalidTxData` story.
- Introduced `NebulaSwapData` type for better structure.
- Added `ApproveTransactionCard` and `SwapTransactionCard` components.
- Enhanced error handling in transaction processing.
- Updated `ExecuteTransactionCard` to use `useTxSetup` for transaction status management.
- Improved UI components for displaying transaction status and hashes.
- Refined `Chats` component to render messages based on new action types.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
2025-05-01 18:45:37 +00:00
MananTank 293b24638c Nebula: Update Reasoning UI: show only latest presence in pending state (#6913)
<!--

## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes"

If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000):

## Notes for the reviewer

Anything important to call out? Be sure to also clarify these in your comments.

## How to test

Unit tests, playground, etc.

-->

<!-- start pr-codex -->

---

## PR-Codex overview
This PR enhances the `Reasoning` component in the `Reasoning.tsx` file by improving the handling of text display based on the `isPending` prop, adding conditional rendering for showing all texts or just the last one.

### Detailed summary
- Added `showAll` variable to determine if all texts should be displayed.
- Introduced `lastText` to hold the last item from `props.texts`.
- Updated the rendering logic to conditionally show all texts or just the last one based on `showAll`.
- Changed `<span>` to `<span className="text-foreground">` for styling consistency.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
2025-05-01 18:10:39 +00:00
MananTank a31777283b [NEB-225] Fix Nebula new chat button link (#6912)
<!--

## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes"

If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000):

## Notes for the reviewer

Anything important to call out? Be sure to also clarify these in your comments.

## How to test

Unit tests, playground, etc.

-->

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on refactoring the chat application by removing the usage of `newChatPageUrlStore` and replacing it with layout segment navigation. It streamlines the chat page link logic and cleans up unused code related to session ID management.

### Detailed summary
- Removed `newChatPageUrlStore` from `stores.ts` and `useNewChatPageLink.ts`.
- Updated `useNewChatPageLink` to use `useSelectedLayoutSegment` for navigation.
- Removed session ID management logic from `ChatPageContent.tsx`.
- Cleaned up unused state and callback related to session ID.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
2025-05-01 18:00:34 +00:00
MananTank cef477d89d [NEB_224] Dashboard: Update Banner to Nebula beta launch (#6911)
<!--

## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes"

If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000):

## Notes for the reviewer

Anything important to call out? Be sure to also clarify these in your comments.

## How to test

Unit tests, playground, etc.

-->

<!-- start pr-codex -->

---

## PR-Codex overview
This PR updates the `AnnouncementBanner` component to promote the launch of "Nebula AI Beta" instead of the previous link to a payment playground.

### Detailed summary
- Changed `href` from "https://playground.thirdweb.com/connect/pay" to "https://nebula.thirdweb.com/"
- Updated `label` from "Let users pay with whatever they have without leaving your app" to "Nebula AI Beta is out and open to all"
- Modified `trackingLabel` from "ub-launch" to "nebula-beta-launch"

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
2025-05-01 16:58:59 +00:00
Joaquim VergesGitHubgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1980592ea3 Version Packages (#6908)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-05-01 04:07:59 -07:00
Joaquim VergesandGitHub 2dba042234 [SDK] Improve destination tokens error handling (#6910) 2025-05-01 04:00:36 -07:00
Joaquim VergesandGitHub c271ec6a4a [SDK] Update WalletConnect to v2.20.1 and improve PayEmbed funnel (#6906) 2025-05-01 03:39:51 -07:00
pink hoodie.andGitHub bca7d30801 Update examplePrompts.ts (#6905) 2025-05-01 00:27:00 -07:00
Joaquim VergesandGitHub 3f630a892b [Dashboard] Add coding standards and best practices documentation (#6901) 2025-05-01 00:25:22 -07:00
MananTank 818189e8e3 Nebula: Fix nebula auto connect (#6899)
<!--

## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes"

If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000):

## Notes for the reviewer

Anything important to call out? Be sure to also clarify these in your comments.

## How to test

Unit tests, playground, etc.

-->

<!-- start pr-codex -->

---

## PR-Codex overview
This PR modifies the `NebulaConnectButton` component by adding an `autoConnect` prop set to `false`, clarifying that an `AutoConnect` feature is already implemented at the root layout with an AA configuration.

### Detailed summary
- Added `autoConnect={false}` prop to the `NebulaConnectButton` component.
- Included a comment indicating that an `AutoConnect` is already present in the root layout with AA configuration.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
2025-04-30 22:56:56 +00:00
MananTank 730681890f Nebula: Set Beta badge in sidebar (#6897)
<!--

## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes"

If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000):

## Notes for the reviewer

Anything important to call out? Be sure to also clarify these in your comments.

## How to test

Unit tests, playground, etc.

-->

<!-- start pr-codex -->

---

## PR-Codex overview
This PR updates the text displayed within the `Badge` component in the `ChatSidebar.tsx` file, changing it from "Alpha" to "Beta".

### Detailed summary
- Changed the text inside the `Badge` component from `Alpha` to `Beta`.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
2025-04-30 20:46:51 +00:00
iuwqyir cd12ef799e remove otp from insight docs (#6896)
## [Portal] Fix: Remove webhook verification details from documentation

## Notes for the reviewer

This PR simplifies the webhooks documentation by removing detailed information about the webhook verification process, including OTP verification steps, URL updating requirements, and the API endpoints for verification and OTP resending.

## How to test

Review the updated documentation page to ensure it still provides clear information about the core webhook management functionality without the removed verification details.
2025-04-30 20:05:17 +00:00
MananTank 2832828b99 [TOOL-4294] Nebula: Improved Thinking message UI (#6889)
<!--

## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes"

If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000):

## Notes for the reviewer

Anything important to call out? Be sure to also clarify these in your comments.

## How to test

Unit tests, playground, etc.

-->

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on enhancing the chat application by introducing a new `TextShimmer` component, modifying message handling for `presence` types, and updating styles in the CSS and Tailwind configuration for improved visual effects.

### Detailed summary
- Updated `FloatingChatContent.tsx` to use `texts` instead of `text` for presence messages.
- Introduced `TextShimmer` component in `text-shimmer.tsx`.
- Modified `Reasoning` component to handle `texts` prop.
- Updated `Chats` component to render `Reasoning` for presence messages.
- Enhanced CSS with new background and color styles.
- Added `text-shimmer` animation in `tailwind.config.js`.
- Updated story definitions in `Reasoning.stories.tsx` and `Chats.stories.tsx`.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
2025-04-30 15:36:12 +00:00
Joaquim VergesGitHubgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
636788b9de Version Packages (#6873)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-04-29 16:29:54 -07:00
Joaquim VergesandGitHub 7684b768b0 [SDK] Change "pay with a debit card" to "pay with card" (#6891) 2025-04-29 14:36:46 -07:00
MananTank e03b622a09 Portal: Commit llms txt files, add logs in postbuild scripts (#6890)
<!--

## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes"

If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000):

## Notes for the reviewer

Anything important to call out? Be sure to also clarify these in your comments.

## How to test

Unit tests, playground, etc.

-->

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on enhancing error handling and logging in the `extractSearchData.ts` and `extractLLMData.ts` scripts, while also updating the content of the `llms.txt` file with new documentation.

### Detailed summary
- Added logging for successful extraction in `extractSearchData.ts` and `extractLLMData.ts`.
- Implemented error handling with `try-catch` blocks in both scripts.
- Updated `llms.txt` with new documentation content, including UI components, transactions, and hooks.

> The following files were skipped due to too many changes: `apps/portal/public/llms.txt`, `apps/portal/public/llms-full.txt`

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
2025-04-29 20:35:54 +00:00
MananTank 21e7bd314d Nebula: Add radial gradient on top (#6888)
<!--

## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes"

If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000):

## Notes for the reviewer

Anything important to call out? Be sure to also clarify these in your comments.

## How to test

Unit tests, playground, etc.

-->

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on enhancing the `EmptyStateChatPageContent` component by adding a new `showAurora` prop to control the display of an `Aurora` visual effect. It also adjusts the `isConnectingWallet` prop based on connection status and updates styles for better layout.

### Detailed summary
- Added `showAurora` prop to `EmptyStateChatPageContent` in multiple files.
- Updated `isConnectingWallet` logic based on connection status.
- Modified layout styles in `EmptyStateChatPageContent` for improved appearance.
- Introduced `Aurora` component with specific styles for visual effects.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
2025-04-29 20:25:10 +00:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
fa8a39e3a2 chore(deps): bump foundry-rs/foundry-toolchain from 1.3.1 to 1.4.0 (#6877)
Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-29 11:54:57 -07:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
51b496b76d chore(deps-dev): bump @types/swagger-ui-react from 4.19.0 to 5.18.0 (#6878)
Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-29 11:54:14 -07:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
6f6077f22b chore(deps): bump github/codeql-action from 3.28.15 to 3.28.16 (#6881)
Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-29 11:53:33 -07:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
f9422ef2a7 chore(deps): bump framer-motion from 12.5.0 to 12.9.2 (#6883)
Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-29 11:52:55 -07:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
777778981f chore(deps): bump fast-xml-parser from 5.2.0 to 5.2.1 (#6884)
Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-29 11:52:36 -07:00
MananTank 3b9a412458 [NEB-206] Nebula: UI element position tweaks in chat textarea (#6886)
<!--

## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes"

If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000):

## Notes for the reviewer

Anything important to call out? Be sure to also clarify these in your comments.

## How to test

Unit tests, playground, etc.

-->

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on enhancing the `MismatchButton` and `ChatBar` components in the dashboard by adding new props and improving wallet connection handling, including a spinner for pending connections and sorting wallets.

### Detailed summary
- Added `isPending` prop to `MismatchButton`.
- Updated `showSpinner` logic in `MismatchButton`.
- Removed redundant wallet selection logic from `ChatBar`.
- Introduced conditional rendering for `WalletSelector` and `Badge` in `ChatBar`.
- Added sorting for wallets in `WalletSelector` to prioritize the "smart" account.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
2025-04-29 10:51:16 +00:00
MananTank 7dbf0e70a3 [NEB-219] Nebula: Update theming (#6885)
<!--

## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes"

If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000):

## Notes for the reviewer

Anything important to call out? Be sure to also clarify these in your comments.

## How to test

Unit tests, playground, etc.

-->

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on enhancing the `Nebula` application by introducing a new color scheme, refining components, and improving accessibility. It adds a `nebula-pink` color variant, modifies component styles, and updates layouts for better user experience.

### Detailed summary
- Added `::selection` style in `nebula-global.css`.
- Introduced `nebula-pink` color variant in `tailwind.config.js`.
- Exported `useIsClientMounted` function in `ClientOnly.tsx`.
- Updated global CSS variables for `nebula-pink-foreground`.
- Modified button styles to utilize `nebula-pink`.
- Adjusted layout and component styles for better aesthetics and usability.
- Enhanced accessibility by refining header and button elements.
- Implemented a theme toggle button in `ChatSidebar`.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
2025-04-29 09:00:12 +00:00
MananTank bd9594d2a5 [TOOL-4309] Dashbaord: Fix stripe new tab not opening on mobile (#6879)
<!--

## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes"

If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000):

## Notes for the reviewer

Anything important to call out? Be sure to also clarify these in your comments.

## How to test

Unit tests, playground, etc.

-->

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on refactoring the billing-related functionalities and improving the loading and error handling components in the application. It removes unnecessary async functions for URL retrieval and replaces them with direct URL constructions.

### Detailed summary
- Removed async functions for `getBillingPortalUrl` and `getBillingCheckoutUrl`.
- Introduced `buildCheckoutUrl`, `buildCancelPlanUrl`, and `buildBillingPortalUrl` functions.
- Updated components to use the new URL-building functions.
- Enhanced loading and error handling components: `Loading`, `StripeRedirectErrorPage`.
- Simplified storybook components by removing unnecessary props.
- Updated billing-related components to reflect changes in URL handling.
- Cleaned up imports and removed unused variables related to billing URLs.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
2025-04-29 00:12:13 +00:00
Joaquim VergesandGitHub 0aadcd4434 [SDK] Show injected wallet icon when available (#6871) 2025-04-28 17:03:51 -07:00
MananTank c137dd653c [NEB-190] Set testnet flag on testnet pages in dashboard (#6875)
<!--

## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes"

If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000):

## Notes for the reviewer

Anything important to call out? Be sure to also clarify these in your comments.

## How to test

Unit tests, playground, etc.

-->

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on adding a `networks` property to various components and functions within the application, enhancing the context management for network-related data across the dashboard.

### Detailed summary
- Added `networks` property in `NebulaLoginPage.tsx`.
- Updated `NebulaChatButton` components in multiple files to accept `networks`.
- Modified context handling to include `networks` in session updates and chat functionalities.
- Adjusted `ChatBar` and `ChatPageContent` components to utilize `networks`.
- Enhanced API interactions in `session.ts` and `chat.ts` to handle `networks`.
- Updated storybook stories to reflect changes in context with `networks`.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
2025-04-28 16:53:32 +00:00
MananTank 65017f6f1a [TOOL-4120] Dashboard: Improved team switching UX, switch to same subpage (#6876)
<!--

## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes"

If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000):

## Notes for the reviewer

Anything important to call out? Be sure to also clarify these in your comments.

## How to test

Unit tests, playground, etc.

-->

<!-- start pr-codex -->

---

## PR-Codex overview
This PR introduces a new `isOnProjectPage` boolean prop across various components to enhance the handling of project-specific logic in the UI, particularly in team selection and header components.

### Detailed summary
- Added `isOnProjectPage` prop to `TeamSelectorMobileMenuButton`.
- Updated `TeamSelectionUI` to accept `isOnProjectPage` and utilize it for link generation.
- Modified link logic in `TeamSelectionUI` based on `isOnProjectPage`.
- Adjusted `AccountHeaderUI` and `TeamHeaderUI` to pass the new prop.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
2025-04-28 16:03:52 +00:00
kumaryash90 880650d148 Fix module deployment (#6869)
- Handle refs and metadata format (solc vs zksolc) for modules

<!--

## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes"

If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000):

## Notes for the reviewer

Anything important to call out? Be sure to also clarify these in your comments.

## How to test

Unit tests, playground, etc.

-->

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on fixing module deployment issues in the `thirdweb` package, particularly with references and zk (zero-knowledge) support. It modifies contract deployment utilities and enhances the fetching of published contracts.

### Detailed summary
- Updated the `getOrDeployInfraContractFromMetadata` function to simplify contract retrieval.
- Changed the deployment logic to use `deployContractfromDeployMetadata`.
- Enhanced `fetchPublishedContractsFromDeploy` to handle zkSync chains and fetch metadata appropriately.
- Added new types and improved error handling for contract metadata fetching.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
2025-04-28 08:27:22 +00:00
Joaquim VergesandGitHub fd91ee8dfe [SDK] Handle fixed size arrays in solidity inputs (#6870) 2025-04-28 01:00:27 -07:00
Joaquim VergesandGitHub e9069c9850 [RPC] Improve error message for failed requests (#6872) 2025-04-27 18:45:25 -07:00
Joaquim VergesGitHubgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
001e5102c9 Version Packages (#6851)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-04-26 04:19:03 -07:00
adcbec607f [SDK] Fix: Add custom title & icon to wagmi connectors (#6858)
Co-authored-by: Joaquim Verges <[email protected]>
2025-04-26 03:07:16 -07:00
joaquim-verges d43ad17e8b [Portal] Fix HTTP method in wallet users API example from POST to GET (#6868)
<!--

## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes"

If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000):

## Notes for the reviewer

Anything important to call out? Be sure to also clarify these in your comments.

## How to test

Unit tests, playground, etc.

-->

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on updating the documentation for fetching user details from the in-app wallet API, providing clearer instructions, examples, and a new method for retrieving user data.

### Detailed summary
- Changed the title from `Get Users` to `Fetch a Single User`.
- Added detailed instructions for fetching user details via a `GET` request.
- Specified query parameters and their descriptions.
- Included authentication requirements.
- Provided example `curl` commands for fetching user details by email and wallet address.
- Described the response format for the API.
- Introduced convenience methods using the `getUser` method from the thirdweb SDK.
- Updated the command for fetching all users from `POST` to `GET`.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
2025-04-26 09:15:12 +00:00
MananTank dbb782430a [TOOL-4291] Dashboard: Show recommended team members in invite section (#6867)
<!--

## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes"

If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000):

## Notes for the reviewer

Anything important to call out? Be sure to also clarify these in your comments.

## How to test

Unit tests, playground, etc.

-->

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on enhancing the team onboarding and member management features by introducing a `client` prop for API interactions, implementing recommended members functionality, and updating various components to utilize this new feature effectively.

### Detailed summary
- Added `client` prop to `InviteTeamMembers` and related components.
- Implemented `getRecommendedMembers` function to fetch recommended team members.
- Updated `TeamMembersSettingsPage` to display recommended members.
- Enhanced `InviteSection` to handle recommended members.
- Modified story files to include new client interactions and recommended members.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
2025-04-26 08:23:25 +00:00
MananTank 692c25ed83 Dashboard: Fix team invite UI not showing feedback on submit (#6866)
<!--

## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes"

If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000):

## Notes for the reviewer

Anything important to call out? Be sure to also clarify these in your comments.

## How to test

Unit tests, playground, etc.

-->

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on improving the `InviteSection` component by modifying the form handling logic and enhancing the user interface with additional functionality.

### Detailed summary
- Removed the `useEffect` hook that reset the mutation result on form updates.
- Changed the form's `onChange` to reset the mutation result if `sendInvites.data` exists.
- Updated the button layout to include a `Reset` button for clearing the form and resetting invites.
- Adjusted class names for better spacing and alignment.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
2025-04-25 21:55:27 +00:00
MananTank d568f8ff35 [NEB-192] Nebula: Add favicon (#6865)
<!--

## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes"

If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000):

## Notes for the reviewer

Anything important to call out? Be sure to also clarify these in your comments.

## How to test

Unit tests, playground, etc.

-->

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on adding a favicon to the `nebula-app` by linking the favicon file in the HTML head section.

### Detailed summary
- Added a `<link>` element to the `<head>` of the HTML to include the favicon located at `/assets/nebula/favicon.ico`.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
2025-04-25 20:18:13 +00:00
MananTank 7b0a213591 Nebula: Save auth token for 14d (#6864)
<!--

## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes"

If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000):

## Notes for the reviewer

Anything important to call out? Be sure to also clarify these in your comments.

## How to test

Unit tests, playground, etc.

-->

<!-- start pr-codex -->

---

## PR-Codex overview
This PR updates the session cookie expiration time from 3 days to 14 days by introducing a constant `FOURTEEN_DAYS_IN_SECONDS`. This change is reflected in multiple functions related to user login and session management.

### Detailed summary
- Added constant `FOURTEEN_DAYS_IN_SECONDS` set to `14 * 24 * 60 * 60`.
- Updated `maxAge` for cookies in `doNebulaLogin` to `FOURTEEN_DAYS_IN_SECONDS`.
- Updated `maxAge` for cookies in `isNebulaLoggedIn` to `FOURTEEN_DAYS_IN_SECONDS`.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
2025-04-25 19:43:03 +00:00
MananTank fee560a265 [NEB-196] Tx button improvements: hide switch chain and approve tx popovers when possible (#6863)
<!--

## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes"

If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000):

## Notes for the reviewer

Anything important to call out? Be sure to also clarify these in your comments.

## How to test

Unit tests, playground, etc.

-->

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on enhancing the `TransactionButton` and `MismatchButton` components by incorporating wallet connection status and improving transaction handling. It introduces logic for determining if a transaction requires external confirmation based on the connected wallets.

### Detailed summary
- Added `useConnectedWallets` to `TransactionButton`.
- Introduced `canSendTransactionWithoutConfirmation` function to check if a wallet can send transactions without confirmation.
- Removed `isGasless` prop from `TransactionButton`.
- Updated `MismatchButton` to include `isPending` prop.
- Added connection status handling in `MismatchButton`.
- Enhanced transaction handling based on network mismatch and wallet conditions.
- Implemented `canSwitchNetworkWithoutConfirmation` function to determine switching requirements.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
2025-04-25 19:43:03 +00:00
MananTank 2d27c4fce0 [NEB-215] Update transaction confirmation prompt (#6861)
<!--

## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes"

If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000):

## Notes for the reviewer

Anything important to call out? Be sure to also clarify these in your comments.

## How to test

Unit tests, playground, etc.

-->

<!-- start pr-codex -->

---

## PR-Codex overview
This PR updates the transaction message in the `Chats` component to use a new function for generating the prompt, enhancing clarity and consistency in user communication.

### Detailed summary
- Replaced the inline message in `onTxSettled` with a call to `getTransactionSettledPrompt`.
- Added the `getTransactionSettledPrompt` function, which formats a detailed success message for a settled transaction.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
2025-04-25 19:43:02 +00:00
MananTank 72628ef63c [NEB-191] Nebula, Dashboard: Reduce vertical spacing in markdown renderer (#6860)
<!--

## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes"

If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000):

## Notes for the reviewer

Anything important to call out? Be sure to also clarify these in your comments.

## How to test

Unit tests, playground, etc.

-->

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on refining the styling of various components in the dashboard application, enhancing visual consistency and layout adjustments.

### Detailed summary
- In `Chats.tsx`, removed a conditional class for the `assistant` type.
- In `ExecuteTransactionCard.tsx`, adjusted padding from `py-6` to `py-5`.
- In `markdown-renderer.tsx`, modified heading margins and added an `hr` element.
- Updated list margins in `MarkdownRenderer`.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
2025-04-25 19:43:02 +00:00
GiselleNessi 7087b3fcbc Dashboard: add nebula chat on support page, update CTAs (#6862)
<!--

## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes"

If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000):

## Notes for the reviewer

Anything important to call out? Be sure to also clarify these in your comments.

## How to test

Unit tests, playground, etc.

-->

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on enhancing the `FloatingChat` component by renaming it to `NebulaChatButton` and adding support for a new `support` page type. It also updates various components and their usage across the application to reflect this change.

### Detailed summary
- Renamed `NebulaFloatingChatButton` to `NebulaChatButton`.
- Added `support` as a new value for the `pageType` property.
- Updated imports and component usage to reflect the new name.
- Added `isFloating` prop to `NebulaChatButton`.
- Modified `SupportPage` to utilize `NebulaChatButton` for support inquiries.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
2025-04-25 19:34:39 +00:00
MananTank bb554e568d [NEB-211] Nebula: Hide tx button after transaction is confirmed (#6859)
<!--

## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes"

If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000):

## Notes for the reviewer

Anything important to call out? Be sure to also clarify these in your comments.

## How to test

Unit tests, playground, etc.

-->

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on enhancing the UI and functionality of the `ExecuteTransactionCard` component in the dashboard app. It includes visual improvements and adjustments to transaction handling.

### Detailed summary
- Updated the border styling for child elements in the main `div`.
- Changed text styles for labels (`From`, `To`, `Value`, `Status`, and `Transaction Hash`) to use `font-medium`.
- Added a conditional rendering for the footer based on transaction status.
- Improved transaction tracking event labels.
- Refactored the transaction submission logic for clarity.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
2025-04-25 16:03:10 +00:00
0xFirekeeper 90823ef3b8 [Portal] Update Unity Onchain Interactions link (#6857)
Closes TOOL-4290

<!-- start pr-codex -->

---

## PR-Codex overview
This PR updates the sidebar in the `sidebar.tsx` file, changing a menu item to better reflect its content.

### Detailed summary
- Changed the menu item name from `Full Reference` to `Contract Extensions`.
- Updated the `href` from `https://thirdweb-dev.github.io/dotnet/index.html` to `/dotnet/contracts/extensions`.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
2025-04-25 15:57:48 +00:00
MananTank 94949bc4b3 Nebula: Fix wallet address not set in context when clicking example prompt on login page (#6856)
<!--

## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes"

If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000):

## Notes for the reviewer

Anything important to call out? Be sure to also clarify these in your comments.

## How to test

Unit tests, playground, etc.

-->

<!-- start pr-codex -->

---

## PR-Codex overview
This PR enhances the `ChatPageContent` component by adding the `accountAddress` prop and updates various pages to retrieve and pass this new data. It ensures that both `authToken` and `accountAddress` are validated before proceeding.

### Detailed summary
- Added `accountAddress` prop to `ChatPageContent`.
- Updated `walletAddress` assignment to prioritize `props.accountAddress`.
- Modified `Page` components to fetch `accountAddress` using `getNebulaAuthTokenWalletAddress`.
- Updated authentication checks to validate both `authToken` and `accountAddress`.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
2025-04-25 14:57:29 +00:00
Joaquim VergesandGitHub 3825563d88 [Portal] Separate LLM content extraction from search data extraction (#6854) 2025-04-25 05:33:29 -07:00
Jonas DanielsandGitHub f0dce0ab22 Update plan tier hierarchy for sponsorship policies (#6853) 2025-04-25 10:48:14 +02:00
Manan TankandGitHub e28eb73894 SDK: Signature screen loading state improvements (#6849) 2025-04-25 01:42:02 +02:00
Toomas OosaluandGitHub 185a3cbe21 fix typo in insight docs (#6848) 2025-04-25 01:41:31 +02:00
Jonas DanielsandGitHub 473c9cc5b0 Add domain verification functionality for teams (#6850) 2025-04-25 01:41:09 +02:00
Joaquim VergesGitHubgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
9eab56fff2 Version Packages (#6847)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-04-24 15:06:24 -07:00
Manan TankandGitHub b6fdd0cc36 SDK: Remove @description tags from JSDoc (#6844) 2025-04-24 14:52:14 -07:00
Joaquim VergesandGitHub 31ce837b54 [SDK] Only update isLoggedIn state on successful logins (#6846) 2025-04-24 14:50:35 -07:00
GiselleNessi 68aa693b18 removed wallet connect coming soon title in portal docs (#6845)
<!--

## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes"

If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000):

## Notes for the reviewer

Anything important to call out? Be sure to also clarify these in your comments.

## How to test

Unit tests, playground, etc.

-->

<!-- start pr-codex -->

---

## PR-Codex overview
This PR updates the `page.mdx` file in the `faq` section of the `ecosystem` by modifying the mention of `WalletConnect` to reflect its new branding as `Reown` and clarifying the billing details without altering the content.

### Detailed summary
- Changed the heading from `WalletConnect (Coming Soon)` to `WalletConnect [(now Reown)](https://reown.com/)`.
- No content changes in the billing section, but ensured proper formatting by adding a newline at the end of the file.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
2025-04-24 21:03:35 +00:00
MananTank 270e53ccaf [TOOL-4280] Nebula: Send automatic msg after sent transaction is settled (#6843)
<!--

## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes"

If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000):

## Notes for the reviewer

Anything important to call out? Be sure to also clarify these in your comments.

## How to test

Unit tests, playground, etc.

-->

<!-- start pr-codex -->

---

## PR-Codex overview
This PR primarily focuses on enhancing the chat and transaction components by adding a `sendMessage` prop and handling transaction settlement events. It improves the interaction between components and provides better logging for transaction settlements.

### Detailed summary
- Added `sendMessage` prop to `FloatingChatContent` and `ChatPageContent`.
- Introduced `onTxSettled` callback in `ExecuteTransactionCard` and `ExecuteTransactionCardLayout`.
- Enhanced `Chats` component to utilize `sendMessage` for transaction confirmations.
- Implemented logging for transaction settlements in `ExecuteTransactionCard`.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
2025-04-24 19:41:15 +00:00
Toomas OosaluandGitHub 7809c6204e update insight playground nav (#6840) 2025-04-24 10:58:49 -07:00
Joaquim VergesGitHubgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
31e87b07a8 Version Packages (#6835)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-04-24 19:26:56 +02:00
Jonas DanielsandGitHub f2d0f119c1 Add webhooks capability to insight team capabilities (#6842) 2025-04-24 19:23:52 +02:00
saminacodes dc07fdd952 [Portal] removed glossary, added new articles, deprecated old pages (#6841)
CORE-0000

<!-- start pr-codex -->

---

## PR-Codex overview
This PR primarily focuses on the removal of various glossary-related files and the addition of new features and content in the sidebar navigation for different sections of the application.

### Detailed summary
- Deleted multiple `.mdx` files related to the glossary in `apps/portal/src/app/glossary/`.
- Updated sidebar navigation in `apps/portal/src/app/account/sidebar.tsx` to rename "API Keys" to "Projects" and added "Transfer Projects".
- Added new sidebar entry "Playground" in `apps/portal/src/app/engine/sidebar.tsx`.
- Enhanced `apps/portal/src/app/account/api-keys/transfer-projects/page.mdx` with steps for transferring projects, including images.
- Improved `apps/portal/src/app/connect/pay/fees/page.mdx` with detailed explanations of fees.
- Introduced `glossaryRedirects` in `apps/portal/redirects.mjs` for various glossary pages.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
2025-04-24 17:14:35 +00:00
MananTank 1d598ce907 Nebula: Use Nebula project keys (#6839)
<!--

## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes"

If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000):

## Notes for the reviewer

Anything important to call out? Be sure to also clarify these in your comments.

## How to test

Unit tests, playground, etc.

-->

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on updating the authentication and client configuration for the `Nebula` application by replacing the usage of the `DASHBOARD_THIRDWEB_SECRET_KEY` with `NEBULA_APP_SECRET_KEY`, and modifying the thirdweb client setup.

### Detailed summary
- Added `NEXT_PUBLIC_NEBULA_APP_CLIENT_ID` and `NEBULA_APP_SECRET_KEY` to `env.ts`.
- Replaced `nebulaThirdwebClient` with `nebulaAppThirdwebClient` in `EmptyStateChatPageContent.tsx`.
- Updated headers in `auth-actions.ts` to use `NEBULA_APP_SECRET_KEY`.
- Refactored `nebulaThirdwebClient.ts` to create a new client using `NEBULA_APP_SECRET_KEY` and `NEXT_PUBLIC_NEBULA_APP_CLIENT_ID`.
- Updated `NebulaConnectWallet` component to use `nebulaAppThirdwebClient`.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
2025-04-24 16:08:07 +00:00
MananTank f157e3484a [TOOL-4277] Dashboard: Update gated features (#6838)
<!--

## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes"

If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000):

## Notes for the reviewer

Anything important to call out? Be sure to also clarify these in your comments.

## How to test

Unit tests, playground, etc.

-->

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on enhancing the handling of team billing plans across various components in the application. It introduces new properties for better plan management and refines the UI elements related to billing features.

### Detailed summary
- Added `teamSlug` prop to several components for better context.
- Changed `validTeamPlan` to `teamPlan` in multiple files for consistency.
- Introduced `planToTierRecordForGating` to manage billing plans.
- Updated UI components to reflect new billing logic and props.
- Refactored `GatedSwitch` to utilize `currentPlan` and `requiredPlan`.
- Enhanced form handling in `InAppWalletSettingsUI` and other components to reflect billing plan changes.
- Renamed story exports for clarity in `GatedSwitch` stories.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
2025-04-24 14:50:39 +00:00
arcoraven d95b3d38c7 chore: Add unthreadCustomerId to TeamResponse (#6837)
<!-- start pr-codex -->

## PR-Codex overview
This PR focuses on adding a new property, `unthreadCustomerId`, to the `TeamResponse` structure across various files, enhancing the data model for teams in the application.

### Detailed summary
- Added `unthreadCustomerId: null` to the `TeamResponse` in `apps/dashboard/src/stories/stubs.ts`.
- Updated `validTeamAndProjectResponse` to include `unthreadCustomerId` in `packages/service-utils/src/mocks.ts`.
- Defined `unthreadCustomerId: string | null` in the `TeamResponse` interface in `packages/service-utils/src/core/api.ts`.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
2025-04-24 11:19:05 +00:00
Manan TankandGitHub b50b320144 [NEB-189] Nebula: Minor UI tweaks (#6831) 2025-04-24 01:20:18 -07:00
Joaquim VergesandGitHub 4c339363c0 [SDK] Always checksum Account.address (#6834) 2025-04-24 01:19:54 -07:00
Joaquim VergesGitHubgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
125cc972de Version Packages (#6833)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-04-23 20:07:15 -07:00
Joaquim VergesandGitHub 436750ed15 [SDK] Lazy import native dependencies in React Native (#6832) 2025-04-23 19:35:46 -07:00
Joaquim VergesGitHubgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
9cf5ba83e2 Version Packages (#6820)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-04-23 17:00:56 -07:00
Joaquim VergesandGitHub 33666aa8c5 [SDK] Optimize multi-event querying with indexer (#6822) 2025-04-23 16:36:10 -07:00
gregfromstl e526f75f22 [SDK] Feature: Update sdk bridge functions with new schema (#6830)
<!--

## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes"

If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000):

## Notes for the reviewer

Anything important to call out? Be sure to also clarify these in your comments.

## How to test

Unit tests, playground, etc.

-->

<!-- start pr-codex -->

---

## PR-Codex overview
This PR enhances the SDK Bridge functionality by standardizing parameter naming, introducing a `purchaseData` field, and improving quote structures with a `steps` array. It also updates API interactions to use JSON bodies for complex data.

### Detailed summary
- Standardized parameter naming: `buyAmountWei` and `sellAmountWei` changed to `amount`.
- Added optional `purchaseData` parameter to Buy and Sell functions.
- Introduced `steps` array in quotes for detailed transaction information.
- Enhanced status responses to include `purchaseData`.
- Updated API interactions to use JSON body instead of query parameters for prepare functions.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
2025-04-23 20:43:50 +00:00
Jonas DanielsandGitHub f912e42342 Add plan cancellation and re-subscription functionality (#6826) 2025-04-23 21:10:47 +02:00
MananTank fe46e81cd5 [TOOL-4248] Dashboard: Fix explore category page not showing contract cards (#6829)
<!--

## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes"

If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000):

## Notes for the reviewer

Anything important to call out? Be sure to also clarify these in your comments.

## How to test

Unit tests, playground, etc.

-->

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on updating the `ExploreCategoryPage` component in the `page.tsx` file to utilize a new client obtained from `getThirdwebClient` instead of passing it as a prop. This change simplifies the component's props and enhances its internal logic.

### Detailed summary
- Removed the `client` prop from `ExploreCategoryPageProps`.
- Introduced `const client = getThirdwebClient(undefined);` to obtain the client internally.
- Updated the `client` prop of the `ContractCard` component to use the newly defined `client` variable instead of `props.client`.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
2025-04-23 18:01:55 +00:00
jnsdls 525e60393f Add support for additional languages in Framer rewrites (#6828)
closes: TOOL-4244

# Add support for additional languages in Framer rewrites

This PR adds support for additional languages in the Framer rewrite paths. It introduces a new constant `FRAMER_ADDITIONAL_LANGUAGES` with Spanish ("es") as the initial additional language.

The rewrites configuration has been updated to:
- Keep the existing English paths
- Generate additional paths for each language in the format `/{lang}{path}`
- Direct these paths to the corresponding landing page URLs

This change enables proper routing for localized landing pages.
2025-04-23 16:17:06 +00:00
MananTank 4baefa5dae Dashboard: transfer tab disabled for owner of nft (#6827)
<!--

## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes"

If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000):

## Notes for the reviewer

Anything important to call out? Be sure to also clarify these in your comments.

## How to test

Unit tests, playground, etc.

-->

<!-- start pr-codex -->

---

## PR-Codex overview
This PR enhances the `useNFTDrawerTabs` function by improving the owner address comparison for NFTs. It now uses the `checksumAddress` utility to ensure that both the NFT owner and the account address are valid checksummed addresses before comparing them.

### Detailed summary
- Added import for `checksumAddress` from `thirdweb/utils`.
- Updated the owner address comparison in the `useNFTDrawerTabs` function to use `checksumAddress`.
- Ensured that both `accountAddress` and `nft.owner` are checked for validity before comparison.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
2025-04-23 13:20:53 +00:00
YashandGitHub b2e56f89fe Custom factory addr for Chiliz mainnet (#6824) 2025-04-23 14:36:53 +02:00
Manan TankandGitHub ec194a623e Dashboard: Fix login infinite loop on certain wallets (#6825) 2025-04-23 13:29:35 +02:00
YashandGitHub dc2e514e56 Deprecate pack (#6823) 2025-04-23 02:30:18 -07:00
Jonas DanielsandGitHub ec5362b84a Update dependencies and add atomicRequired option to sendCalls (#6786) 2025-04-23 01:25:24 -07:00
YashandGitHub 683e3b0838 Remove Pack from explore (#6781) 2025-04-23 01:18:11 -07:00
Joaquim VergesandGitHub 8b4b873317 [SDK] Add service key functionality for API requests (#6819) 2025-04-23 16:03:29 +12:00
Manan TankandGitHub 67a7d3e3a5 [NEB-6814] Nebula: move outside of app layout, connect to smart wallet on login (#6816) 2025-04-23 01:33:15 +02:00
Joaquim VergesGitHubgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
755e5d40ca Version Packages (#6787)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-04-23 00:09:29 +02:00
jnsdls a2f561f97b Update team plan pricing (#6818)
# Update Team Plan Pricing

This PR updates the pricing for all team plans:

- **Starter**: Increased from $5 to $9
- **Growth**: Increased from $75 to $79
- **Accelerate**: Decreased from $250 to $249
- **Scale**: Increased from $500 to $549
2025-04-22 22:01:34 +00:00
Joaquim VergesandGitHub 72a4ac5a98 [SDK] Remove minHeight constraint from TokenSelectorScreen (#6817) 2025-04-22 14:19:45 -07:00
Jonas DanielsandGitHub 69ec6e0553 Expose rateLimitSlidingWindow strategy for low-level usage (#6815) 2025-04-22 23:11:01 +02:00
MananTank 21cc01a0aa [NEB-180] Update Nebula context selection UI, add wallet switcher (#6814)
<!--

## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes"

If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000):

## Notes for the reviewer

Anything important to call out? Be sure to also clarify these in your comments.

## How to test

Unit tests, playground, etc.

-->

<!-- start pr-codex -->

---

## PR-Codex overview
This PR primarily focuses on enhancing the integration of the `ThirdwebClient` across various components in the application, enabling better management of blockchain interactions and improving the overall architecture for network handling.

### Detailed summary
- Removed `chainId` parameter from `auth-actions.ts`.
- Updated various components to include `client` prop for `ThirdwebClient`.
- Modified `ChainIconClient` to use `src` instead of `ipfsSrc`.
- Integrated `client` in `SingleNetworkSelector`, `MultiNetworkSelector`, and other related components.
- Enhanced `NebulaLoginPage` to handle multiple chains.
- Refactored `EmptyStateChatPageContent` to support wallet management.
- Updated story files to include `client` for testing.
- Removed obsolete code related to chain ID fetching.

> The following files were skipped due to too many changes: `apps/dashboard/src/app/nebula-app/(app)/components/ChatPageContent.tsx`, `apps/dashboard/src/@/components/blocks/multi-select.tsx`, `apps/dashboard/src/app/nebula-app/(app)/components/ChatBar.tsx`

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
2025-04-23 00:06:34 +05:30
MananTank c03734aea9 [TOOL-4230] Dashboard: Remove add coupon UI from team billing page (#6813)
<!--

## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes"

If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000):

## Notes for the reviewer

Anything important to call out? Be sure to also clarify these in your comments.

## How to test

Unit tests, playground, etc.

-->

<!-- start pr-codex -->

---

## PR-Codex overview
This PR primarily focuses on commenting out the coupon application UI components and related functionality in the `CouponsUI` component, indicating that the feature is disabled for now and will be revisited in the future.

### Detailed summary
- Commented out the entire `Dialog` component for applying coupons.
- Commented out the `applyCouponFormSchema` and its related form handling logic.
- Disabled the submission functionality for applying coupons.
- Added comments indicating that the coupon UI will be enabled later.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
2025-04-22 15:51:19 +00:00
MananTank 8da0c1fdcd [TOOL-4225] Dashboard: Show feedback on cancel transaction button click tool-4225 (#6812)
<!--

## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes"

If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000):

## Notes for the reviewer

Anything important to call out? Be sure to also clarify these in your comments.

## How to test

Unit tests, playground, etc.

-->

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on refactoring the `CancelTransactionButton` component to use `useMutation` from `@tanstack/react-query` for handling transaction cancellation, replacing the previous notification handling with `toast` for success and error messages.

### Detailed summary
- Added `useMutation` from `@tanstack/react-query`.
- Removed `useTxNotifications` and its related logic.
- Implemented `cancelTransactionMutation` for handling the cancellation request.
- Replaced the old `onClickContinue` function with `cancelTransactions` to manage async mutation.
- Updated the button to use `cancelTransactions` and reflect loading state.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
2025-04-22 13:00:22 +00:00
MananTank 8dc27ffcc4 [TOOL-4228] Dashboard: Add file upload for in-app wallet branding form tool-4228 (#6811)
<!--

## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes"

If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000):

## Notes for the reviewer

Anything important to call out? Be sure to also clarify these in your comments.

## How to test

Unit tests, playground, etc.

-->

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on enhancing the `BrandingFieldset` component by introducing an `AppImageFormControl` for managing application images, while also refining the handling of branding properties in the form.

### Detailed summary
- Added `Team` type import.
- Introduced `useThirdwebClient` and `resolveSchemeWithErrorHandler`.
- Modified `BrandingFieldset` to swap `applicationName` and `applicationImageUrl` fields.
- Created `AppImageFormControl` for image upload handling.
- Integrated image upload logic with error handling using `toast`.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
2025-04-22 12:46:48 +00:00
Jonas DanielsandGitHub f85163edee Add engineCloud plan capability to service-utils (#6793) 2025-04-22 11:43:13 +02:00
7965d93b7a [Dashboard] Add webhook version support to Universal Bridge (#6779)
Co-authored-by: gregfromstl <[email protected]>
2025-04-21 17:46:40 -07:00
Joaquim VergesandGitHub 4ccf06260b [SDK] Fix loading state in PayEmbed source tokens (#6778) 2025-04-21 16:36:02 -07:00
Jonas DanielsandGitHub d7dc83f9e6 jonas/core-825-update-dependencies (#6782) 2025-04-21 20:53:25 +02:00
gregandGitHub 9877176f65 [SDK] Fix: update bridge tests (#6785) 2025-04-21 11:09:02 -07:00
MananTank 67768ac375 [TOOL-4208] Dashboard: Transfer tab improvements/fixes (#6784)
<!--

## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes"

If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000):

## Notes for the reviewer

Anything important to call out? Be sure to also clarify these in your comments.

## How to test

Unit tests, playground, etc.

-->

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on enhancing the `TokenIdPage` components by adding `accountAddress` as a prop and updating several related functionalities to improve user experience and state management.

### Detailed summary
- Added `accountAddress` prop to `TokenIdPageClient` and `TokenIdPage`.
- Updated `Page` component to fetch `accountAddress` using `getAuthTokenWalletAddress`.
- Modified `TransferTab` to use `sendTxAndConfirm` for transaction handling.
- Updated ownership check in `useNFTDrawerTabs` to compare against `accountAddress`.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
2025-04-21 16:52:56 +00:00
MananTank 8937d5511e Dashboard: Fix table row not clickable in safari because of sticky thead (#6783)
<!--

## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes"

If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000):

## Notes for the reviewer

Anything important to call out? Be sure to also clarify these in your comments.

## How to test

Unit tests, playground, etc.

-->

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on updating the `className` property of the `<thead>` component in two files to simplify its styling.

### Detailed summary
- Updated `className` in `<thead>` component in `apps/dashboard/src/@/components/ui/table.tsx`:
  - Changed from a complex string with multiple classes to a simpler string: `"relative border-b bg-background"`.
- Applied the same change in `apps/playground-web/src/components/ui/table.tsx`.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
2025-04-21 16:21:38 +00:00
MananTank bf81deeb35 Dashboard: Fix Nebula card link in project FTUX (#6776)
<!--

## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes"

If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000):

## Notes for the reviewer

Anything important to call out? Be sure to also clarify these in your comments.

## How to test

Unit tests, playground, etc.

-->

<!-- start pr-codex -->

---

## PR-Codex overview
This PR updates the `href` property in the `ProjectFTUX` component to include the `projectSlug`, enhancing the link structure for better navigation within the application.

### Detailed summary
- Updated the `href` in the `ProjectFTUX` component from `/team/${props.teamSlug}/~/nebula` to `/team/${props.teamSlug}/${props.projectSlug}/nebula`.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
2025-04-18 23:14:25 +00:00
MananTank 25a7ad7eb9 [TOOL-4176] Dashboard: Add tracking to nebula floating chat (#6777)
<!--

## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes"

If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000):

## Notes for the reviewer

Anything important to call out? Be sure to also clarify these in your comments.

## How to test

Unit tests, playground, etc.

-->

<!-- start pr-codex -->

---

## PR-Codex overview
This PR enhances the `NebulaFloatingChatButton` and related components by introducing a `pageType` prop, allowing the chat functionality to differentiate between "chain" and "contract" contexts. It also integrates tracking events for user interactions.

### Detailed summary
- Added `pageType` prop to `NebulaFloatingChatButton`, `FloatingChatContent`, and `FloatingChatContentLoggedIn`.
- Updated the `label` for the chat button to reflect the context ("chain" or "contract").
- Integrated tracking events for button clicks and message sends, capturing the `pageType`.
- Adjusted rendering logic in `FloatingChatContent` to use the new `pageType` prop.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
2025-04-18 23:05:25 +00:00
MananTank ac8b09f35e Dashboard: Add team id to thirdweb client (#6775)
<!--

## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes"

If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000):

## Notes for the reviewer

Anything important to call out? Be sure to also clarify these in your comments.

## How to test

Unit tests, playground, etc.

-->

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on updating the usage of the `getThirdwebClient` function throughout the codebase, transitioning to using an options object that includes `jwt` and `teamId`. This change enhances client initialization consistency and improves the handling of team-related functionality.

### Detailed summary
- Updated `getThirdwebClient` to accept an options object with `jwt` and `teamId`.
- Modified several components to pass the new client structure.
- Added constants for `LAST_USED_PROJECT_ID` and `LAST_USED_TEAM_ID`.
- Enhanced various components to include `client` as a prop, improving flexibility.
- Adjusted several pages and components to handle team IDs better.
- Improved cookie management for storing and retrieving the last used team ID.
- Updated storybook examples to utilize the new client structure.

> The following files were skipped due to too many changes: `apps/dashboard/src/app/team/[team_slug]/(team)/~/usage/overview/components/SponsoredTransactionsTableUI.stories.tsx`, `apps/dashboard/src/app/(dashboard)/profile/[addressOrEns]/components/published-contracts.tsx`, `apps/dashboard/src/app/team/[team_slug]/[project_slug]/components/Transactions/index.tsx`, `apps/dashboard/src/components/configure-networks/ConfigureNetworkForm.tsx`, `apps/dashboard/src/components/contract-components/contract-table/index.tsx`, `apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/(chainPage)/page.tsx`, `apps/dashboard/src/app/(dashboard)/(bridge)/routes/components/server/routelist-card.tsx`, `apps/dashboard/src/app/(dashboard)/(bridge)/routes/components/server/routes-table.tsx`, `apps/dashboard/src/app/(dashboard)/profile/[addressOrEns]/page.tsx`, `apps/dashboard/src/app/(dashboard)/profile/[addressOrEns]/resolveAddressAndEns.tsx`, `apps/dashboard/src/app/team/components/TeamHeader/TeamSelectorMobileMenuButton.tsx`, `apps/dashboard/src/app/team/components/TeamHeader/TeamHeaderUI.stories.tsx`, `apps/dashboard/src/app/(dashboard)/contracts/deploy/[compiler_uri]/page.tsx`, `apps/dashboard/src/app/(dashboard)/(bridge)/routes/components/server/routelist-row.tsx`, `apps/dashboard/src/components/contract-components/contract-deploy-form/custom-contract.tsx`, `apps/dashboard/src/app/team/[team_slug]/(team)/~/settings/members/TeamMembersSettingsPage.stories.tsx`, `apps/dashboard/src/app/(dashboard)/published-contract/[publisher]/[contract_id]/page.tsx`, `apps/dashboard/src/components/contract-components/contract-publish-form/index.tsx`, `apps/dashboard/src/app/nebula-app/(app)/components/ExecuteTransactionCard.stories.tsx`, `apps/dashboard/src/lib/wallet/nfts/alchemy.ts`, `apps/dashboard/src/lib/wallet/nfts/moralis.ts`, `apps/dashboard/src/app/(dashboard)/contracts/publish/[publish_uri]/page.tsx`, `apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/_layout/metadata-header.tsx`, `apps/dashboard/src/app/team/components/TeamHeader/team-header-logged-in.client.tsx`, `apps/dashboard/src/components/contract-components/fetchPublishedContracts.ts`, `apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/getModuleInstalledParams.ts`, `apps/dashboard/src/app/nebula-app/(app)/components/Chats.stories.tsx`, `apps/dashboard/src/components/explore/contract-card/index.tsx`, `apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/(chainPage)/layout.tsx`, `apps/dashboard/src/app/(dashboard)/(chain)/chainlist/components/server/chainlist-row.tsx`, `apps/dashboard/src/app/(dashboard)/profile/[addressOrEns]/components/PublishedContractTable.tsx`, `apps/dashboard/src/app/(dashboard)/(chain)/chainlist/components/server/chainlist-card.tsx`, `apps/dashboard/src/app/(dashboard)/profile/[addressOrEns]/ProfileUI.tsx`, `apps/dashboard/src/components/contract-components/fetch-contracts-with-versions.ts`, `apps/dashboard/src/app/team/[team_slug]/(team)/layout.tsx`, `apps/dashboard/src/@/components/blocks/Avatars/ProjectAvatar.stories.tsx`, `apps/dashboard/src/app/(dashboard)/published-contract/components/publish-based-deploy.tsx`, `apps/dashboard/src/app/team/components/TeamHeader/team-header.tsx`, `apps/dashboard/src/app/team/[team_slug]/[project_slug]/components/Transactions/TransactionCharts.tsx`, `apps/dashboard/src/app/team/[team_slug]/[project_slug]/layout.tsx`, `apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/cross-chain/data-table.tsx`, `apps/dashboard/src/app/(dashboard)/published-contract/[publisher]/[contract_id]/utils/getPublishedContractsWithPublisherMapping.ts`, `apps/dashboard/src/app/(dashboard)/published-contract/[publisher]/[contract_id]/[version]/page.tsx`, `apps/dashboard/src/@/components/blocks/Avatars/GradientAvatar.stories.tsx`, `apps/dashboard/src/app/team/[team_slug]/[project_slug]/page.tsx`, `apps/dashboard/src/components/contract-components/hooks.ts`

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
2025-04-18 22:30:56 +00:00
GiandGitHub f7f179c771 updated top cta in playground (#6774) 2025-04-18 14:28:40 -07:00
MananTank d0bf3f3f5e [NEB-179] Nebula: Update context UI when context event type is received (#6770)
<!--

## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes"

If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000):

## Notes for the reviewer

Anything important to call out? Be sure to also clarify these in your comments.

## How to test

Unit tests, playground, etc.

-->

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on enhancing the `ChatSidebar`, `ChatPageContent`, and `FloatingChatContent` components by adding new properties and functionality related to context management and event handling within the chat application.

### Detailed summary
- Updated `<NebulaConnectWallet />` to accept `detailsButtonClassName` prop.
- Improved `code` component to handle class names and text length conditions.
- Added new event handling for "context" in the chat API.
- Extended `ChatStreamedResponse` and `ChatStreamedEvent` types to include "context" data.
- Integrated `setContextFilters` functionality in `ChatPageContent` and `FloatingChatContent` components.
- Refactored `contextFilters` state management in `FloatingChatContent`.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
2025-04-18 20:48:43 +00:00
MananTank 96689c6e2a [NEB-176] Nebula: Separate auth for nebula app, TransactionButton props cleanup (#6759)
<!--

## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes"

If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000):

## Notes for the reviewer

Anything important to call out? Be sure to also clarify these in your comments.

## How to test

Unit tests, playground, etc.

-->

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on refactoring the codebase to replace the usage of `twAccount` with `isLoggedIn` across various components, improving the handling of user authentication.

### Detailed summary
- Removed `twAccount` prop and replaced it with `isLoggedIn` in multiple components.
- Introduced new utility functions for managing Nebula authentication tokens.
- Updated related components to use the new authentication methods.
- Modified some UI elements for better clarity and consistency.

> The following files were skipped due to too many changes: `apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/[tokenId]/components/update-metadata-tab.tsx`, `apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/settings/components/royalties.tsx`, `apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/explorer/ContractExplorerPage.tsx`, `apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/accounts/components/create-account-button.tsx`, `apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/(marketplace)/english-auctions/components/table.tsx`, `apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/[tokenId]/components/claim-tab.tsx`, `apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/settings/components/primary-sale.tsx`, `apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/tokens/components/airdrop-button.tsx`, `apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/components/claim-button.tsx`, `apps/dashboard/src/app/nebula-app/(app)/page.tsx`, `apps/dashboard/src/app/components/EnsureValidConnectedWalletLogin/EnsureValidConnectedWalletLoginServer.tsx`, `apps/dashboard/src/app/nebula-app/(app)/chat/[session_id]/page.tsx`, `apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/proposals/components/proposal-button.tsx`, `apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/settings/components/platform-fees.tsx`, `apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/components/shared-metadata-button.tsx`, `apps/dashboard/src/components/contract-components/published-contract/index.tsx`, `apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/tokens/components/claim-button.tsx`, `apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/[tokenId]/token-id.tsx`, `apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/module-card.tsx`, `apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/tokens/components/airdrop-form.tsx`, `apps/dashboard/src/app/nebula-app/(app)/components/ExecuteTransactionCard.tsx`, `apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/[tokenId]/components/airdrop-tab.tsx`, `apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/(marketplace)/components/list-form.tsx`, `apps/dashboard/src/app/nebula-app/(app)/components/ChatPageLayout.stories.tsx`, `apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/[tokenId]/components/mint-supply-tab.tsx`, `apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/tokens/components/transfer-button.tsx`, `apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/royalty.stories.tsx`, `apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/(marketplace)/direct-listings/ContractDirectListingsPage.tsx`, `apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/components/reveal-button.tsx`, `apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/tokens/components/mint-button.tsx`, `apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/_components/claim-conditions/reset-claim-eligibility.tsx`, `apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/(marketplace)/english-auctions/ContractEnglishAuctionsPage.tsx`, `apps/dashboard/src/components/buttons/TransactionButton.tsx`, `apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/permissions/ContractPermissionsPage.tsx`, `apps/dashboard/src/app/layout.tsx`, `apps/dashboard/src/app/nebula-app/(app)/components/Chats.tsx`, `apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/mintable.stories.tsx`, `apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/components/batch-lazy-mint-button.tsx`, `apps/dashboard/src/components/contract-functions/contract-functions.tsx`, `apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/proposals/components/proposal.tsx`, `apps/dashboard/src/app/nebula-app/(app)/components/FloatingChat/FloatingChat.tsx`, `apps/dashboard/src/app/nebula-app/(app)/components/FloatingChat/FloatingChatContent.tsx`, `apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/(marketplace)/components/list-button.tsx`, `apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/split/components/distribute-button.tsx`, `apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/ContractEditModulesPage.tsx`, `apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/_components/claim-conditions/claim-conditions-form/index.tsx`, `apps/dashboard/src/app/nebula-app/(app)/layout.tsx`, `apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/proposals/ContractProposalsPage.tsx`, `apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/BatchMetadata.tsx`, `apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/OpenEditionMetadata.tsx`, `apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/(marketplace)/components/listing-drawer.tsx`, `apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/tokens/ContractTokensPage.tsx`, `apps/dashboard/src/app/login/verifyTurnstileToken.ts`, `apps/dashboard/src/components/contract-functions/contract-function.tsx`, `apps/dashboard/src/middleware.ts`, `apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/ContractNFTPage.tsx`, `apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/(chainPage)/components/client/FaucetButton.tsx`, `apps/dashboard/src/app/nebula-app/(app)/components/NebulaConnectButton.tsx`, `apps/dashboard/src/app/components/EnsureValidConnectedWalletLogin/EnsureValidConnectedWalletLoginClient.tsx`, `apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/[tokenId]/useNftDrawerTabs.tsx`, `apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/Mintable.tsx`, `apps/dashboard/src/app/nebula-app/login/NebulaLoginPage.tsx`, `apps/dashboard/src/app/login/auth-actions.ts`, `apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/settings/ContractSettingsPage.tsx`, `apps/dashboard/src/components/buttons/MismatchButton.tsx`, `apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/Claimable.tsx`, `apps/dashboard/src/app/nebula-app/(app)/components/ChatSidebar.tsx`, `apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/Royalty.tsx`, `apps/dashboard/src/app/nebula-app/login/NebulaConnectEmbedLogin.tsx`, `apps/dashboard/src/app/nebula-app/login/auth-actions.ts`

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
2025-04-18 20:48:43 +00:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
0c5c918b21 chore(deps): bump codecov/codecov-action from 5.4.0 to 5.4.2 (#6726)
Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-18 20:41:00 +02:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
e1763e216a chore(deps): bump github/codeql-action from 3.28.11 to 3.28.15 (#6725)
Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-18 20:40:50 +02:00
Joaquim VergesGitHubgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
309d8f81a9 Version Packages (#6772)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-04-18 20:36:57 +02:00
Jonas DanielsandGitHub 9d72ddd604 Allow passing team ID explicitly via request headers (#6771) 2025-04-18 20:33:38 +02:00
MananTank 17b83686e4 Dashboard: Improve Progress bar implmentation with useTransition hook (#6769)
<!--

## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes"

If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000):

## Notes for the reviewer

Anything important to call out? Be sure to also clarify these in your comments.

## How to test

Unit tests, playground, etc.

-->

<!-- start pr-codex -->

---

## PR-Codex overview
This PR refines the `useDashboardRouter` functionality by implementing a progress bar during route transitions and removing the use of `LoadingRouteHref`. It introduces `RouteStartTransitionFn` for managing transition states and modifies the `DashboardRouterTopProgressBar` to reflect these changes.

### Detailed summary
- Removed `usePathname` and `useSearchParams` from `useRouterLoadingStatus`.
- Replaced `LoadingRouteHref` with `RouteStartTransitionFn` for managing transition states.
- Updated `replace` and `push` methods in `useDashboardRouter` to use `startTransition`.
- Refactored `DashboardRouterTopProgressBarInner` to use `isRouteLoading`.
- Adjusted progress bar visibility and state management based on `isRouteLoading`.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
2025-04-18 16:12:06 +00:00
1458 changed files with 86100 additions and 9707 deletions
+103
View File
@@ -0,0 +1,103 @@
---
description: Rules for writing features in apps/dashboard
globs: dashboard
alwaysApply: false
---
# Reusable Core UI Components
- Always import from the central UI library under `@/components/ui/*` – e.g. `import { Button } from "@/components/ui/button"`.
- Prefer composable primitives over custom markup: `Button`, `Input`, `Select`, `Tabs`, `Card`, `Sidebar`, `Separator`, `Badge`.
- Use `NavLink` (`@/components/ui/NavLink`) for internal navigation so active states are handled automatically.
- Layouts should reuse `SidebarLayout` / `FullWidthSidebarLayout` (`@/components/blocks/SidebarLayout`).
- For notices & skeletons rely on `AnnouncementBanner`, `GenericLoadingPage`, `EmptyStateCard`.
- Icons come from `lucide-react` or the project-specific `…/icons` exports – never embed raw SVG.
- Group related components in their own folder and expose a single barrel `index.ts` where necessary.
- Keep components pure; fetch data outside (server component or hook) and pass it down via props.
# Styling
- Tailwind CSS is **the** styling system – avoid inline styles or CSS modules.
- Merge class names with `cn` from `@/lib/utils` to keep conditional logic readable.
- Stick to design-tokens: background (`bg-card`), borders (`border-border`), muted text (`text-muted-foreground`) etc.
- Use the `container` class with a `max-w-7xl` cap for page width consistency.
- Spacing utilities (`px-*`, `py-*`, `gap-*`) are preferred over custom margins.
- Responsive helpers follow mobile-first (`max-sm`, `md`, `lg`, `xl`).
- Never hard-code colors – always go through Tailwind variables.
- Add `className` to the root element of every component for external overrides.
# Creating a new Component
- Place the file close to its feature: `feature/components/MyComponent.tsx`.
- Name files after the component in **PascalCase**; append `.client.tsx` when interactive.
- Client components must start with `'use client';` before imports.
- Accept a typed `props` object and export a **named** function (`export function MyComponent()`).
- Reuse core UI primitives; avoid re-implementing buttons, cards, modals.
- Combine class names via `cn`, expose `className` prop if useful.
- Local state or effects live inside; data fetching happens in hooks.
- Provide a Storybook story (`MyComponent.stories.tsx`) or unit test alongside the component.
# When to use Server Side Rendering (Server Components)
- Reading cookies/headers with `next/headers` (`getAuthToken()`, `cookies()`).
- Accessing server-only environment variables or secrets.
- Heavy data fetching that should not ship to the client (e.g. analytics, billing).
- Redirect logic using `redirect()` from `next/navigation`.
- Building layout shells (`layout.tsx`) and top-level pages that mainly assemble data.
- Export default async functions without `'use client';` – they run on the Node edge.
- Co-locate data helpers under `@/api/**` and mark them with `"server-only"`.
# When to use Client Side Rendering (Client Components)
- Interactive UI that relies on hooks (`useState`, `useEffect`, React Query, wallet hooks).
- Components that listen to user events, animations or live updates.
- When you need access to browser APIs (localStorage, window, IntersectionObserver etc.).
- Pages requiring fast transitions where data is prefetched on the client.
- Anything that consumes hooks from `@tanstack/react-query` or thirdweb SDKs.
# Fetching Authenticated Data – Server
```ts
import "server-only";
import { API_SERVER_URL } from "@/constants/env";
import { getAuthToken } from "@/app/(app)/api/lib/getAuthToken";
export async function getProjects(teamSlug: string) {
const token = await getAuthToken();
if (!token) return [];
const res = await fetch(`${API_SERVER_URL}/v1/teams/${teamSlug}/projects`, {
headers: { Authorization: `Bearer ${token}` },
});
return res.ok ? (await res.json()).result : [];
}
```
Guidelines:
- Always call `getAuthToken()` to get the JWT from cookies.
- Prefix files with `import "server-only";` so they never end up in the client bundle.
- Pass the token in the `Authorization: Bearer` header – never embed it in the URL.
- Return typed results (`Project[]`, `User[]`, …) – avoid `any`.
# Fetching Authenticated Data – Client
```ts
import { useQuery } from "@tanstack/react-query";
import { fetchJson } from "@/lib/fetch-json";
export function useProjects(teamSlug: string) {
return useQuery({
queryKey: ["projects", teamSlug],
queryFn: () => fetchJson(`/api/projects?team=${teamSlug}`), // internal API route handles token
staleTime: 60_000,
});
}
```
Guidelines:
- Use **React Query** (`@tanstack/react-query`) for all client data fetching.
- Create light wrappers (e.g. `fetchJson`) that automatically attach the JWT from cookies/session when calling internal API routes.
- Keep `queryKey` stable and descriptive for cache hits.
- Prefer API routes or server actions to keep tokens secret; the browser only sees relative paths.
- Configure `staleTime` / `cacheTime` according to freshness requirements.
+2 -2
View File
@@ -81,7 +81,7 @@ jobs:
uses: ./.github/composite-actions/install
- name: Set up foundry
uses: foundry-rs/foundry-toolchain@de808b1eea699e761c404bda44ba8f21aba30b2c # v1.3.1
uses: foundry-rs/foundry-toolchain@82dee4ba654bd2146511f85f0d013af94670c4de # v1.4.0
with:
cache: false
version: nightly-c4a984fbf2c48b793c8cd53af84f56009dd1070c
@@ -89,7 +89,7 @@ jobs:
- run: pnpm test
- name: Code Coverage
uses: codecov/codecov-action@0565863a31f2c772f9f0395002a31e3f06189574 # v5.4.0
uses: codecov/codecov-action@ad3126e916f78f00edff4ed0317cf185271ccc2d # v5.4.2
with:
directory: packages/
flags: packages
+3 -3
View File
@@ -46,7 +46,7 @@ jobs:
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@6bb031afdd8eb862ea3fc1848194185e076637e5 # v3.28.11
uses: github/codeql-action/init@28deaeda66b76a05916b6923827895f2b14ab387 # v3.28.16
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -59,7 +59,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@6bb031afdd8eb862ea3fc1848194185e076637e5 # v3.28.11
uses: github/codeql-action/autobuild@28deaeda66b76a05916b6923827895f2b14ab387 # v3.28.16
# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
@@ -72,4 +72,4 @@ jobs:
# ./location_of_script_within_repo/buildscript.sh
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@6bb031afdd8eb862ea3fc1848194185e076637e5 # v3.28.11
uses: github/codeql-action/analyze@28deaeda66b76a05916b6923827895f2b14ab387 # v3.28.16
+2 -1
View File
@@ -30,4 +30,5 @@ packages/*/typedoc/*
storybook-static
.aider*
tsconfig.tsbuildinfo
tsconfig.tsbuildinfo
.cursor
+6
View File
@@ -9,6 +9,12 @@
"typescript.preferences.autoImportFileExcludePatterns": [
"./packages/thirdweb/src/exports"
],
"typescript.preferences.autoImportSpecifierExcludeRegexes": [
"@radix-ui",
"next/router",
"next/dist",
"^lucide-react/dist/lucide-react.suffixed$"
],
"typescript.tsdk": "node_modules/typescript/lib",
"[typescriptreact]": {
"editor.defaultFormatter": "biomejs.biome"
+5 -1
View File
@@ -104,4 +104,8 @@ ANALYTICS_SERVICE_URL=""
NEXT_PUBLIC_NEBULA_URL=""
# required for billing parts of the dashboard (team -> settings -> billing / invoices)
STRIPE_SECRET_KEY=""
STRIPE_SECRET_KEY=""
# required for server wallet management
NEXT_PUBLIC_THIRDWEB_VAULT_URL=""
NEXT_PUBLIC_ENGINE_CLOUD_URL=""
+1
View File
@@ -12,6 +12,7 @@
"ignoreDependencies": [
"@storybook/blocks",
"@thirdweb-dev/service-utils",
"@thirdweb-dev/vault-sdk",
"@types/color",
"fast-xml-parser"
]
+3
View File
@@ -0,0 +1,3 @@
declare module "lucide-react" {
export * from "lucide-react/dist/lucide-react.suffixed";
}
+15 -4
View File
@@ -111,6 +111,9 @@ const SENTRY_OPTIONS: SentryBuildOptions = {
automaticVercelMonitors: false,
};
// add additional languages to the framer rewrite paths here (english is already included by default)
const FRAMER_ADDITIONAL_LANGUAGES = ["es"];
const baseNextConfig: NextConfig = {
eslint: {
ignoreDuringBuilds: true,
@@ -155,10 +158,18 @@ const baseNextConfig: NextConfig = {
source: "/home",
destination: "https://landing.thirdweb.com",
},
...FRAMER_PATHS.map((path) => ({
source: path,
destination: `https://landing.thirdweb.com${path}`,
})),
// flatmap the framer paths for the default language and the additional languages
...FRAMER_PATHS.flatMap((path) => [
{
source: path,
destination: `https://landing.thirdweb.com${path}`,
},
// this is for additional languages
...FRAMER_ADDITIONAL_LANGUAGES.map((lang) => ({
source: `/${lang}${path}`,
destination: `https://landing.thirdweb.com/${lang}${path}`,
})),
]),
];
},
images: {
+36 -34
View File
@@ -29,27 +29,29 @@
"@emotion/styled": "11.14.0",
"@hookform/resolvers": "^3.9.1",
"@marsidev/react-turnstile": "^1.1.0",
"@radix-ui/react-accordion": "^1.2.4",
"@radix-ui/react-alert-dialog": "^1.1.7",
"@radix-ui/react-avatar": "^1.1.4",
"@radix-ui/react-checkbox": "^1.1.5",
"@radix-ui/react-dialog": "1.1.7",
"@radix-ui/react-dropdown-menu": "^2.1.7",
"@radix-ui/react-hover-card": "^1.1.7",
"@radix-ui/react-label": "^2.1.3",
"@radix-ui/react-popover": "^1.1.7",
"@radix-ui/react-progress": "^1.1.3",
"@radix-ui/react-radio-group": "^1.2.4",
"@radix-ui/react-select": "^2.1.7",
"@radix-ui/react-separator": "^1.1.3",
"@radix-ui/react-accordion": "^1.2.7",
"@radix-ui/react-alert-dialog": "^1.1.10",
"@radix-ui/react-avatar": "^1.1.6",
"@radix-ui/react-checkbox": "^1.2.2",
"@radix-ui/react-dialog": "1.1.10",
"@radix-ui/react-dropdown-menu": "^2.1.11",
"@radix-ui/react-hover-card": "^1.1.10",
"@radix-ui/react-label": "^2.1.4",
"@radix-ui/react-popover": "^1.1.10",
"@radix-ui/react-progress": "^1.1.4",
"@radix-ui/react-radio-group": "^1.3.3",
"@radix-ui/react-select": "^2.2.2",
"@radix-ui/react-separator": "^1.1.4",
"@radix-ui/react-slot": "^1.2.0",
"@radix-ui/react-switch": "^1.1.4",
"@radix-ui/react-tooltip": "1.2.0",
"@sentry/nextjs": "9.12.0",
"@radix-ui/react-switch": "^1.2.2",
"@radix-ui/react-tooltip": "1.2.3",
"@scalar/api-reference-react": "^0.6.19",
"@sentry/nextjs": "9.13.0",
"@shazow/whatsabi": "0.21.0",
"@tanstack/react-query": "5.72.1",
"@tanstack/react-table": "^8.21.2",
"@tanstack/react-query": "5.74.4",
"@tanstack/react-table": "^8.21.3",
"@thirdweb-dev/service-utils": "workspace:*",
"@thirdweb-dev/vault-sdk": "workspace:*",
"@vercel/functions": "2.0.0",
"@vercel/og": "^0.6.8",
"abitype": "1.0.8",
@@ -59,21 +61,21 @@
"color": "5.0.0",
"compare-versions": "^6.1.0",
"date-fns": "4.1.0",
"fast-xml-parser": "^5.2.0",
"fast-xml-parser": "^5.2.1",
"fetch-event-stream": "0.1.5",
"flat": "^6.0.1",
"framer-motion": "12.5.0",
"framer-motion": "12.9.2",
"fuse.js": "7.1.0",
"idb-keyval": "^6.2.1",
"input-otp": "^1.4.1",
"ioredis": "^5.6.0",
"ioredis": "^5.6.1",
"ipaddr.js": "^2.2.0",
"lucide-react": "0.487.0",
"next": "15.2.4",
"lucide-react": "0.503.0",
"next": "15.3.1",
"next-plausible": "^3.12.4",
"next-themes": "^0.4.6",
"nextjs-toploader": "^1.6.12",
"nuqs": "^2.4.1",
"nuqs": "^2.4.3",
"p-limit": "^6.2.0",
"papaparse": "^5.5.2",
"pluralize": "^8.0.0",
@@ -89,7 +91,7 @@
"react-hook-form": "7.55.0",
"react-markdown": "^9.0.1",
"react-table": "^7.8.0",
"recharts": "2.15.2",
"recharts": "2.15.3",
"remark-gfm": "4.0.1",
"responsive-rsc": "0.0.7",
"server-only": "^0.0.1",
@@ -97,20 +99,20 @@
"sonner": "2.0.3",
"spdx-correct": "^3.2.0",
"stripe": "17.7.0",
"swagger-ui-react": "^5.20.7",
"swagger-ui-react": "^5.21.0",
"tailwind-merge": "^2.6.0",
"tailwindcss-animate": "^1.0.7",
"thirdweb": "workspace:*",
"tiny-invariant": "^1.3.3",
"use-debounce": "^10.0.4",
"zod": "3.24.2"
"zod": "3.24.3"
},
"devDependencies": {
"@chakra-ui/cli": "^2.4.1",
"@chromatic-com/storybook": "3.2.6",
"@next/bundle-analyzer": "15.2.4",
"@next/eslint-plugin-next": "15.2.4",
"@playwright/test": "1.51.1",
"@next/bundle-analyzer": "15.3.1",
"@next/eslint-plugin-next": "15.3.1",
"@playwright/test": "1.52.0",
"@storybook/addon-essentials": "8.6.12",
"@storybook/addon-interactions": "8.6.12",
"@storybook/addon-links": "8.6.12",
@@ -121,15 +123,15 @@
"@storybook/react": "8.6.12",
"@storybook/test": "8.6.12",
"@types/color": "4.2.0",
"@types/node": "22.14.0",
"@types/node": "22.14.1",
"@types/papaparse": "^5.3.15",
"@types/pluralize": "^0.0.33",
"@types/qrcode": "^1.5.5",
"@types/react": "19.1.0",
"@types/react": "19.1.2",
"@types/react-dom": "19.1.2",
"@types/react-table": "^7.7.20",
"@types/spdx-correct": "^3.1.3",
"@types/swagger-ui-react": "^4.19.0",
"@types/swagger-ui-react": "^5.18.0",
"@typescript-eslint/eslint-plugin": "7.14.1",
"@typescript-eslint/parser": "7.14.1",
"autoprefixer": "^10.4.21",
@@ -138,7 +140,7 @@
"eslint-config-biome": "1.9.4",
"eslint-plugin-react-compiler": "19.0.0-beta-e993439-20250405",
"eslint-plugin-storybook": "0.12.0",
"knip": "5.47.0",
"knip": "5.50.5",
"next-sitemap": "^4.2.3",
"postcss": "8.5.3",
"storybook": "8.6.12",
Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 248 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 228 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 281 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 251 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 130 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 145 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

@@ -1,6 +0,0 @@
<svg width="17" height="17" viewBox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg">
<g id="Check Circle Icon">
<path id="Vector" d="M8.5 16.5C12.9184 16.5 16.5 12.9184 16.5 8.5C16.5 4.0816 12.9184 0.5 8.5 0.5C4.0816 0.5 0.5 4.0816 0.5 8.5C0.5 12.9184 4.0816 16.5 8.5 16.5Z" fill="white"/>
<path id="Check" d="M4.87939 9.01716L6.9482 11.086L12.1202 5.91394" stroke="#000001" stroke-width="1.23077" stroke-linecap="round" stroke-linejoin="round"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 470 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 395 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 244 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 213 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 202 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 208 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 204 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 314 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 216 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 676 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 227 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 779 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 269 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 97 KiB

-5
View File
@@ -100,11 +100,6 @@ async function redirects() {
destination: "/auth",
permanent: false,
},
{
source: "/checkout",
destination: "/connect",
permanent: false,
},
{
source: "/extensions",
destination: "/build",
+1 -1
View File
@@ -88,7 +88,7 @@ function main(params: { assetsFolder: string; srcFolder: string }) {
// remove the files for which its name can be found in the content of the file
folderVisitor(params.srcFolder, (content) => {
for (const assetFileName of assetFileNames) {
if (content.includes(assetFileName.name)) {
if (content.includes(`/${assetFileName.name}`)) {
unusedFileNames.delete(assetFileName);
}
}
+1 -1
View File
@@ -1,6 +1,6 @@
"use server";
import { getAuthToken } from "../../app/api/lib/getAuthToken";
import { getAuthToken } from "../../app/(app)/api/lib/getAuthToken";
import { API_SERVER_URL } from "../constants/env";
export async function acceptInvite(options: {
+8 -92
View File
@@ -1,82 +1,11 @@
"use server";
import "server-only";
import { API_SERVER_URL } from "@/constants/env";
import { getAuthToken } from "../../app/api/lib/getAuthToken";
import type { ProductSKU } from "../lib/billing";
import { getAuthToken } from "../../app/(app)/api/lib/getAuthToken";
import { API_SERVER_URL } from "../constants/env";
export type GetBillingCheckoutUrlOptions = {
teamSlug: string;
sku: ProductSKU;
redirectUrl: string;
metadata?: Record<string, string>;
};
export async function getBillingCheckoutUrl(
options: GetBillingCheckoutUrlOptions,
): Promise<{ status: number; url?: string }> {
if (!options.teamSlug) {
return {
status: 400,
};
}
const token = await getAuthToken();
if (!token) {
return {
status: 401,
};
}
const res = await fetch(
`${API_SERVER_URL}/v1/teams/${options.teamSlug}/checkout/create-link`,
{
method: "POST",
body: JSON.stringify({
sku: options.sku,
redirectTo: options.redirectUrl,
metadata: options.metadata || {},
}),
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${token}`,
},
},
);
if (!res.ok) {
return {
status: res.status,
};
}
const json = await res.json();
if (!json.result) {
return {
status: 500,
};
}
return {
status: 200,
url: json.result as string,
};
}
export type GetBillingCheckoutUrlAction = typeof getBillingCheckoutUrl;
export type GetBillingPortalUrlOptions = {
teamSlug: string | undefined;
redirectUrl: string;
};
export async function getBillingPortalUrl(
options: GetBillingPortalUrlOptions,
): Promise<{ status: number; url?: string }> {
if (!options.teamSlug) {
return {
status: 400,
};
}
export async function reSubscribePlan(options: {
teamId: string;
}): Promise<{ status: number }> {
const token = await getAuthToken();
if (!token) {
return {
@@ -85,16 +14,14 @@ export async function getBillingPortalUrl(
}
const res = await fetch(
`${API_SERVER_URL}/v1/teams/${options.teamSlug}/checkout/create-session-link`,
`${API_SERVER_URL}/v1/teams/${options.teamId}/checkout/resubscribe-plan`,
{
method: "POST",
body: JSON.stringify({
redirectTo: options.redirectUrl,
}),
method: "PUT",
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${token}`,
},
body: JSON.stringify({}),
},
);
@@ -104,18 +31,7 @@ export async function getBillingPortalUrl(
};
}
const json = await res.json();
if (!json.result) {
return {
status: 500,
};
}
return {
status: 200,
url: json.result as string,
};
}
export type GetBillingPortalUrlAction = typeof getBillingPortalUrl;
+1 -1
View File
@@ -1,6 +1,6 @@
"use server";
import { getAuthToken } from "../../app/api/lib/getAuthToken";
import { getAuthToken } from "../../app/(app)/api/lib/getAuthToken";
import { API_SERVER_URL } from "../constants/env";
export async function confirmEmailWithOTP(otp: string) {
+1 -1
View File
@@ -1,6 +1,6 @@
"use server";
import { getRawAccount } from "../../app/account/settings/getAccount";
import { getRawAccount } from "../../app/(app)/account/settings/getAccount";
export async function getRawAccountAction() {
return getRawAccount();
@@ -1,9 +1,8 @@
"use server";
import { getThirdwebClient } from "@/constants/thirdweb.server";
import { defineDashboardChain } from "lib/defineDashboardChain";
import { ZERO_ADDRESS, isAddress, toTokens } from "thirdweb";
import { getWalletBalance } from "thirdweb/wallets";
import { getUserThirdwebClient } from "../../app/(app)/api/lib/getAuthToken";
type BalanceQueryResponse = Array<{
balance: string;
@@ -24,6 +23,7 @@ export async function getTokenBalancesFromMoralis(params: {
error: string;
}
> {
const client = await getUserThirdwebClient();
const { contractAddress, chainId } = params;
if (!isAddress(contractAddress)) {
@@ -39,7 +39,7 @@ export async function getTokenBalancesFromMoralis(params: {
const balance = await getWalletBalance({
address: contractAddress,
chain,
client: getThirdwebClient(),
client,
});
return [
{
@@ -2,16 +2,16 @@
import {
generateAlchemyUrl,
isAlchemySupported,
transformAlchemyResponseToNFT,
} from "lib/wallet/nfts/alchemy";
import {
generateMoralisUrl,
isMoralisSupported,
transformMoralisResponseToNFT,
} from "lib/wallet/nfts/moralis";
import type { WalletNFT } from "lib/wallet/nfts/types";
import { getVercelEnv } from "../../lib/vercel-utils";
import { isAlchemySupported } from "../../lib/wallet/nfts/isAlchemySupported";
import { isMoralisSupported } from "../../lib/wallet/nfts/isMoralisSupported";
import { DASHBOARD_THIRDWEB_CLIENT_ID } from "../constants/env";
type WalletNFTApiReturn =
+6 -2
View File
@@ -1,7 +1,7 @@
"use server";
import { getAuthToken } from "../../app/api/lib/getAuthToken";
import { API_SERVER_URL } from "../constants/env";
import { getAuthToken } from "../../app/(app)/api/lib/getAuthToken";
import { API_SERVER_URL, THIRDWEB_ENGINE_CLOUD_URL } from "../constants/env";
type ProxyActionParams = {
pathname: string;
@@ -79,6 +79,10 @@ export async function apiServerProxy<T>(params: ProxyActionParams) {
return proxy<T>(API_SERVER_URL, params);
}
export async function engineCloudProxy<T>(params: ProxyActionParams) {
return proxy<T>(THIRDWEB_ENGINE_CLOUD_URL, params);
}
export async function payServerProxy<T>(params: ProxyActionParams) {
return proxy<T>(
process.env.NEXT_PUBLIC_PAY_URL
@@ -1,6 +1,6 @@
"use server";
import { getAuthToken } from "../../app/api/lib/getAuthToken";
import { getAuthToken } from "../../app/(app)/api/lib/getAuthToken";
import { API_SERVER_URL } from "../constants/env";
export async function sendTeamInvites(options: {
@@ -1,5 +1,5 @@
"use server";
import { getAuthToken } from "../../app/api/lib/getAuthToken";
import { getAuthToken } from "../../app/(app)/api/lib/getAuthToken";
import { API_SERVER_URL } from "../constants/env";
export async function updateAccount(values: {
@@ -1,48 +0,0 @@
"use server";
import type { Account } from "@3rdweb-sdk/react/hooks/useApi";
import { cookies } from "next/headers";
import { getAddress } from "thirdweb";
import { COOKIE_PREFIX_TOKEN } from "../constants/cookie";
import { API_SERVER_URL } from "../constants/env";
/**
* Check that the connected wallet is valid for the current active account
*/
export async function isWalletValidForActiveAccount(params: {
address: string;
account: Account;
authToken: string;
}) {
const cookieStore = await cookies();
const authCookieNameForAddress =
COOKIE_PREFIX_TOKEN + getAddress(params.address);
// authToken for this wallet address should be present
const authTokenForAddress = cookieStore.get(authCookieNameForAddress)?.value;
if (!authTokenForAddress) {
return false;
}
// this authToken should be same as current active authToken
if (authTokenForAddress !== params.authToken) {
return false;
}
// authToken should be valid
const accountRes = await fetch(`${API_SERVER_URL}/v1/account/me`, {
method: "GET",
headers: {
Authorization: `Bearer ${authTokenForAddress}`,
},
});
if (accountRes.status !== 200) {
return false;
}
const account = (await accountRes.json()).data as Account;
// the current account should match the account fetched for the authToken
return account.id === params.account.id;
}
+1 -1
View File
@@ -10,7 +10,7 @@ import type {
WalletStats,
WalletUserStats,
} from "types/analytics";
import { getAuthToken } from "../../app/api/lib/getAuthToken";
import { getAuthToken } from "../../app/(app)/api/lib/getAuthToken";
import { getChains } from "./chain";
async function fetchAnalytics(
+1 -1
View File
@@ -1,6 +1,6 @@
import "server-only";
import type { ChainMetadata } from "thirdweb/chains";
import type { ChainService } from "../../app/(dashboard)/(chain)/types/chain";
import type { ChainService } from "../../app/(app)/(dashboard)/(chain)/types/chain";
import { API_SERVER_URL, THIRDWEB_API_SECRET } from "../constants/env";
export async function getGasSponsoredChains() {
+1 -1
View File
@@ -1,4 +1,4 @@
import { getAuthToken } from "../../app/api/lib/getAuthToken";
import { getAuthToken } from "../../app/(app)/api/lib/getAuthToken";
import { API_SERVER_URL } from "../constants/env";
export type LinkedWallet = {
+1 -1
View File
@@ -1,7 +1,7 @@
import "server-only";
import { API_SERVER_URL } from "@/constants/env";
import type { ProjectResponse } from "@thirdweb-dev/service-utils";
import { getAuthToken } from "../../app/api/lib/getAuthToken";
import { getAuthToken } from "../../app/(app)/api/lib/getAuthToken";
export type Project = ProjectResponse;
+1 -1
View File
@@ -1,4 +1,4 @@
import { getAuthToken } from "../../app/api/lib/getAuthToken";
import { getAuthToken } from "../../app/(app)/api/lib/getAuthToken";
import { API_SERVER_URL } from "../constants/env";
export type TeamInvite = {
+1 -1
View File
@@ -1,6 +1,6 @@
import "server-only";
import { API_SERVER_URL } from "@/constants/env";
import { getAuthToken } from "../../app/api/lib/getAuthToken";
import { getAuthToken } from "../../app/(app)/api/lib/getAuthToken";
const TeamAccountRole = {
OWNER: "OWNER",
@@ -1,4 +1,4 @@
import { getAuthToken } from "../../app/api/lib/getAuthToken";
import { getAuthToken } from "../../app/(app)/api/lib/getAuthToken";
import { API_SERVER_URL } from "../constants/env";
import type { ProductSKU } from "../lib/billing";
+22 -1
View File
@@ -1,7 +1,9 @@
import "server-only";
import { API_SERVER_URL, THIRDWEB_API_SECRET } from "@/constants/env";
import type { TeamResponse } from "@thirdweb-dev/service-utils";
import { getAuthToken } from "../../app/api/lib/getAuthToken";
import { cookies } from "next/headers";
import { getAuthToken } from "../../app/(app)/api/lib/getAuthToken";
import { LAST_USED_TEAM_ID } from "../../constants/cookies";
export type Team = TeamResponse & { stripeCustomerId: string | null };
@@ -74,3 +76,22 @@ export async function getDefaultTeam() {
}
return null;
}
export async function getLastVisitedTeamOrDefaultTeam() {
const token = await getAuthToken();
if (!token) {
return null;
}
const cookiesStore = await cookies();
const lastVisitedTeamId = cookiesStore.get(LAST_USED_TEAM_ID)?.value;
if (lastVisitedTeamId) {
const team = await getTeamById(lastVisitedTeamId);
if (team) {
return team;
}
}
return getDefaultTeam();
}
@@ -0,0 +1,152 @@
"use server";
import { getAuthToken } from "app/(app)/api/lib/getAuthToken";
const UB_BASE_URL = process.env.NEXT_PUBLIC_THIRDWEB_BRIDGE_HOST;
type Webhook = {
url: string;
label: string;
active: boolean;
createdAt: string;
id: string;
secret: string;
version?: number; // TODO (UB) make this mandatory after migration
};
export async function getWebhooks(props: {
clientId: string;
}) {
const authToken = await getAuthToken();
const res = await fetch(`${UB_BASE_URL}/v1/developer/webhooks`, {
method: "GET",
headers: {
"Content-Type": "application/json",
"x-client-id-override": props.clientId,
Authorization: `Bearer ${authToken}`,
},
});
if (!res.ok) {
const text = await res.text();
throw new Error(text);
}
const json = await res.json();
return json.data as Array<Webhook>;
}
export async function createWebhook(props: {
clientId: string;
version?: number;
url: string;
label: string;
secret?: string;
}) {
const authToken = await getAuthToken();
const res = await fetch(`${UB_BASE_URL}/v1/developer/webhooks`, {
method: "POST",
body: JSON.stringify({
url: props.url,
label: props.label,
version: props.version,
secret: props.secret,
}),
headers: {
"Content-Type": "application/json",
"x-client-id-override": props.clientId,
Authorization: `Bearer ${authToken}`,
},
});
if (!res.ok) {
const text = await res.text();
throw new Error(text);
}
return;
}
export async function deleteWebhook(props: {
clientId: string;
webhookId: string;
}) {
const authToken = await getAuthToken();
const res = await fetch(
`${UB_BASE_URL}/v1/developer/webhooks/${props.webhookId}`,
{
method: "DELETE",
headers: {
"Content-Type": "application/json",
"x-client-id-override": props.clientId,
Authorization: `Bearer ${authToken}`,
},
},
);
if (!res.ok) {
const text = await res.text();
throw new Error(text);
}
return;
}
export type Fee = {
feeRecipient: string;
feeBps: number;
createdAt: string;
updatedAt: string;
};
export async function getFees(props: {
clientId: string;
teamId: string;
}) {
const authToken = await getAuthToken();
const res = await fetch(`${UB_BASE_URL}/v1/developer/fees`, {
method: "GET",
headers: {
"Content-Type": "application/json",
"x-team-id": props.teamId,
"x-client-id-override": props.clientId,
Authorization: `Bearer ${authToken}`,
},
});
if (!res.ok) {
const text = await res.text();
throw new Error(text);
}
const json = await res.json();
return json.data as Fee;
}
export async function updateFee(props: {
clientId: string;
teamId: string;
feeRecipient: string;
feeBps: number;
}) {
const authToken = await getAuthToken();
const res = await fetch(`${UB_BASE_URL}/v1/developer/fees`, {
method: "PUT",
headers: {
"Content-Type": "application/json",
"x-client-id-override": props.clientId,
"x-team-id": props.teamId,
Authorization: `Bearer ${authToken}`,
},
body: JSON.stringify({
feeRecipient: props.feeRecipient,
feeBps: props.feeBps,
}),
});
if (!res.ok) {
const text = await res.text();
throw new Error(text);
}
return;
}
@@ -0,0 +1,94 @@
"use server";
import "server-only";
import { getAuthToken } from "../../app/(app)/api/lib/getAuthToken";
import { API_SERVER_URL } from "../constants/env";
export type VerifiedDomainResponse =
| {
status: "pending";
domain: string;
dnsSublabel: string;
dnsValue: string;
}
| {
status: "verified";
domain: string;
verifiedAt: Date;
};
export async function checkDomainVerification(
teamIdOrSlug: string,
): Promise<VerifiedDomainResponse | null> {
const token = await getAuthToken();
if (!token) {
return null;
}
const res = await fetch(
`${API_SERVER_URL}/v1/teams/${teamIdOrSlug}/verified-domain`,
{
headers: {
Authorization: `Bearer ${token}`,
},
},
);
if (res.ok) {
return (await res.json())?.result as VerifiedDomainResponse;
}
return null;
}
export async function createDomainVerification(
teamIdOrSlug: string,
domain: string,
): Promise<VerifiedDomainResponse | { error: string }> {
const token = await getAuthToken();
if (!token) {
return {
error: "Unauthorized",
};
}
const res = await fetch(
`${API_SERVER_URL}/v1/teams/${teamIdOrSlug}/verified-domain`,
{
method: "POST",
body: JSON.stringify({ domain }),
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${token}`,
},
},
);
if (res.ok) {
return (await res.json())?.result as VerifiedDomainResponse;
}
const resJson = (await res.json()) as {
error: {
code: string;
message: string;
statusCode: number;
};
};
switch (resJson?.error?.statusCode) {
case 400:
return {
error: "The domain you provided is not valid.",
};
case 409:
return {
error: "This domain is already verified by another team.",
};
default:
return {
error: resJson?.error?.message ?? "Failed to verify domain",
};
}
}
+40 -117
View File
@@ -1,89 +1,51 @@
"use client";
import { useMutation } from "@tanstack/react-query";
import { AlertTriangleIcon } from "lucide-react";
import Link from "next/link";
import { toast } from "sonner";
import type {
GetBillingCheckoutUrlAction,
GetBillingCheckoutUrlOptions,
GetBillingPortalUrlAction,
GetBillingPortalUrlOptions,
} from "../actions/billing";
import {
buildBillingPortalUrl,
buildCheckoutUrl,
} from "../../app/(app)/(stripe)/utils/build-url";
import type { Team } from "../api/team";
import type { ProductSKU } from "../lib/billing";
import { cn } from "../lib/utils";
import { Spinner } from "./ui/Spinner/Spinner";
import { Button, type ButtonProps } from "./ui/button";
type CheckoutButtonProps = Omit<GetBillingCheckoutUrlOptions, "redirectUrl"> & {
getBillingCheckoutUrl: GetBillingCheckoutUrlAction;
export function CheckoutButton(props: {
buttonProps?: Omit<ButtonProps, "children">;
children: React.ReactNode;
billingStatus: Team["billingStatus"];
};
export function CheckoutButton({
teamSlug,
sku,
metadata,
getBillingCheckoutUrl,
children,
buttonProps,
billingStatus,
}: CheckoutButtonProps) {
const getUrlMutation = useMutation({
mutationFn: async () => {
return getBillingCheckoutUrl({
teamSlug,
sku,
metadata,
redirectUrl: getAbsoluteUrl("/stripe-redirect"),
});
},
});
const errorMessage = "Failed to open checkout page";
teamSlug: string;
sku: Exclude<ProductSKU, null>;
}) {
return (
<div className="flex w-full flex-col items-center gap-2">
{/* show warning if the team has an invalid payment method */}
{billingStatus === "invalidPayment" && (
<BillingWarning teamSlug={teamSlug} />
{props.billingStatus === "invalidPayment" && (
<BillingWarning teamSlug={props.teamSlug} />
)}
<Button
{...buttonProps}
className={cn(buttonProps?.className, "w-full gap-2")}
{...props.buttonProps}
asChild
className={cn(props.buttonProps?.className, "w-full gap-2")}
disabled={
// disable button if the team has an invalid payment method
// api will return 402 error if the team has an invalid payment method
billingStatus === "invalidPayment" ||
getUrlMutation.isPending ||
buttonProps?.disabled
props.billingStatus === "invalidPayment" ||
props.buttonProps?.disabled
}
onClick={async (e) => {
buttonProps?.onClick?.(e);
getUrlMutation.mutate(undefined, {
onSuccess: (res) => {
if (!res.url) {
toast.error(errorMessage);
return;
}
const tab = window.open(res.url, "_blank");
if (!tab) {
toast.error(errorMessage);
return;
}
},
onError: () => {
toast.error(errorMessage);
},
});
props.buttonProps?.onClick?.(e);
}}
>
{getUrlMutation.isPending && <Spinner className="size-4" />}
{children}
<Link
target="_blank"
href={buildCheckoutUrl({
teamSlug: props.teamSlug,
sku: props.sku,
})}
>
{props.children}
</Link>
</Button>
</div>
);
@@ -107,66 +69,27 @@ function BillingWarning({ teamSlug }: { teamSlug: string }) {
);
}
type BillingPortalButtonProps = Omit<
GetBillingPortalUrlOptions,
"redirectUrl"
> & {
getBillingPortalUrl: GetBillingPortalUrlAction;
export function BillingPortalButton(props: {
teamSlug: string;
buttonProps?: Omit<ButtonProps, "children">;
children: React.ReactNode;
};
export function BillingPortalButton({
teamSlug,
children,
getBillingPortalUrl,
buttonProps,
}: BillingPortalButtonProps) {
const getUrlMutation = useMutation({
mutationFn: async () => {
return getBillingPortalUrl({
teamSlug,
redirectUrl: getAbsoluteUrl("/stripe-redirect"),
});
},
});
const errorMessage = "Failed to open billing portal";
}) {
return (
<Button
{...buttonProps}
className={cn(buttonProps?.className, "gap-2")}
disabled={getUrlMutation.isPending || buttonProps?.disabled}
{...props.buttonProps}
className={cn(props.buttonProps?.className, "gap-2")}
disabled={props.buttonProps?.disabled}
asChild
onClick={async (e) => {
buttonProps?.onClick?.(e);
getUrlMutation.mutate(undefined, {
onSuccess(res) {
if (!res.url) {
toast.error(errorMessage);
return;
}
const tab = window.open(res.url, "_blank");
if (!tab) {
toast.error(errorMessage);
return;
}
},
onError: () => {
toast.error(errorMessage);
},
});
props.buttonProps?.onClick?.(e);
}}
>
{getUrlMutation.isPending && <Spinner className="size-4" />}
{children}
<Link
href={buildBillingPortalUrl({ teamSlug: props.teamSlug })}
target="_blank"
>
{props.children}
</Link>
</Button>
);
}
function getAbsoluteUrl(path: string) {
const url = new URL(window.location.origin);
url.pathname = path;
return url.toString();
}
@@ -1,7 +1,9 @@
import type { Meta, StoryObj } from "@storybook/react";
import { useState } from "react";
import { BadgeContainer } from "../../../../stories/utils";
import { getThirdwebClient } from "../../../constants/thirdweb.server";
import {
BadgeContainer,
storybookThirdwebClient,
} from "../../../../stories/utils";
import { Button } from "../../ui/button";
import { GradientAvatar } from "./GradientAvatar";
@@ -17,8 +19,6 @@ export const Variants: Story = {
args: {},
};
const client = getThirdwebClient();
function Story() {
return (
<div className="container flex max-w-6xl flex-col gap-10 py-10">
@@ -29,7 +29,7 @@ function Story() {
id={undefined}
src={undefined}
className="size-20"
client={client}
client={storybookThirdwebClient}
/>
</BadgeContainer>
@@ -38,7 +38,7 @@ function Story() {
id={"foo"}
src={undefined}
className="size-20"
client={client}
client={storybookThirdwebClient}
/>
</BadgeContainer>
@@ -47,7 +47,7 @@ function Story() {
id={"foo"}
src={""}
className="size-20"
client={client}
client={storybookThirdwebClient}
/>
</BadgeContainer>
@@ -56,7 +56,7 @@ function Story() {
id={"bar"}
src={""}
className="size-20"
client={client}
client={storybookThirdwebClient}
/>
</BadgeContainer>
@@ -65,7 +65,7 @@ function Story() {
src="invalid-src"
id={undefined}
className="size-20"
client={client}
client={storybookThirdwebClient}
/>
</BadgeContainer>
@@ -74,7 +74,7 @@ function Story() {
src="https://picsum.photos/200/300"
id={undefined}
className="size-20"
client={client}
client={storybookThirdwebClient}
/>
</BadgeContainer>
@@ -83,7 +83,7 @@ function Story() {
src="ipfs://QmZbeJYEs7kCJHyQxjxU2SJUtjSAr4m87wzJFJUyWomKdj/Smily.svg"
id={undefined}
className="size-20"
client={client}
client={storybookThirdwebClient}
/>
</BadgeContainer>
@@ -123,7 +123,7 @@ function ToggleTest() {
src={data?.src}
id={data?.id}
className="size-20"
client={client}
client={storybookThirdwebClient}
/>
</BadgeContainer>
@@ -132,7 +132,7 @@ function ToggleTest() {
className="size-20"
src={data ? "invalid-src" : undefined}
id={undefined}
client={client}
client={storybookThirdwebClient}
/>
</BadgeContainer>
</div>
@@ -1,7 +1,9 @@
import type { Meta, StoryObj } from "@storybook/react";
import { useState } from "react";
import { BadgeContainer } from "../../../../stories/utils";
import { getThirdwebClient } from "../../../constants/thirdweb.server";
import {
BadgeContainer,
storybookThirdwebClient,
} from "../../../../stories/utils";
import { Button } from "../../ui/button";
import { ProjectAvatar } from "./ProjectAvatar";
@@ -18,19 +20,25 @@ export const Variants: Story = {
args: {},
};
const client = getThirdwebClient();
function Story() {
return (
<div className="container flex max-w-6xl flex-col gap-10 py-10">
<p> All images below are set with size-6 className </p>
<BadgeContainer label="No Src - Skeleton">
<ProjectAvatar src={undefined} className="size-6" client={client} />
<ProjectAvatar
src={undefined}
className="size-6"
client={storybookThirdwebClient}
/>
</BadgeContainer>
<BadgeContainer label="Invalid/Empty Src - BoxIcon Fallback">
<ProjectAvatar src={""} className="size-6" client={client} />
<ProjectAvatar
src={""}
className="size-6"
client={storybookThirdwebClient}
/>
</BadgeContainer>
<ToggleTest />
@@ -65,14 +73,18 @@ function ToggleTest() {
<p> Src+Name is: {data ? "set" : "not set"} </p>
<BadgeContainer label="Valid Src">
<ProjectAvatar src={data?.src} className="size-6" client={client} />
<ProjectAvatar
src={data?.src}
className="size-6"
client={storybookThirdwebClient}
/>
</BadgeContainer>
<BadgeContainer label="invalid Src">
<ProjectAvatar
src={data ? "invalid-src" : undefined}
className="size-6"
client={client}
client={storybookThirdwebClient}
/>
</BadgeContainer>
</div>
@@ -1,6 +1,9 @@
import type { Meta, StoryObj } from "@storybook/react";
import { useState } from "react";
import { BadgeContainer } from "../../../stories/utils";
import {
BadgeContainer,
storybookThirdwebClient,
} from "../../../stories/utils";
import { MultiNetworkSelector } from "./NetworkSelectors";
const meta = {
@@ -41,6 +44,7 @@ function Variant(props: {
<BadgeContainer label={props.label}>
<MultiNetworkSelector
selectedChainIds={chainIds}
client={storybookThirdwebClient}
onChange={setChainIds}
/>
</BadgeContainer>
@@ -4,6 +4,7 @@ import { MultiSelect } from "@/components/blocks/multi-select";
import { SelectWithSearch } from "@/components/blocks/select-with-search";
import { Badge } from "@/components/ui/badge";
import { useCallback, useMemo } from "react";
import type { ThirdwebClient } from "thirdweb";
import { ChainIconClient } from "../../../components/icons/ChainIcon";
import { useAllChainsData } from "../../../hooks/chains/allChains";
@@ -20,6 +21,12 @@ export function MultiNetworkSelector(props: {
className?: string;
priorityChains?: number[];
hideTestnets?: boolean;
popoverContentClassName?: string;
customTrigger?: React.ReactNode;
align?: "center" | "start" | "end";
side?: "left" | "right" | "top" | "bottom";
showSelectedValuesInModal?: boolean;
client: ThirdwebClient;
}) {
const { allChains, idToChain } = useAllChainsData();
@@ -84,8 +91,9 @@ export function MultiNetworkSelector(props: {
<span className="flex grow gap-2 truncate text-left">
<ChainIconClient
className="size-5"
ipfsSrc={chain.icon?.url}
loading="lazy"
src={chain.icon?.url}
client={props.client}
/>
{cleanChainName(chain.name)}
</span>
@@ -99,14 +107,19 @@ export function MultiNetworkSelector(props: {
</div>
);
},
[idToChain, props.disableChainId],
[idToChain, props.disableChainId, props.client],
);
return (
<MultiSelect
searchPlaceholder="Search by Name or Chain Id"
selectedValues={props.selectedChainIds.map(String)}
popoverContentClassName={props.popoverContentClassName}
customTrigger={props.customTrigger}
options={options}
align={props.align}
side={props.side}
showSelectedValuesInModal={props.showSelectedValuesInModal}
onSelectedValuesChange={(chainIds) => {
props.onChange(chainIds.map(Number));
}}
@@ -132,6 +145,7 @@ export function SingleNetworkSelector(props: {
disableChainId?: boolean;
align?: "center" | "start" | "end";
placeholder?: string;
client: ThirdwebClient;
}) {
const { allChains, idToChain } = useAllChainsData();
@@ -179,7 +193,8 @@ export function SingleNetworkSelector(props: {
<span className="flex grow gap-2 truncate text-left">
<ChainIconClient
className="size-5"
ipfsSrc={chain.icon?.url}
src={chain.icon?.url}
client={props.client}
loading="lazy"
/>
{cleanChainName(chain.name)}
@@ -194,7 +209,7 @@ export function SingleNetworkSelector(props: {
</div>
);
},
[idToChain, props.disableChainId],
[idToChain, props.disableChainId, props.client],
);
const isLoadingChains = allChains.length === 0;
@@ -95,7 +95,7 @@ export function FullWidthSidebarLayout(props: {
links={[...contentSidebarLinks, ...(footerSidebarLinks || [])]}
/>
<main className="z-0 flex min-w-0 grow flex-col max-sm:w-full">
<main className="flex min-w-0 grow flex-col max-sm:w-full">
{children}
</main>
<AppFooter containerClassName="max-w-7xl" />
@@ -1,6 +1,9 @@
import type { Meta, StoryObj } from "@storybook/react";
import { useState } from "react";
import { BadgeContainer } from "../../../stories/utils";
import {
BadgeContainer,
storybookThirdwebClient,
} from "../../../stories/utils";
import { SingleNetworkSelector } from "./NetworkSelectors";
const meta = {
@@ -43,6 +46,7 @@ function Variant(props: {
return (
<BadgeContainer label={props.label}>
<SingleNetworkSelector
client={storybookThirdwebClient}
chainId={chainId}
onChange={setChainId}
chainIds={props.chainIds}
@@ -1,6 +1,6 @@
import { Button } from "@/components/ui/button";
import { cn } from "@/lib/utils";
import { ThirdwebMiniLogo } from "app/components/ThirdwebMiniLogo";
import { ThirdwebMiniLogo } from "app/(app)/components/ThirdwebMiniLogo";
import { GithubIcon } from "components/icons/brand-icons/GithubIcon";
import { InstagramIcon } from "components/icons/brand-icons/InstagramIcon";
import { LinkedInIcon } from "components/icons/brand-icons/LinkedinIcon";
@@ -8,7 +8,7 @@ import {
} from "@/components/ui/select";
import type { Meta, StoryObj } from "@storybook/react";
import { useState } from "react";
import { BadgeContainer } from "../../../stories/utils";
import { BadgeContainer } from "stories/utils";
import { type CodeEnvironment, CodeSegment } from "./code-segment.client";
const meta = {
@@ -9,7 +9,7 @@ import {
} from "@/components/ui/popover";
import { Separator } from "@/components/ui/separator";
import { cn } from "@/lib/utils";
import { CheckIcon, ChevronDown, SearchIcon, XIcon } from "lucide-react";
import { CheckIcon, ChevronDownIcon, SearchIcon, XIcon } from "lucide-react";
import {
forwardRef,
useCallback,
@@ -47,7 +47,12 @@ interface MultiSelectProps
searchTerm: string,
) => boolean;
popoverContentClassName?: string;
customTrigger?: React.ReactNode;
renderOption?: (option: { value: string; label: string }) => React.ReactNode;
align?: "center" | "start" | "end";
side?: "left" | "right" | "top" | "bottom";
showSelectedValuesInModal?: boolean;
}
export const MultiSelect = forwardRef<HTMLButtonElement, MultiSelectProps>(
@@ -62,6 +67,8 @@ export const MultiSelect = forwardRef<HTMLButtonElement, MultiSelectProps>(
overrideSearchFn,
renderOption,
searchPlaceholder,
popoverContentClassName,
showSelectedValuesInModal = false,
...props
},
ref,
@@ -155,111 +162,102 @@ export const MultiSelect = forwardRef<HTMLButtonElement, MultiSelectProps>(
return (
<Popover open={isPopoverOpen} onOpenChange={setIsPopoverOpen} modal>
<PopoverTrigger asChild>
<Button
ref={ref}
{...props}
onClick={handleTogglePopover}
className={cn(
"flex h-auto min-h-10 w-full items-center justify-between rounded-md border border-border bg-inherit p-3 hover:bg-inherit",
className,
)}
>
{selectedValues.length > 0 ? (
<div className="flex w-full justify-between">
{/* badges */}
<div className="flex flex-wrap items-center gap-1.5">
{selectedValues.slice(0, maxCount).map((value) => {
const option = options.find((o) => o.value === value);
if (!option) {
return null;
}
return (
<ClosableBadge
key={value}
label={option.label}
onClose={() => toggleOption(value)}
/>
);
})}
{/* +X more */}
{selectedValues.length > maxCount && (
<ClosableBadge
label={`+ ${selectedValues.length - maxCount} more`}
onClose={clearExtraOptions}
/>
)}
</div>
<div className="flex items-center justify-between gap-2">
{/* Clear All */}
{/* biome-ignore lint/a11y/useKeyWithClickEvents: <explanation> */}
{/* biome-ignore lint/a11y/useFocusableInteractive: <explanation> */}
<div
role="button"
onClick={(event) => {
event.stopPropagation();
handleClear();
}}
className="rounded p-1 hover:bg-accent"
>
<XIcon className="h-4 cursor-pointer text-muted-foreground" />
</div>
<Separator
orientation="vertical"
className="flex h-full min-h-6"
{props.customTrigger || (
<Button
ref={ref}
{...props}
onClick={handleTogglePopover}
className={cn(
"flex h-auto min-h-10 w-full items-center justify-between rounded-md border border-border bg-inherit p-3 hover:bg-inherit",
className,
)}
>
{selectedValues.length > 0 ? (
<div className="flex w-full items-center justify-between">
<SelectedChainsBadges
selectedValues={selectedValues}
options={options}
maxCount={maxCount}
onClose={handleClear}
toggleOption={toggleOption}
clearExtraOptions={clearExtraOptions}
/>
<ChevronDown className="h-4 cursor-pointer text-muted-foreground" />
<div className="flex items-center justify-between gap-2">
{/* Clear All */}
{/* biome-ignore lint/a11y/useKeyWithClickEvents: <explanation> */}
{/* biome-ignore lint/a11y/useFocusableInteractive: <explanation> */}
<div
role="button"
onClick={(event) => {
event.stopPropagation();
handleClear();
}}
className="rounded p-1 hover:bg-accent"
>
<XIcon className="h-4 cursor-pointer text-muted-foreground" />
</div>
<Separator
orientation="vertical"
className="flex h-full min-h-6"
/>
<ChevronDownIcon className="h-4 cursor-pointer text-muted-foreground" />
</div>
</div>
</div>
) : (
<div className="flex w-full items-center justify-between">
<span className="text-muted-foreground text-sm">
{placeholder}
</span>
<ChevronDown className="h-4 cursor-pointer text-muted-foreground" />
</div>
)}
</Button>
) : (
<div className="flex w-full items-center justify-between">
<span className="text-muted-foreground text-sm">
{placeholder}
</span>
<ChevronDownIcon className="h-4 cursor-pointer text-muted-foreground" />
</div>
)}
</Button>
)}
</PopoverTrigger>
<PopoverContent
className="p-0"
align="center"
className={cn(
"flex max-h-[500px] flex-col p-0",
popoverContentClassName,
)}
align={props.align}
side={props.side}
sideOffset={10}
onEscapeKeyDown={() => setIsPopoverOpen(false)}
style={{
width: "var(--radix-popover-trigger-width)",
maxHeight: "var(--radix-popover-content-available-height)",
height:
"calc(var(--radix-popover-content-available-height) - 40px)",
}}
ref={popoverElRef}
>
<div>
{/* Search */}
<div className="relative">
<Input
placeholder={searchPlaceholder || "Search"}
value={searchValue}
onChange={(e) => setSearchValue(e.target.value)}
className="!h-auto rounded-b-none border-0 border-border border-b py-4 pl-10 focus-visible:ring-0 focus-visible:ring-offset-0"
onKeyDown={handleInputKeyDown}
/>
<SearchIcon className="-translate-y-1/2 absolute top-1/2 left-4 size-4 text-muted-foreground" />
</div>
{/* Search */}
<div className="relative">
<Input
placeholder={searchPlaceholder || "Search"}
value={searchValue}
// do not focus on the input when the popover opens to avoid opening the keyboard
tabIndex={-1}
onChange={(e) => setSearchValue(e.target.value)}
className="!h-auto rounded-b-none border-0 border-border border-b py-4 pl-10 focus-visible:ring-0 focus-visible:ring-offset-0"
onKeyDown={handleInputKeyDown}
/>
<SearchIcon className="-translate-y-1/2 absolute top-1/2 left-4 size-4 text-muted-foreground" />
</div>
{optionsToShow.length === 0 && (
<div className="flex flex-1 flex-col items-center justify-center py-10 text-sm">
No results found
</div>
)}
{optionsToShow.length > 0 && (
<ScrollShadow
scrollableClassName="max-h-[min(calc(var(--radix-popover-content-available-height)-60px),350px)] p-1"
className="rounded"
scrollableClassName="p-1 h-full"
className="flex-1 rounded"
>
{/* List */}
<div>
{optionsToShow.length === 0 && (
<div className="flex justify-center py-10">
No results found
</div>
)}
{optionsToShow.map((option, i) => {
const isSelected = selectedValues.includes(option.value);
return (
@@ -293,7 +291,20 @@ export const MultiSelect = forwardRef<HTMLButtonElement, MultiSelectProps>(
})}
</div>
</ScrollShadow>
</div>
)}
{showSelectedValuesInModal && selectedValues.length > 0 && (
<div className="border-t px-3 py-3">
<SelectedChainsBadges
selectedValues={selectedValues}
options={options}
maxCount={maxCount}
onClose={handleClear}
toggleOption={toggleOption}
clearExtraOptions={clearExtraOptions}
/>
</div>
)}
</PopoverContent>
</Popover>
);
@@ -319,3 +330,44 @@ function ClosableBadge(props: {
}
MultiSelect.displayName = "MultiSelect";
function SelectedChainsBadges(props: {
selectedValues: string[];
options: {
label: string;
value: string;
}[];
maxCount: number;
onClose: () => void;
toggleOption: (value: string) => void;
clearExtraOptions: () => void;
}) {
const { selectedValues, options, maxCount, toggleOption, clearExtraOptions } =
props;
return (
<div className="flex flex-wrap items-center gap-1.5">
{selectedValues.slice(0, maxCount).map((value) => {
const option = options.find((o) => o.value === value);
if (!option) {
return null;
}
return (
<ClosableBadge
key={value}
label={option.label}
onClose={() => toggleOption(value)}
/>
);
})}
{/* +X more */}
{selectedValues.length > maxCount && (
<ClosableBadge
label={`+ ${selectedValues.length - maxCount} more`}
onClose={clearExtraOptions}
/>
)}
</div>
);
}
@@ -8,28 +8,35 @@ import { CheckIcon, CircleDollarSignIcon } from "lucide-react";
import Link from "next/link";
import type React from "react";
import { TEAM_PLANS } from "utils/pricing";
import { RenewSubscriptionButton } from "../../../components/settings/Account/Billing/renew-subscription/renew-subscription-button";
import { useTrack } from "../../../hooks/analytics/useTrack";
import { remainingDays } from "../../../utils/date-utils";
import type { GetBillingCheckoutUrlAction } from "../../actions/billing";
import type { ProductSKU } from "../../lib/billing";
import { CheckoutButton } from "../billing";
type PricingCardCta = {
hint?: string;
title: string;
onClick?: () => void;
} & (
| {
type: "link";
href: string;
label: string;
}
| {
type: "checkout";
label: string;
}
| {
type: "renew";
}
);
type PricingCardProps = {
getTeam: () => Promise<Team>;
teamSlug: string;
teamId: string;
billingStatus: Team["billingStatus"];
billingPlan: keyof typeof TEAM_PLANS;
cta?: PricingCardCta;
@@ -37,18 +44,18 @@ type PricingCardProps = {
highlighted?: boolean;
current?: boolean;
activeTrialEndsAt?: string;
getBillingCheckoutUrl: GetBillingCheckoutUrlAction;
};
export const PricingCard: React.FC<PricingCardProps> = ({
getTeam,
teamSlug,
teamId,
billingStatus,
billingPlan,
cta,
highlighted = false,
current = false,
activeTrialEndsAt,
getBillingCheckoutUrl,
}) => {
const plan = TEAM_PLANS[billingPlan];
const isCustomPrice = typeof plan.price === "string";
@@ -131,6 +138,9 @@ export const PricingCard: React.FC<PricingCardProps> = ({
{cta && (
<div className="flex flex-col gap-3">
{cta.type === "renew" && (
<RenewSubscriptionButton teamId={teamId} getTeam={getTeam} />
)}
{billingPlanToSkuMap[billingPlan] && cta.type === "checkout" && (
<CheckoutButton
billingStatus={billingStatus}
@@ -141,9 +151,8 @@ export const PricingCard: React.FC<PricingCardProps> = ({
}}
teamSlug={teamSlug}
sku={billingPlanToSkuMap[billingPlan]}
getBillingCheckoutUrl={getBillingCheckoutUrl}
>
{cta.title}
{cta.label}
</CheckoutButton>
)}
@@ -154,7 +163,7 @@ export const PricingCard: React.FC<PricingCardProps> = ({
asChild
>
<Link href={cta.href} target="_blank" onClick={handleCTAClick}>
{cta.title}
{cta.label}
</Link>
</Button>
)}
@@ -8,7 +8,7 @@ import {
PopoverTrigger,
} from "@/components/ui/popover";
import { cn } from "@/lib/utils";
import { CheckIcon, ChevronDown, SearchIcon } from "lucide-react";
import { CheckIcon, ChevronDownIcon, SearchIcon } from "lucide-react";
import React, { useRef, useMemo, useEffect } from "react";
import { useShowMore } from "../../lib/useShowMore";
import { ScrollShadow } from "../ui/ScrollShadow/ScrollShadow";
@@ -129,9 +129,11 @@ export const SelectWithSearch = React.forwardRef<
selectedOption && "text-foreground",
)}
>
{selectedOption?.label || placeholder}
{renderOption && selectedOption
? renderOption(selectedOption)
: selectedOption?.label || placeholder}
</span>
<ChevronDown className="size-4 cursor-pointer text-muted-foreground" />
<ChevronDownIcon className="size-4 cursor-pointer text-muted-foreground" />
</div>
</Button>
</PopoverTrigger>
@@ -8,7 +8,7 @@ import {
import { useThirdwebClient } from "@/constants/thirdweb.client";
import { resolveSchemeWithErrorHandler } from "@/lib/resolveSchemeWithErrorHandler";
import { useClipboard } from "hooks/useClipboard";
import { Check, Copy, XIcon } from "lucide-react";
import { CheckIcon, CopyIcon, XIcon } from "lucide-react";
import { useMemo } from "react";
import { type ThirdwebClient, isAddress } from "thirdweb";
import { ZERO_ADDRESS } from "thirdweb";
@@ -104,9 +104,9 @@ export function WalletAddress(props: {
className="flex items-center gap-2"
>
{hasCopied ? (
<Check className="h-4 w-4" />
<CheckIcon className="h-4 w-4" />
) : (
<Copy className="h-4 w-4" />
<CopyIcon className="h-4 w-4" />
)}
{hasCopied ? "Copied!" : "Copy"}
</Button>
@@ -1,6 +1,6 @@
import type { Meta, StoryObj } from "@storybook/react";
import { useState } from "react";
import { BadgeContainer } from "../../stories/utils";
import { BadgeContainer } from "stories/utils";
import { PaginationButtons } from "./pagination-buttons";
const meta = {
@@ -9,11 +9,7 @@ import {
} from "@/components/ui/popover";
import { cn } from "@/lib/utils";
import { format, isBefore } from "date-fns";
import {
Calendar as CalendarIcon,
CalendarX2Icon,
ChevronDownIcon,
} from "lucide-react";
import { CalendarIcon, CalendarX2Icon, ChevronDownIcon } from "lucide-react";
import React from "react";
import { DynamicHeight } from "./DynamicHeight";
import { TabButtons } from "./tabs";
@@ -1,7 +1,7 @@
"use client";
import * as AccordionPrimitive from "@radix-ui/react-accordion";
import { ChevronDown } from "lucide-react";
import { ChevronDownIcon } from "lucide-react";
import * as React from "react";
import { cn } from "@/lib/utils";
@@ -34,7 +34,7 @@ const AccordionTrigger = React.forwardRef<
{...props}
>
{children}
<ChevronDown className="h-4 w-4 shrink-0 transition-transform duration-200" />
<ChevronDownIcon className="h-4 w-4 shrink-0 transition-transform duration-200" />
</AccordionPrimitive.Trigger>
</AccordionPrimitive.Header>
));
@@ -1,5 +1,5 @@
import { Slot } from "@radix-ui/react-slot";
import { ChevronRight, MoreHorizontal } from "lucide-react";
import { ChevronRightIcon, MoreHorizontalIcon } from "lucide-react";
import * as React from "react";
import { cn } from "@/lib/utils";
@@ -84,7 +84,7 @@ const BreadcrumbSeparator = ({
className={cn("[&>svg]:size-3.5", className)}
{...props}
>
{children ?? <ChevronRight />}
{children ?? <ChevronRightIcon />}
</li>
);
BreadcrumbSeparator.displayName = "BreadcrumbSeparator";
@@ -102,7 +102,7 @@ const BreadcrumbEllipsis = ({
)}
{...props}
>
<MoreHorizontal className="h-4 w-4" />
<MoreHorizontalIcon className="h-4 w-4" />
<span className="sr-only">More</span>
</span>
);
@@ -20,8 +20,9 @@ const buttonVariants = cva(
"bg-secondary hover:bg-secondary/80 text-semibold text-secondary-foreground ",
ghost: "hover:bg-accent text-semibold hover:text-accent-foreground",
link: "text-primary underline-offset-4 hover:underline text-semibold",
pink: "border border-nebula-pink-foreground !text-nebula-pink-foreground bg-[hsl(var(--nebula-pink-foreground)/5%)] hover:bg-nebula-pink-foreground/10 dark:!text-foreground dark:bg-nebula-pink-foreground/10 dark:hover:bg-nebula-pink-foreground/20",
upsell:
"bg-gradient-to-r from-purple-500 to-pink-500 text-white hover:from-purple-600 hover:to-pink-600 shadow-lg hover:shadow-xl transform hover:-translate-y-0.5 transition-all duration-200",
"bg-green-600 text-white hover:bg-green-700 shadow-lg hover:shadow-xl transform hover:-translate-y-0.5 transition-all duration-200",
},
size: {
default: "h-10 px-4 py-2",
@@ -1,6 +1,6 @@
"use client";
import { ChevronLeft, ChevronRight } from "lucide-react";
import { ChevronLeftIcon, ChevronRightIcon } from "lucide-react";
import type * as React from "react";
import { DayPicker } from "react-day-picker";
@@ -54,8 +54,8 @@ function Calendar({
...classNames,
}}
components={{
IconLeft: () => <ChevronLeft className="h-4 w-4" />,
IconRight: () => <ChevronRight className="h-4 w-4" />,
IconLeft: () => <ChevronLeftIcon className="size-4" />,
IconRight: () => <ChevronRightIcon className="size-4" />,
}}
{...props}
/>
@@ -1,7 +1,7 @@
"use client";
import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
import { Check } from "lucide-react";
import { CheckIcon } from "lucide-react";
import * as React from "react";
import { cn } from "@/lib/utils";
@@ -21,7 +21,7 @@ const Checkbox = React.forwardRef<
<CheckboxPrimitive.Indicator
className={cn("flex items-center justify-center text-current")}
>
<Check className="h-4 w-4" />
<CheckIcon className="size-4" />
</CheckboxPrimitive.Indicator>
</CheckboxPrimitive.Root>
));
@@ -1,7 +1,7 @@
"use client";
import * as DialogPrimitive from "@radix-ui/react-dialog";
import { X } from "lucide-react";
import { XIcon } from "lucide-react";
import * as React from "react";
import { cn } from "@/lib/utils";
@@ -65,7 +65,7 @@ const DialogContent = React.forwardRef<
dialogCloseClassName,
)}
>
<X className="h-4 w-4" />
<XIcon className="size-4" />
<span className="sr-only">Close</span>
</DialogPrimitive.Close>
</DialogPrimitive.Content>
@@ -1,7 +1,7 @@
"use client";
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
import { Check, ChevronRight, Circle } from "lucide-react";
import { CheckIcon, ChevronRightIcon, CircleIcon } from "lucide-react";
import * as React from "react";
import { cn } from "@/lib/utils";
@@ -34,7 +34,7 @@ const DropdownMenuSubTrigger = React.forwardRef<
{...props}
>
{children}
<ChevronRight className="ml-auto h-4 w-4" />
<ChevronRightIcon className="ml-auto size-4" />
</DropdownMenuPrimitive.SubTrigger>
));
DropdownMenuSubTrigger.displayName =
@@ -107,7 +107,7 @@ const DropdownMenuCheckboxItem = React.forwardRef<
>
<span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
<DropdownMenuPrimitive.ItemIndicator>
<Check className="h-4 w-4" />
<CheckIcon className="size-4" />
</DropdownMenuPrimitive.ItemIndicator>
</span>
{children}
@@ -130,7 +130,7 @@ const DropdownMenuRadioItem = React.forwardRef<
>
<span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
<DropdownMenuPrimitive.ItemIndicator>
<Circle className="h-2 w-2 fill-current" />
<CircleIcon className="size-2 fill-current" />
</DropdownMenuPrimitive.ItemIndicator>
</span>
{children}
@@ -1,7 +1,7 @@
"use client";
import { OTPInput, OTPInputContext } from "input-otp";
import { Dot } from "lucide-react";
import { DotIcon } from "lucide-react";
import * as React from "react";
import { cn } from "@/lib/utils";
@@ -65,7 +65,7 @@ const InputOTPSeparator = React.forwardRef<
>(({ ...props }, ref) => (
// biome-ignore lint/a11y/useFocusableInteractive: pure shadcn component - it works
<div ref={ref} role="separator" {...props}>
<Dot />
<DotIcon />
</div>
));
InputOTPSeparator.displayName = "InputOTPSeparator";

Some files were not shown because too many files have changed in this diff Show More