Compare commits

..
Author SHA1 Message Date
Jonas DanielsGitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
0b4c885218 Version Packages (#4275)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-08-29 15:11:12 +12:00
gregfromstl e14af15191 fix(playground): checkbox ids and passkey TOS approval (#4308)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to add a `disabled` prop to various components for better control over user interactions.

### Detailed summary
- Added `disabled` prop to `WalletTypeRowButton` component in `WalletTypeRowButton.tsx`
- Added `disabled` prop to `ConnectWalletSocialOptions` component in `ConnectWalletSocialOptions.tsx`
- Added `disabled` prop to different options in `ConnectWalletSocialOptions` component
- Updated label and ID in `LeftSection.tsx` for TOS approval checkbox

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

<!-- end pr-codex -->
2024-08-28 20:59:39 +00:00
fcf8f89af4 react: add overrides for connected wallet name and avatar in details button and modal (#4271)
Co-authored-by: Joaquim Verges <[email protected]>
2024-08-29 08:58:51 +12:00
gregfromstl db2ee850f3 [React] Feature: Adds TOS confirmation checkbox (#4295)
## Problem solved

A developer needs the ability to require all users to accept their TOS before creating an in-app wallet so they have the ability to use their emails. This PR adds a flag `requireApproval` on the modal and embed options. When enabled, all login methods will be disabled until the checkbox is selected.
<img width="566" alt="Screenshot 2024-08-27 at 1 41 07 PM" src="https://github.com/user-attachments/assets/6534a3fb-f119-4c55-b0e2-c8ccd2dcf237">

## To Test
- Open playground Sign-In page
- Under "Modal Options", set "Require TOS approval" to true
- Attempt to login with and without checking the approval confirmation

<!-- start pr-codex -->

---

## PR-Codex overview
This PR adds a feature to require acceptance of Terms of Service or Privacy Policy before connecting to an in-app wallet.

### Detailed summary
- Added `requireApproval` prop for TOS/Privacy Policy acceptance
- Implemented UI changes for approval checkboxes
- Updated various components to handle approval requirement

> The following files were skipped due to too many changes: `packages/thirdweb/src/react/web/ui/ConnectWallet/WalletSelector.tsx`

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

<!-- end pr-codex -->
2024-08-28 19:01:51 +00:00
MananTank dc79abdca0 Fix NFTMetadata, fix dashboard crash on create direct listing page (#4307)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to fix the `NFTMetadata` type by removing the `id` property.

### Detailed summary
- Updated `NFTMetadata` type to remove the `id` property
- Updated references to `nft.metadata.id` to `nft.id` in multiple files
- Improved consistency and accuracy in handling NFT metadata

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

<!-- end pr-codex -->
2024-08-28 18:55:10 +00:00
jnsdls 55a00731d9 v5 extension detection (#4302) 2024-08-28 17:02:24 +00:00
MananTank 56eb30f722 Fix Portal OG images (#4305)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR refactors `getBaseUrl.ts` to dynamically determine environment based on Vercel settings and return appropriate base URL.

### Detailed summary
- Refactored to use `getVercelEnv` function to determine environment
- Added logic to handle different environments (development, production, preview)
- Updated `getBaseUrl` function to return correct base URL based on environment

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

<!-- end pr-codex -->
2024-08-28 11:38:09 +00:00
kien-ngo 48db1f5281 [Portal] Move some useful support articles to Portal (#4299)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR adds examples for interacting with Lens protocol and Ethereum Name Service using thirdweb extensions. It also includes a guide on transferring tokens using ERC721, ERC1155, and ERC20 contracts.

### Detailed summary
- Added examples for interacting with Lens protocol and ENS
- Included functions to resolve addresses, names, and avatars
- Provided code snippets for transferring ERC721, ERC1155, and ERC20 tokens
- Updated sidebar with links to new examples pages

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

<!-- end pr-codex -->
2024-08-28 10:57:56 +00:00
Phillip HoandGitHub a8e2bc58c9 Engine doc: webhook updates, remove v2 beta banner (#4296) 2024-08-27 23:01:51 +00:00
jnsdls 1ef192100c [Feature] Initial Projects and Teams setup in dashboard (#3682)
<!-- start pr-codex -->

## PR-Codex overview
This PR adds new pages and components related to team and project settings, navigation improvements, and styling updates.

### Detailed summary
- Added new pages for settings, contracts, and various connect options
- Implemented navigation improvements with NavLink and SidebarLink components
- Styling updates for scrollbar and badge variants
- Created components like TWAutoConnect and TeamTabs for better UI/UX

> The following files were skipped due to too many changes: `apps/dashboard/src/@/components/ui/badge.tsx`, `apps/dashboard/src/app/components/Header/TeamHeader/SearchInput.tsx`, `apps/dashboard/src/app/team/[team_slug]/[project_slug]/connect/ConnectMobileSidebar.tsx`, `apps/dashboard/src/app/team/[team_slug]/components/active-wallet-logo.tsx`, `apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/(chainPage)/layout.tsx`, `apps/dashboard/src/components/app-layouts/provider-setup.tsx`, `apps/dashboard/src/@/components/ui/select.tsx`, `apps/dashboard/src/@/components/blocks/BurgerMenuButton.tsx`, `apps/dashboard/.storybook/preview.tsx`, `apps/dashboard/src/components/icons/ChainIcon.tsx`, `apps/dashboard/src/app/team/[team_slug]/[project_slug]/connect/layout.tsx`, `apps/dashboard/src/@/api/team-members.ts`, `apps/dashboard/src/app/components/Header/TeamHeader/ProjectSelectorMobileMenuButton.tsx`, `apps/dashboard/src/app/team/[team_slug]/(team)/layout.tsx`, `apps/dashboard/src/app/components/Header/TeamHeader/TeamSelectorMobileMenuButton.tsx`, `apps/dashboard/src/app/components/Header/TeamHeader/TeamHeader.tsx`, `apps/dashboard/src/@/api/team.ts`, `apps/dashboard/src/app/team/[team_slug]/(team)/~/settings/layout.tsx`, `apps/dashboard/src/@/api/projects.ts`, `apps/dashboard/src/app/team/[team_slug]/[project_slug]/layout.tsx`, `apps/dashboard/src/app/components/Header/TeamHeader/ResourcesDropdownButton.tsx`, `apps/dashboard/src/app/components/Header/TeamHeader/TeamAndProjectSelectorPopoverButton.tsx`, `apps/dashboard/src/app/team/[team_slug]/components/account-button.client.tsx`, `apps/dashboard/src/app/components/Header/TeamHeader/ProjectSelectorUI.tsx`, `apps/dashboard/src/app/components/Header/TeamHeader/TeamSelectionUI.tsx`, `apps/dashboard/src/components/cmd-k-search/index.tsx`, `apps/dashboard/src/@/components/ui/tabs.tsx`, `apps/dashboard/src/stories/Header.stories.tsx`, `apps/dashboard/src/app/components/Header/TeamHeader/MobileBurgerMenuButton.tsx`, `apps/dashboard/src/app/components/Header/TeamHeader/TeamHeaderUI.tsx`, `apps/dashboard/src/app/team/[team_slug]/(team)/TeamOverviewPage.tsx`

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

<!-- end pr-codex -->
2024-08-27 21:59:13 +00:00
jnsdls a716bbbce5 [Update] Refine credit display and expiration handling in billing (#4297)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR updates the logic for checking active credits and improves the display of claimed and expiration information in the CreditsItem component.

### Detailed summary
- Improved logic for checking active credits in `useApi.ts`
- Updated display of claimed credits and expiration information in `CreditsItem.tsx`

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

<!-- end pr-codex -->
2024-08-27 21:39:52 +00:00
2eac899036 startup program landing update (#4251)
Co-authored-by: Jonas Daniels <[email protected]>
Co-authored-by: Manan Tank <[email protected]>
2024-08-27 14:07:17 -07:00
Winston YeoandGitHub 09bb251657 Winston/fix ecosystem wallet signing (#4294) 2024-08-27 19:17:15 +00:00
Joaquim VergesandGitHub f346bb8fca feat(playground): zksync in playground + gasPerPubData increase (#4291) 2024-08-28 00:51:05 +12:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
98493314fb chore(deps-dev): bump @babel/runtime from 7.24.5 to 7.25.4 (#4284)
Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-26 22:10:45 -07:00
jnsdls ec2ffaed16 [Remove] Modular Contracts category from explore data (#4287) 2024-08-27 03:27:37 +00:00
Edward SunandGitHub dda57eaad3 Don't retry quotes on Route not found and internal server errors (#4286) 2024-08-26 19:51:34 -07:00
kien-ngo e793d44dde [SDK] Update tsdocs for Gasless with OpenZeppelin (#4279)
<!-- start pr-codex -->

## PR-Codex overview
This PR introduces gasless transaction support using OpenZeppelin in various transaction-related functions and components.

### Detailed summary
- Added gasless usage with OpenZeppelin in `sendTransaction`, `sendAndConfirmTransaction`, `useSendTransaction`, and `useSendAndConfirmTransaction`
- Updated code examples in corresponding files for gasless usage with OpenZeppelin

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

<!-- end pr-codex -->
2024-08-27 00:04:00 +00:00
kien-ngo b661ce7b2f [SDK] Deploy VoteERC20 extension (#4264)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR adds an extension for deploying the `VoteERC20` contract and includes related test cases and contract initialization improvements.

### Detailed summary
- Added extension for deploying `VoteERC20` contract
- Implemented test cases for contract deployment and functionality testing
- Enhanced contract initialization process with better error handling

> The following files were skipped due to too many changes: `packages/thirdweb/src/extensions/prebuilts/deploy-vote.ts`, `packages/thirdweb/src/extensions/prebuilts/__generated__/VoteERC20/write/initialize.ts`

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

<!-- end pr-codex -->
2024-08-26 22:45:35 +00:00
Joaquim VergesandGitHub 17ca1b96ad chore(docs): Update docs for server verifier inputs (#4276)
Signed-off-by: Joaquim Verges <[email protected]>
2024-08-26 20:22:17 +12:00
Joaquim VergesandGitHub c116597641 feat(smart): Entrypoint v0.7 support (#4106) 2024-08-26 13:48:03 +12:00
Jonas DanielsGitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
f47aa61915 Version Packages (#4263)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-08-25 11:22:32 +12:00
gregfromstl a0aea23e74 Set default auth mode to prevent double popup (#4274)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR fixes a conflict between popup and window authentication modes on Firefox.

### Detailed summary
- Set the default authentication mode to "popup" if not specified
- Ensure popup authentication mode is used when not explicitly defined

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

<!-- end pr-codex -->
2024-08-24 21:08:40 +00:00
1405598e7e adding api for pay direct transfers (#4224)
Co-authored-by: Joaquim Verges <[email protected]>
Co-authored-by: Edward Sun <[email protected]>
Co-authored-by: Edward Sun <[email protected]>
2024-08-23 23:45:23 +00:00
MananTank 120d61f410 Use formatNumber util for showing token balances (#4269)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to update UI components to display wallet balances with up to 5 decimal places.

### Detailed summary
- Updated `formatTokenBalance` function to use `formatNumber` with 5 decimal places
- Added `formatNumber` function to format numbers with specified decimal places
- Updated balance display in UI components to use `formatNumber` with conditional decimal places based on the value

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

<!-- end pr-codex -->
2024-08-23 22:12:08 +00:00
jnsdls 2973ba1f54 [Update] Make bundle ID regex case-insensitive (#4268)
BLOCKED BY: https://github.com/thirdweb-dev/api-server/pull/1019
2024-08-23 21:00:49 +00:00
Alec AnanianandGitHub 7a2de70310 react: add hideSwitchWallet param to wallet details modal (#4267) 2024-08-23 13:37:51 -07:00
gregfromstl 659cb03eea [Docs] Feature: Automatically unroll function inputs and outputs (#4236)
## Problem solved

Previously we made no attempt to unroll function inputs and outputs in the docs. This made things difficult to quickly scan since every function has a typed input and output object you would have to navigate to.

This PR is a first attempt at basic unrolling functionality of these typed inputs and outputs.

Before:
<img width="929" alt="Screenshot 2024-08-21 at 3 20 24 PM" src="https://github.com/user-attachments/assets/e73eae8b-98b5-40c9-8f63-f17e3a0a63d7">

After:
<img width="933" alt="Screenshot 2024-08-21 at 3 20 49 PM" src="https://github.com/user-attachments/assets/b5d8d847-9c70-45ec-aaf6-95b4215b3418">

As an additional readability bonus, the input and output sections now start as an open accordion.

Note: There are still improvements to be made especially on functions with more complex types. These functions' interfaces should be simplified in future versions.

## Next Steps
Future features should add nested input descriptions (supported by typedoc but not `typedoc-better-json`). Future SDK versions should use simpler, explicitly typed inputs and outputs to simplify the unrolling process (and easier LSP support for users).

## To Test
Open the preview URL, click around to various functions and inspect the parameter and return types

<!-- start pr-codex -->

---

## PR-Codex overview
This PR updates transaction handling and TypeScript documentation rendering.

### Detailed summary
- Added `fetchDocBySlug` function to fetch TypeScript docs by slug
- Modified `SendTransactionOptions` to use interface instead of type
- Updated TypeScript documentation rendering to include interface docs for return types and parameter types

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

<!-- end pr-codex -->
2024-08-23 18:24:48 +00:00
jnsdls 8128d127ce [Update] Refine billing alert messages and usage limit notifications (#4266) 2024-08-23 17:55:29 +00:00
MananTank d401a13cdc Add Storybook in Dashboard (#4265)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to integrate Storybook into the project, configure Storybook addons, and create a Button component story.

### Detailed summary
- Added Storybook configuration files for setup
- Integrated Storybook for UI component development
- Created a story for the Button component with light and dark themes
- Updated package.json with Storybook dependencies

> The following files were skipped due to too many changes: `pnpm-lock.yaml`

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

<!-- end pr-codex -->
2024-08-23 17:08:31 +00:00
gregfromstl 41fbdafcf7 [TS SDK] Feature: Add account overload to signMessage (#4250)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR enhances the `signMessage` function in the `thirdweb` package by adding support to pass an account for signing messages, in addition to a private key.

### Detailed summary
- Added overload to `signMessage` to accept an account for signing messages
- Updated `signMessage` function to handle both private key and account options
- Updated tests to cover new account signing functionality

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

<!-- end pr-codex -->
2024-08-23 16:29:04 +00:00
MananTank 44e8e7bce2 Buy Fiat Currency selection updates in Pay UI (#4244)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR introduces support for Japanese Yen (JPY) as a fiat currency option in the Pay UI.

### Detailed summary
- Added JPY as a supported fiat currency
- Updated currency selection UI components
- Added JPYIcon for visual representation
- Implemented default currency selection based on user's location

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

<!-- end pr-codex -->
2024-08-23 06:10:06 +00:00
jnsdls 201a4b3b8f [Update] Refine billing alerts based on account status and usage limits (#4261) 2024-08-23 05:59:32 +00:00
jnsdls 716a4d8c26 [Update] Expand CSP for style-src and font-src to include Vercel domains (#4262)
tl;dr: https://vercel.com/docs/workflow-collaboration/vercel-toolbar/managing-toolbar#using-a-content-security-policy
2024-08-23 05:54:30 +00:00
jnsdls 9a86559c36 [Update] Enhance billing alerts based on account plan and usage limits (#4259)
<!-- start pr-codex -->

## PR-Codex overview
This PR adds conditional alerts based on user's usage and plan in the billing section.

### Detailed summary
- Added `isFreePlan` and `isGrowthPlan` constants based on user's plan
- Updated conditions to show alerts based on usage limits and plan
- Included specific messages for different scenarios and plans

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

<!-- end pr-codex -->
2024-08-23 05:22:14 +00:00
jnsdls 3853e17656 [Refactor] Update useQuery implementation and remove unused imports (#4258) 2024-08-23 03:05:51 +00:00
jnsdls ac2bb59fa0 [Refactor] Update useQuery implementation across multiple hooks (#4257) 2024-08-23 01:20:48 +00:00
Jonas DanielsandGitHub 14696d32fc [Update] Enhance ContractOverviewPage component rendering (#4256) 2024-08-22 17:26:29 -07:00
jnsdls dc903ae029 [Refactor] Update account count fetching using thirdweb hooks (#4255)
<!-- start pr-codex -->

## PR-Codex overview
The focus of this PR is to refactor the `sdk.ts` file by removing unused imports and simplifying the `getThirdwebSDK` function.

### Detailed summary
- Removed unused imports and type declarations in `sdk.ts`
- Simplified the `getThirdwebSDK` function parameters
- Improved performance by optimizing the `sdkKey` calculation
- Removed signer update logic in `getThirdwebSDK`
- Refactored `account-cell.tsx` by updating imports and using `thirdweb` library functions
- Updated `useAccountCount` function to use `getContract` and `useReadContract` from `thirdweb` library

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

<!-- end pr-codex -->
2024-08-23 00:14:01 +00:00
FirekeeperandGitHub be03c28b5d .NET 1.5.0 / Unity 5.0.0-beta.4 Docs (#4199) 2024-08-22 17:07:53 -07:00
kien-ngo bdf9507de8 [Dashboard] Overview page (#4222)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR updates various components in the contract UI to use the `useContract` hook and `ThirdwebContract` type for better contract handling.

### Detailed summary
- Updated components to use `useContract` hook and `ThirdwebContract` type
- Removed unnecessary imports and code duplication
- Refactored contract-related logic for improved readability

> The following files were skipped due to too many changes: `apps/dashboard/src/contract-ui/tabs/overview/components/ContractChecklist.tsx`

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

<!-- end pr-codex -->
2024-08-22 23:48:19 +00:00
edwardysun 86d2bafd72 Remove Coming Soon on Pay webhooks dashboard event type (#4254)
## Problem solved

Removes "Coming Soon" badge - confusing UI

<!-- start pr-codex -->

---

## PR-Codex overview
This PR removes the `Badge` component from the `CreateWebhookButton` in `webhooks.client.tsx`.

### Detailed summary
- Removed the `Badge` component from the form field in the `CreateWebhookButton`.
- Updated the `FormLabel` to remove the "Coming Soon" text.
- Adjusted the `Select` component with a default value and placeholder.

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

<!-- end pr-codex -->
2024-08-22 23:42:58 +00:00
MananTank 6b9bfb6ec7 Connect Playground UI tweaks (#4252)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to optimize the sidebar, improve accordion behavior, and enhance UI components.

### Detailed summary
- Removed unnecessary class from `Sidebar` component
- Adjusted styling in `page.tsx` for responsiveness
- Added functionality to close other accordions when one is opened
- Updated dependencies and added animations to `CustomAccordion`

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

<!-- end pr-codex -->
2024-08-22 23:38:14 +00:00
MananTank 8a618d7bd3 Migrate Mini connect playground to v5 in connect landing page (#4249)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR updates wallet functionality in the dashboard:

### Detailed summary
- Updated wallet options and social login methods
- Improved theme selection and modal size handling
- Removed unused components and assets

> The following files were skipped due to too many changes: `apps/dashboard/src/components/wallets/ConnectWalletMiniPlayground/MiniPlayground.tsx`

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

<!-- end pr-codex -->
2024-08-22 23:01:26 +00:00
jnsdls e97412bec8 [Refactor] Replace BigNumber with native BigInt operations (#4248)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
The PR focuses on refactoring and optimizing Solidity-related functions and updating contract-related hooks and queries for ERC721 and ERC1155 in the dashboard.

### Detailed summary
- Refactored `calculateIntMinValues` and `calculateIntMaxValues` functions for better performance.
- Updated contract-related hooks and queries for ERC721 and ERC1155 in `ContractChecklist.tsx`.
- Replaced `BigNumber` with `BigInt` for improved handling of integer values.

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

<!-- end pr-codex -->
2024-08-22 22:47:30 +00:00
jnsdls 626072cc0d remove unused code (#4247)
<!-- start pr-codex -->

## PR-Codex overview
The focus of this PR is to remove unused files, update dependencies, and refactor code structure.

### Detailed summary
- Removed unused files related to maps, gas estimator, and components
- Refactored `useHeightObserver` function
- Updated dependencies like `@tanstack/react-query` and `@stripe/react-stripe-js`
- Removed unused code related to contract code snippets and event handling
- Updated package versions and removed `idb-keyval` dependency

> The following files were skipped due to too many changes: `pnpm-lock.yaml`

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

<!-- end pr-codex -->
2024-08-22 22:21:14 +00:00
kien-ngo 5d6b1e1d0a [Dashboard] Migrate type: ProfileMetadata + ProfileMetadataInput (#4109)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR updates import paths for `ProfileMetadata` and `ProfileMetadataInput` to `constants/schemas`.

### Detailed summary
- Updated import paths for `ProfileMetadata` and `ProfileMetadataInput` to `constants/schemas` in multiple files.
- Added `ProfileSchemaInput` and `ProfileSchemaOutput` in `schemas.ts`.
- Updated type-casting in `fetchPublisherProfile` function.
- Changed parameter type in `useEditProfileMutation` function.

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

<!-- end pr-codex -->
2024-08-22 21:52:16 +00:00
jnsdls b1323ea211 [Refactor] Update useQuery implementation in API hooks (#4246)
<!-- start pr-codex -->

## PR-Codex overview
The focus of this PR is to refactor API query functions in the dashboard app to use `useQuery` with explicit query keys and query functions.

### Detailed summary
- Refactored `useApiChains` and `useFeatureContractCodeSnippetQuery` to use `useQuery` with specified query keys and query functions.
- Updated API query functions to be more explicit and maintainable.

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

<!-- end pr-codex -->
2024-08-22 21:45:56 +00:00
jnsdls cbbb414141 [Refactor] Remove query persistence and update import paths (#4245) 2024-08-22 21:33:55 +00:00
MananTank 0417ab45f1 Remove connect playground in dashboard (#4243)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to update links and paths related to the Connect Wallet Playground feature.

### Detailed summary
- Updated links to direct to `https://playground.thirdweb.com/connect/sign-in/button`
- Removed references to the deleted Connect Wallet Playground feature
- Updated sidebar and navigation links
- Updated redirects to new playground URL

> The following files were skipped due to too many changes: `apps/dashboard/src/components/wallets/ConnectWalletMiniPlayground/MiniPlayground.tsx`, `pnpm-lock.yaml`

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

<!-- end pr-codex -->
2024-08-22 21:09:21 +00:00
kien-ngo c49bbd3389 [Dashboard] Remove ethers from list-form (#4241)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to refactor the CreateListingsForm component in the listings tab to handle auction creation with improved currency handling.

### Detailed summary
- Refactored currency handling for auction creation
- Added `toUnits` and `toWei` functions
- Imported `decimals` from `thirdweb/extensions/erc20`
- Updated auction creation logic to handle different currencies

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

<!-- end pr-codex -->
2024-08-22 20:55:15 +00:00
kien-ngo f192875547 [Dashboard] Remove bignumber-input since it is for Claim phase v1 (#4242)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to remove the `WaitingTimeInput` component from the `ClaimConditionsPhase` component and related imports.

### Detailed summary
- Deleted `WaitingTimeInput` component import and usage in `ClaimConditionsPhase`
- Removed `WaitingTimeInput` component from the conditional rendering based on `isClaimPhaseV1`

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

<!-- end pr-codex -->
2024-08-22 20:43:49 +00:00
MananTank 55bf1ad5a3 Add Storybook for SDK (#4230)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to add Storybook configuration, update dependencies, and improve story components.

### Detailed summary
- Added Storybook configuration for `storybook` and `build-storybook`
- Updated dependencies for Storybook addons and Vite
- Improved story components for `ConnectButton` and `PayEmbed`
- Defined absolute paths in Storybook config for addons
- Added global CSS styling for Storybook preview
- Created utility functions for story client and wallet adapter

> The following files were skipped due to too many changes: `pnpm-lock.yaml`

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

<!-- end pr-codex -->
2024-08-22 16:36:54 +00:00
kien-ngo 01dd80fad9 [Dashboard] Hide AnnouncementBanner for Onchain Olympics [Merge after Aug 21] (#4176)
Merge this PR after Aug 21 🙏
2024-08-22 09:38:41 +00:00
Jonas DanielsGitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
279d81ec35 Version Packages (#4223)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-08-22 18:43:24 +12:00
joaquim-verges d93ec63cd7 fix(inApp): fix passkeyDomain prop not being respected on login web (#4239)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on fixing the passkey domain issue in the authentication process.

### Detailed summary
- Updated `types.ts` to remove optional domain object
- Modified `web-connector.ts` to use `passkeyDomain` instead of domain object for `rp` properties

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

<!-- end pr-codex -->
2024-08-22 05:01:31 +00:00
joaquim-verges a7f4484702 smart wallet dev tests (#4226)
## Problem solved

Adding a small test preset for dev to test smart wallet dev infra

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to add support for running tests in a test environment and to enhance smart wallet functionality.

### Detailed summary
- Added support for running tests in a test environment
- Updated smart wallet functionality for policy tests
- Modified fetch logic for `localhost` and `test` environments

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

<!-- end pr-codex -->
2024-08-22 04:45:29 +00:00
gregfromstl b38308d893 [TS SDK] Feature: Enable external redirect authentication for electron support (#4237)
Adds the ability to pass a `redirectUrl` and `redirectExternally` boolean to `authenticate`. This will allow electron apps to authenticate with in-app wallet social auth.

<!-- start pr-codex -->

---

## PR-Codex overview
This PR introduces a new authentication mode "window" and enables external redirects for electron support.

### Detailed summary
- Added a new authentication mode "window" for in-app authentication
- Enabled external redirects for electron support
- Updated authentication modes in various files
- Updated authentication methods to support new mode and redirect URL

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

<!-- end pr-codex -->
2024-08-22 04:40:30 +00:00
MananTank 7ef1c721ef Update Playground (#4178)
Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

This PR introduces new authentication features, refactors UI components, adds redirect functionality, and enhances code formatting.

- Added new authentication features
- Refactored UI components
- Added redirect functionality
- Enhanced code formatting

> The following files were skipped due to too many changes: `apps/playground-web/src/app/providers.tsx`, `apps/playground-web/src/components/ui/input.tsx`, `apps/playground-web/src/app/connect/sign-in/components/types.ts`, `apps/playground-web/src/components/ui/CustomRadioGroup.tsx`, `apps/playground-web/package.json`, `apps/playground-web/src/components/ui/CopyButton.tsx`, `packages/thirdweb/src/react/web/ui/ConnectWallet/WalletSelector.tsx`, `apps/playground-web/src/components/code/RenderCode.tsx`, `apps/playground-web/src/components/code/code.client.tsx`, `apps/playground-web/src/app/connect/sign-in/components/CollapsibleSection.tsx`, `apps/playground-web/src/components/ui/checkbox.tsx`, `apps/playground-web/src/app/AppSidebar.tsx`, `apps/playground-web/src/components/ui/DynamicHeight.tsx`, `apps/playground-web/src/components/ui/switch.tsx`, `apps/playground-web/src/components/code/code-example.tsx`, `apps/playground-web/src/components/blocks/APIHeader.tsx`, `apps/playground-web/src/app/layout.tsx`, `apps/playground-web/src/components/code/code.tsx`, `apps/playground-web/src/components/ui/radio-group.tsx`, `packages/thirdweb/src/react/web/ui/ConnectWallet/Modal/ConnectEmbed.tsx`, `apps/playground-web/src/app/connect/sign-in/components/LocaleFormControl.tsx`, `apps/playground-web/src/components/ui/button.tsx`, `apps/playground-web/src/components/ui/scroll-area.tsx`, `apps/playground-web/src/app/connect/sign-in/embed/page.tsx`, `apps/playground-web/src/app/connect/sign-in/headless/page.tsx`, `apps/playground-web/src/components/ui/tooltip.tsx`, `apps/playground-web/src/components/ui/CustomAccordion.tsx`, `apps/playground-web/src/app/MobileHeader.tsx`, `apps/playground-web/src/app/connect/sign-in/button/page.tsx`, `apps/playground-web/public/thirdweb.svg`, `apps/playground-web/src/app/connect/sign-in/components/InAppWalletFormGroup.tsx`, `apps/playground-web/src/app/globals.css`, `apps/playground-web/src/app/connect/auth/page.tsx`, `apps/playground-web/src/app/connect/pay/page.tsx`, `apps/playground-web/src/components/ui/ScrollShadow/ScrollShadow.tsx`, `apps/playground-web/src/app/connect/in-app-wallet/page.tsx`, `apps/playground-web/src/app/connect/blockchain-api/page.tsx`, `apps/playground-web/src/app/connect/account-abstraction/page.tsx`, `apps/playground-web/src/app/connect/sign-in/components/WalletsSelection.tsx`, `pnpm-lock.yaml`, `apps/playground-web/src/components/ui/sidebar.tsx`, `apps/playground-web/src/app/connect/sign-in/components/CodeGen.tsx`, `apps/playground-web/src/app/connect/sign-in/components/ColorFormGroup.tsx`, `apps/playground-web/src/components/ui/select.tsx`, `apps/playground-web/src/app/connect/sign-in/button/RightSection.tsx`, `apps/playground-web/src/app/connect/sign-in/button/LeftSection.tsx`

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

<!-- end pr-codex -->
2024-08-22 01:14:22 +05:30
MananTank c48a0b1105 Remove collapse toggle from Trusted Forwards form control in deploy page (#4231)
FIXES: DASH-167
2024-08-21 17:37:16 +00:00
kien-ngo 6b9b3efb51 [Dashboard] Account page v5 (#4219)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to update the contract UI components to use the latest contract data and improve the account creation process.

### Detailed summary
- Updated `useRouteConfig.tsx` to conditionally render `LazyContractAccountsPage`
- Refactored `CreateAccountButton.tsx` to use `ThirdwebContract`
- Modified `page.tsx` to use `ThirdwebContract` and `ExtensionDetectedState` types

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

<!-- end pr-codex -->
2024-08-21 17:14:01 +00:00
kien-ngo 654cbbaa2e [Dashboard] Permission page to v5 (#4218)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to implement a feature that detects and handles permissions enumerable in contracts.

### Detailed summary
- Added detection and handling of `PermissionsEnumerable` feature in contracts
- Updated components to utilize the detected `PermissionsEnumerable` flag
- Refactored and optimized contract permission handling logic

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

<!-- end pr-codex -->
2024-08-21 17:13:58 +00:00
Joe-ThirdwebandGitHub 88bbbd5a01 Joe - Chainlist Page update 0gLabs (#4233) 2024-08-21 10:10:51 -07:00
kien-ngo 0c2fd4db98 [Dashboard] Remove ethers from int-input (#4234)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR replaces `parseEther` with `toWei` in `SolidityIntInput` component for input conversion.

### Detailed summary
- Replaced `parseEther` with `toWei` for input conversion
- Updated import from `thirdweb`
- Removed unused import of `useCallback`
- Updated `Button` import from `tw-components`

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

<!-- end pr-codex -->
2024-08-21 17:02:45 +00:00
kien-ngo 2c37732984 [SDK] Fix abi param parsing (#4229)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to enhance the parsing functionality for Solidity types in the contract UI components and transaction handling.

### Detailed summary
- Added parsing logic for `string` type in `parseAbiParams`
- Improved handling of different data types in contract transactions
- Added test cases for parsing `string` and `number` in contract transactions

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

<!-- end pr-codex -->
2024-08-21 17:02:36 +00:00
MananTank 783e448e2e Stricter correctness rules in biome (#4216)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to remove unnecessary error handling blocks in various catch statements.

### Detailed summary
- Removed error variable from catch blocks in multiple files.
- Simplified catch blocks to just `catch {}` where error handling was not required.

> The following files were skipped due to too many changes: `apps/dashboard/src/utils/fetchChain.ts`, `packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/main/useBuyTxStates.ts`, `packages/thirdweb/src/react/core/hooks/transaction/useSendTransaction.ts`, `packages/thirdweb/src/auth/verify-hash.ts`, `packages/thirdweb/src/contract/verification/constructor-params.ts`, `apps/wallet-ui/src/components/NftModal.tsx`, `apps/playground-web/src/components/in-app-wallet/connect-button.tsx`, `apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/(chainPage)/components/server/ChainOverviewSection.tsx`, `packages/thirdweb/src/extensions/erc721/lazyMinting/write/createDelayedRevealBatch.ts`, `packages/thirdweb/src/react/web/ui/ConnectWallet/screens/WalletConnectReceiverScreen.tsx`, `apps/dashboard/src/contract-ui/components/solidity-inputs/helpers.ts`, `packages/service-utils/src/core/api.ts`, `apps/playground-web/src/components/in-app-wallet/sponsored-tx.tsx`, `apps/playground-web/src/components/account-abstraction/sponsored-tx.tsx`, `apps/playground-web/src/app/connect/auth/page.tsx`, `apps/dashboard/src/components/contract-components/hooks.ts`, `packages/thirdweb/src/wallets/in-app/native/helpers/auth/middleware.ts`, `apps/dashboard/src/lib/sdk.ts`, `apps/playground-web/src/app/page.tsx`, `apps/dashboard/src/contexts/configured-chains.tsx`, `legacy_packages/unity-js-bridge/src/thirdweb-bridge.ts`, `packages/thirdweb/src/cli/commands/generate/generate.ts`

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

<!-- end pr-codex -->
2024-08-21 09:56:04 +00:00
MananTank 6c87d7ba3a Add useHookAtTopLevel rule in biome and fix lint errors (#4213)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to address linting issues related to the use of hooks at the top level in various components.

### Detailed summary
- Added `correctness` rule in `biome.json` for `useHookAtTopLevel`
- Added error handling and comments for `useQuery` in `useReadContract` functions
- Refactored `RNImage.tsx` to use `useMemo` for image handling
- Improved error handling in `ViewNFTs.tsx` for `fetchNFTs` function

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

<!-- end pr-codex -->
2024-08-21 01:11:23 +00:00
kien-ngo 6b8bde1abf [Dashboard] Replace useSDKChainId (#4217)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to refactor hook dependencies in the dashboard component to use `useDashboardEVMChainId` instead of `useSDKChainId`.

### Detailed summary
- Updated imports to use `useDashboardEVMChainId` from `@3rdweb-sdk/react`
- Replaced all instances of `useSDKChainId` with `useDashboardEVMChainId`

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

<!-- end pr-codex -->
2024-08-21 00:40:41 +00:00
kien-ngo 81b33c7d7c [Dashboard] useContractEvents to v5 (#4215)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR updates event handling in the dashboard by refactoring components, adding type definitions, and improving event filtering.

### Detailed summary
- Refactored components to handle events using `ThirdwebContract` type
- Added type definitions for `InternalTransaction` and `PreparedEvent`
- Improved event filtering and handling in `useActivity` and `EventsFeed`
- Updated `LatestEvents` and `ContractEventsPage` components to use `ThirdwebContract` type

> The following files were skipped due to too many changes: `apps/dashboard/src/contract-ui/tabs/events/components/events-feed.tsx`

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

<!-- end pr-codex -->
2024-08-21 00:40:40 +00:00
kien-ngo e37ac839b2 [Dashboard] claim-condition page (#4208)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to update claim conditions for ERC721, ERC1155, and ERC20 contracts.

### Detailed summary
- Updated claim condition tabs for ERC721, ERC1155, and ERC20 contracts
- Added detection of new claim conditions for different contract types
- Refactored components to use updated contract information

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

<!-- end pr-codex -->
2024-08-21 00:24:22 +00:00
kien-ngo 462e1fd2aa [Dashboard] chore: remove getErc (1155) (#4207)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to refactor the `useNFTDrawerTabs` function in the `useNftDrawerTabs.tsx` file to use `isERC1155` instead of `erc1155` for better clarity.

### Detailed summary
- Refactored references from `erc1155` to `isERC1155` for clarity
- Updated `contractAddress` and `chainId` values to use `contract` object properties instead of `erc1155`

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

<!-- end pr-codex -->
2024-08-20 23:58:29 +00:00
kien-ngo b4d8be4f91 [Dashboard] Remove some stuff from claim-condition-form (#4206)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR updates the Claim Conditions Form component to use the `useReadContract` hook and `decimals` extension from `thirdweb/extensions/erc20`.

### Detailed summary
- Replaced `useTokenDecimals` with `useReadContract` for token decimals retrieval
- Added `decimals` import from `thirdweb/extensions/erc20`
- Added `useReadContract` import from `thirdweb/react`

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

<!-- end pr-codex -->
2024-08-20 23:57:54 +00:00
kien-ngo 15b7e8cfb8 [Dashboard] Remove type UploadProgressEvent (#4205)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to re-export `UploadProgressEvent` type and import it in `batch-lazy-mint-button.tsx`.

### Detailed summary
- Re-exported `UploadProgressEvent` type from `progress-box.tsx`
- Imported `UploadProgressEvent` in `batch-lazy-mint-button.tsx`

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

<!-- end pr-codex -->
2024-08-20 23:57:52 +00:00
kien-ngo 886094fbac [Dashboard] Migrate /code page to v5 (#4204)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR improves contract code rendering in the dashboard.

### Detailed summary
- Updated rendering logic for contract code in various components
- Added type `AbiType` for compatibility
- Refactored `ContractCodePage` to use `ThirdwebContract` instead of `contractAddress`

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

<!-- end pr-codex -->
2024-08-20 22:36:27 +00:00
gregandGitHub 0a1bce8fa8 FIX: In-App Metadata Image Display (#4214) 2024-08-20 15:19:37 -07:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
3ccfa981a8 chore(deps): bump @sentry/nextjs from 8.9.2 to 8.26.0 (#4182)
Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-20 15:10:32 -07:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
fb96e83081 chore(deps-dev): bump tailwindcss from 3.4.4 to 3.4.10 (#4183)
Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-20 14:57:14 -07:00
Jonas DanielsandGitHub 9768b0c0b7 [Refactor] Update account plan management and remove trial-related logic (#4221) 2024-08-20 14:55:26 -07:00
Jonas DanielsandGitHub 2312f61329 [Update] Replace abuse redirect with email link (#4220) 2024-08-20 14:54:50 -07:00
Jonas DanielsandGitHub 042439aab9 [Refactor] Remove Twitter handles from ambassadors list (#4209) 2024-08-20 14:54:04 -07:00
kien-ngo 0368ee538e [Dashboard] Add useDashboardOwnedNFTs hook (#4203)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to update the `quantityOwned` type in the NFTs types, add a new hook for getting owned NFTs, and make adjustments in the Create Listings Form component.

### Detailed summary
- Updated `quantityOwned` type to `bigint` in NFTs types.
- Added `useDashboardOwnedNFTs` hook for fetching owned NFTs.
- Adjusted logic in Create Listings Form component for using the new hook and contract handling.

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

<!-- end pr-codex -->
2024-08-20 21:37:09 +00:00
gregfromstl c6d4aef91b Revert "Dashboard: Allow more domains (#4192)" (#4212)
This reverts commit 4bf8296546.

## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR updates the domain validation logic in `validations.ts` to allow only "localhost" as a domain prefix.

### Detailed summary
- Updated domain validation to allow only "localhost" as a domain prefix.

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

<!-- end pr-codex -->
2024-08-20 21:15:09 +00:00
kien-ngo 86c953f18e [Dashboard] Remove useContract from Explorer page (#4202)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to update contract-related components and hooks to use `ThirdwebContract` instead of `SmartContract`.

### Detailed summary
- Updated components and hooks to use `ThirdwebContract` instead of `SmartContract`
- Added conditional rendering based on contract and ABI availability
- Removed unnecessary imports and code snippets

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

<!-- end pr-codex -->
2024-08-20 20:33:38 +00:00
MananTank 4ce4072031 Hide Buy Funds section on testnet chain pages (#4210)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR adds a conditional rendering for a `FaucetSection` component based on the `chain.testnet` value in the `page.tsx` file of the `chainPage` in the dashboard.

### Detailed summary
- Added conditional rendering for `FaucetSection` based on `chain.testnet` value
- Renamed "Buy Funds" to "Faucet / Buy Funds"
- Updated rendering logic for `FaucetSection` and `BuyFundsSection` based on `chain.testnet` and service availability

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

<!-- end pr-codex -->
2024-08-20 20:18:41 +00:00
Jonas DanielsGitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
bd42363602 Version Packages (#4175)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-08-20 11:27:36 -07:00
gregfromstl 42cdc3a2bc UI Cleanup (#4191)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR updates the connect modal styles and adds support for wallet authentication in the authentication flow.

### Detailed summary
- Updated connect modal styles
- Added support for wallet authentication
- Modified styles for various UI components
- Added a new component for copying addresses
- Improved wallet image rendering based on wallet type

> The following files were skipped due to too many changes: `packages/thirdweb/src/wallets/custom/smart/image.ts`, `packages/thirdweb/src/react/web/ui/ConnectWallet/Details.tsx`

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

<!-- end pr-codex -->
2024-08-20 17:52:34 +00:00
MananTank 4abf7a7f25 Fix Conditionally rendered hook error in Buy with Fiat flow (#4211)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on fixing a conditionally rendered hook error when buying funds using fiat.

### Detailed summary
- Added a new `onPostOnrampSuccess` function to handle successful post onramp swap
- Changed the logic to report fiat status instead of post onramp swap status after successful swap

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

<!-- end pr-codex -->
2024-08-20 17:31:14 +00:00
kien-ngo 8b0fd13adb [Dashboard] Sources page to v5 (#4201)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to update contract-related components and hooks, resolve ABI types, and improve UX in the dashboard.

### Detailed summary
- Updated components and hooks related to contracts
- Resolved ABI types with `abitype`
- Improved UX in the dashboard by updating sources display

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

<!-- end pr-codex -->
2024-08-20 17:11:57 +00:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
20bd3aa399 chore(deps): bump tailwind-merge from 2.4.0 to 2.5.2 (#4189)
Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-20 10:10:48 -07:00
joaquim-verges fcfd22c01e feat(adapters): add documentation for wagmi and privy integration (#4198)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to update the usage of adapters in the thirdweb SDK for compatibility with different libraries.

### Detailed summary
- Updated adapter names in sidebar links
- Added new adapters in sidebar
- Modified the conversion process for ethers5 and ethers6 adapters
- Added examples for using thirdweb SDK with wagmi and privy

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

<!-- end pr-codex -->
2024-08-20 16:54:22 +00:00
kien-ngo 8dc23e376e [Dashboard] Fix import path (#4200)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR updates the dashboard contract UI tabs page by removing unused imports and refactoring some dependencies.

### Detailed summary
- Removed unused import `thirdwebClient`
- Refactored dependencies related to `3rdweb-sdk/react` and `3rdweb-dev/react`

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

<!-- end pr-codex -->
2024-08-20 10:12:12 +00:00
Kien NgoandGitHub 542f97dc4b [Dashboard] Migrate useContractSources to v5 (#4145) 2024-08-20 21:04:19 +12:00
kien-ngo 46ca21d128 [Dashboard] Explorer page to v5 (#4174)
<!-- start pr-codex -->

## PR-Codex overview
The focus of this PR is to enhance contract function interaction by integrating V5 features and updating contract call handling.

### Detailed summary
- Added `useV5DashboardChain` and `getContract` from `lib/v5-adapter` and `thirdweb` respectively
- Updated `ContractFunction` component to use V5 contract and handle contract calls
- Updated `InteractiveAbiFunction` component to use `ThirdwebContract` and improve contract call handling

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

<!-- end pr-codex -->
2024-08-20 08:45:43 +00:00
kien-ngo 551349cbc6 [Dashboard] envs clean-up (#4170)
- [x] Remove a lof of duplicated instances of `ThirdwebClient` & env variables across multiple files
- [x] There's only 1 main ThirdwebClient from now on which can be imported from `lib/thirdweb-client`. It can switch between clientId and secretKey depends on the environment
- [x] All env variables like `DASHBOARD_THIRDWEB_CLIENT_ID`, `DASHBOARD_THIRDWEB_SECRET_KEY`, `isProd` etc. now live inside `@/constants/env`

<!-- start pr-codex -->

---

## PR-Codex overview
This PR updates import paths and constants related to the `thirdwebClient` and `isProd` across multiple files.

### Detailed summary
- Updated import paths for `thirdwebClient` and `isProd`
- Replaced `constants/rpc` with `constants/env`
- Removed unused imports and constants

> The following files were skipped due to too many changes: `apps/dashboard/src/contract-ui/tabs/overview/page.tsx`, `apps/dashboard/src/contract-ui/tabs/nfts/components/airdrop-tab.tsx`, `apps/dashboard/src/components/app-layouts/app.tsx`, `apps/dashboard/src/components/app-layouts/provider-setup.tsx`, `apps/dashboard/src/contract-ui/tabs/manage/page.tsx`, `apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/(chainPage)/opengraph-image.tsx`, `apps/dashboard/src/lib/sdk.ts`, `apps/dashboard/src/@/constants/client.ts`, `apps/dashboard/src/app/(dashboard)/(chain)/components/server/chain-icon.tsx`, `apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/(chainPage)/components/client/FaucetButton.tsx`, `apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/tx/[txHash]/page.tsx`, `apps/dashboard/src/pages/api/moralis/balances.ts`

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

<!-- end pr-codex -->
2024-08-20 07:55:31 +00:00
gregfromstl 4bf8296546 Dashboard: Allow more domains (#4192)
Requested for electron app domains

<!-- start pr-codex -->

---

## PR-Codex overview
This PR loosens the domain validation in `validations.ts` to allow cases where strict validation was causing issues.

### Detailed summary
- Loosened domain validation to allow cases where strict validation was too limiting
- Updated the condition to check if the domain includes ":" instead of splitting it

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

<!-- end pr-codex -->
2024-08-20 07:34:44 +00:00
Joaquim VergesandGitHub 7efef7d9e1 feat(pay): show pay modal when insufficient balance for gas cost (#4194) 2024-08-20 19:29:52 +12:00
kien-ngo 4d85aa56c6 [Dashboard] Fix types for contract published version (#4197)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR updates the `publish.tsx` and `index.tsx` files to handle cases where `version` is undefined by defaulting to "latest".

### Detailed summary
- In `publish.tsx`, added a default value of "latest" if `v` is undefined in the `SelectItem` component.
- In `index.tsx`, changed the `version` type from `string` to `string | undefined` and added a default value of "latest" if `version` is undefined when constructing the `PublishedContractOG` object.

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

<!-- end pr-codex -->
2024-08-20 07:18:40 +00:00
Jonas DanielsandGitHub decc1a56d2 [Fix] Handle optional versions in contract publishing (#4196) 2024-08-19 21:57:27 -07:00
joaquim-verges a60db3a057 feat(adapters): add documentation and examples for ethers5, ethers6, and viem adapters (#4195)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to introduce adapters for converting between Thirdweb and ethers.js/viem objects.

### Detailed summary
- Added `ethers5Adapter` and `ethers6Adapter` for Thirdweb to ethers.js conversion
- Added `viemAdapter` for Thirdweb to viem conversion
- Convert Thirdweb accounts, contracts, clients to ethers.js/viem and vice versa

> The following files were skipped due to too many changes: `packages/thirdweb/src/adapters/viem.ts`

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

<!-- end pr-codex -->
2024-08-20 04:51:32 +00:00
Jonas DanielsandGitHub 377f176b10 [Refactor] Replace max with min function and update import paths (#4193) 2024-08-19 20:08:13 -07:00
joaquim-verges 5ead75e41a fix(dashboard): update Expo Starter repo URL (#4190)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to update the repository link in the Expo Starter template from `node-starter` to `expo-starter`.

### Detailed summary
- Updated repository link from "https://github.com/thirdweb-example/node-starter" to "https://github.com/thirdweb-example/expo-starter".

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

<!-- end pr-codex -->
2024-08-20 00:32:31 +00:00
MananTank 8836c27b8d Fix Table loading spinner position (#4187)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR adds a `className="relative"` to various `TableContainer` components in different files for improved styling consistency.

### Detailed summary
- Added `className="relative"` to `TableContainer` in `contract-table/index.tsx`
- Added `className="relative"` to `TableContainer` in `contract-table-v2/index.tsx`
- Added `className="relative"` to `TableContainer` in `deployed-contracts.tsx`
- Added `className="relative"` to `TableContainer` in `table.tsx`
- Added `className="relative"` to `TableContainer` in `marketplace-table.tsx`

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

<!-- end pr-codex -->
2024-08-20 00:04:50 +00:00
kien-ngo cbd6fd87d0 [SDK] Update Lens test (#4188)
<!-- start pr-codex -->

## PR-Codex overview
This PR focuses on updating a test in `resolveAddress.test.ts` to run only if a secret key is provided.

### Detailed summary
- Updated test to run only if `process.env.TW_SECRET_KEY` is provided.

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

<!-- end pr-codex -->
2024-08-19 21:51:35 +00:00
kien-ngo ef9cc55b69 [Dashboard] Remove v4 code on some Marketplace components
(#4128)

## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR exposes `max()` and `min()` utility methods for bigints and updates marketplace-related components to use these methods for better handling of large numbers.

### Detailed summary
- Exposes `max()` and `min()` utility methods for bigints in `thirdweb/utils`
- Updates components in `dashboard` related to marketplace to use `max()` and `min()` for handling large numbers efficiently

> The following files were skipped due to too many changes: `apps/dashboard/src/contract-ui/tabs/overview/components/MarketplaceDetails.tsx`

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

<!-- end pr-codex -->
2024-08-19 20:06:26 +00:00
kien-ngo 15899ea231 [Dashboard] Fix styling for no-image NFT (#4181)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to update the styling of the `NFTMedia` component by adding explicit `width` and `height` properties.

### Detailed summary
- Added inline styles for `width` and `height` based on `props`
- Updated `className` to include `border-border` class

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

<!-- end pr-codex -->
2024-08-19 19:47:32 +00:00
kien-ngo bd4669984d [Portal] Update some docs (#4177)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to introduce gasless transaction configurations and transaction annotations.

### Detailed summary
- Added gasless transaction configurations for Engine, OpenZeppelin, and Biconomy providers
- Introduced transaction annotations for Engine, OpenZeppelin, and gasless options
- Updated transaction button components to include transaction annotations
- Exposed GaslessOptions type for gasless transactions configuration

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

<!-- end pr-codex -->
2024-08-19 19:29:55 +00:00
MananTank fb799ccb6d Move publish metadata spinner inside form, show error message (#4180)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR adds an error message display for failed metadata fetch in the `CustomContractForm` component.

### Detailed summary
- Added error message display for failed metadata fetch
- Imported `InfoIcon` component
- Removed conditional rendering for loading spinner outside the form provider block

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

<!-- end pr-codex -->
2024-08-19 18:24:20 +00:00
kien-ngo c8f7a68225 [Dashboard] (partial) useContract removal (#4111)
Slowly moving everything upward. This PR mainly focuses on removing `useContract` from the page level (`page.tsx` files)

Routes to test:
- [x] direct listings page
- [x] english auction page
- [x] Split contract page
- [x] Contract account page
- [x] contract settings page
- [x] contract token page

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to update various components to use `ThirdwebContract` instead of `contractAddress` and `chainId`.

### Detailed summary
- Update components to use `ThirdwebContract` instead of `contractAddress` and `chainId`
- Replace `useContract` calls with `contract.address`
- Import `ThirdwebContract` type for type checking

> The following files were skipped due to too many changes: `apps/dashboard/src/contract-ui/tabs/shared-components/marketplace-table.tsx`, `apps/dashboard/src/contract-ui/tabs/shared-components/cancel-tab.tsx`, `apps/dashboard/src/contract-ui/tabs/shared-components/listing-drawer.tsx`, `apps/dashboard/src/contract-ui/tabs/english-auctions/components/table.tsx`, `apps/dashboard/src/contract-ui/tabs/direct-listings/components/table.tsx`, `apps/dashboard/src/contract-ui/tabs/english-auctions/page.tsx`, `apps/dashboard/src/contract-ui/tabs/direct-listings/page.tsx`, `apps/dashboard/src/contract-ui/tabs/split/page.tsx`, `apps/dashboard/src/contract-ui/tabs/overview/page.tsx`, `apps/dashboard/src/contract-ui/tabs/shared-components/list-button.tsx`, `apps/dashboard/src/contract-ui/tabs/account-permissions/page.tsx`, `apps/dashboard/src/contract-ui/tabs/embed/page.tsx`, `apps/dashboard/src/contract-ui/tabs/settings/page.tsx`, `apps/dashboard/src/contract-ui/tabs/account/page.tsx`, `apps/dashboard/src/contract-ui/tabs/tokens/page.tsx`, `apps/dashboard/src/contract-ui/hooks/useRouteConfig.tsx`

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

<!-- end pr-codex -->
2024-08-19 18:12:53 +00:00
gregfromstl 246701d615 Wallet Linking UI (#4124)
https://github.com/user-attachments/assets/abf70934-8070-4844-8f15-8db6ec40c116

<!-- start pr-codex -->

---

## PR-Codex overview
This PR adds the ability to link a wallet in the Connect UI.

### Detailed summary
- Added a new `linkWallet` field in locale types for various languages
- Updated UI components to support linking a wallet
- Introduced `WalletAuth` component for wallet authentication
- Modified wallet selection behavior in `WalletSelector` component

> The following files were skipped due to too many changes: `packages/thirdweb/src/react/web/ui/ConnectWallet/WalletSelector.tsx`, `packages/thirdweb/src/react/web/wallets/shared/PassKeyLogin.tsx`, `packages/thirdweb/src/react/web/wallets/in-app/WalletAuth.tsx`

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

<!-- end pr-codex -->
2024-08-19 17:01:20 +00:00
Joaquim VergesandGitHub cb591aa6af feat(pay): only show pay modal if the active account doesnt have enough funds (#4172) 2024-08-19 21:15:54 +12:00
Jonas DanielsGitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
09927f3ac5 Version Packages (#4162)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-08-19 20:17:56 +12:00
gregfromstl 7778063458 Improve Blobbie Appearance (#4173)
Blobbies now select from a subset of predefined colors to form a basic radial gradient form the bottom right corner.

![image](https://github.com/user-attachments/assets/5b708533-506d-417d-ac49-2356aa0a2247)

<!-- start pr-codex -->

---

## PR-Codex overview
This PR updates the appearance of the Blobbie avatar in the ConnectWallet feature of `thirdweb`.

### Detailed summary
- Updated Blobbie appearance with unique gradient colors based on address
- Replaced complex color pairing logic with predefined color options
- Simplified Blobbie rendering logic for better performance

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

<!-- end pr-codex -->
2024-08-19 06:17:43 +00:00
Joaquim VergesandGitHub 574ff0295d feat(dashboard): update apple-app-site-association for universal links (#4171) 2024-08-19 11:54:40 +12:00
kien-ngo a43907e2df [SDK] resolveAddress for Lens handles (#4150)
<!-- start pr-codex -->

## PR-Codex overview
The focus of this PR is to enhance the `Lens` extension in the `thirdweb` package by adding the ability to resolve addresses and handle crypto transactions efficiently.

### Detailed summary
- Added `resolveAddress` function for handling crypto transactions with lens handles
- Updated contract addresses and overrides for Lens smart contracts
- Created tests for `resolveAddress` function to ensure correct address resolution

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

<!-- end pr-codex -->
2024-08-18 23:10:46 +00:00
kien-ngo f6d6c86ec0 [Dashboard] Fix ENS resolve issue (#4168)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR updates the `thirdwebClient` configuration in `thirdweb-client.ts` to include a `secretKey` option if `DASHBOARD_THIRDWEB_SECRET_KEY` is defined.

### Detailed summary
- Updated `thirdwebClient` configuration to include `secretKey` if `DASHBOARD_THIRDWEB_SECRET_KEY` is defined
- Added conditional logic for `secretKey` presence

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

<!-- end pr-codex -->
2024-08-18 22:21:10 +00:00
Joaquim VergesandGitHub 23041c013f feat(dashboard): add apple universal link association (#4169) 2024-08-19 10:04:20 +12:00
kien-ngo 43f9319ac7 [SDK] Add GaslessOptions to useSendAndConfirmTransaction (#4165)
<!-- start pr-codex -->

## PR-Codex overview
The focus of this PR is to add Gasless transaction support for the `sendTransaction` and `sendAndConfirmTransaction` functions, as well as for the `useSendTransaction` and `useSendAndConfirmTransaction` hooks.

### Detailed summary
- Added `GaslessOptions` support to `sendTransaction`
- Introduced Gasless usage with `thirdweb Engine` in various transaction-related functions and hooks
- Added `GaslessOptions` configuration to `useSendTransaction` and `useSendAndConfirmTransaction` hooks
- Updated documentation and examples to showcase Gasless transaction usage

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

<!-- end pr-codex -->
2024-08-18 10:05:37 +00:00
kien-ngo fc8daaa2bc [Dashboard] Remove ethers.js (#4163)
<!-- start pr-codex -->

## PR-Codex overview
This PR focuses on exporting a utility method `isBytes` and updating types to `bigint`.

### Detailed summary
- Exported `isBytes` utility method
- Updated `nextTokenIdToMint` type to `bigint`
- Updated imports for `isAddress`, `isBytes`, and `isHex`
- Refactored display balance calculations to use `toTokens` function

> The following files were skipped due to too many changes: `apps/dashboard/src/contract-ui/tabs/nfts/components/batch-lazy-mint-button.tsx`

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

<!-- end pr-codex -->
2024-08-18 07:04:05 +00:00
kien-ngo 9133b45700 [Dashboard] useVote to v5 (#4154)
<!-- start pr-codex -->

## PR-Codex overview
This PR updates TypeScript documentation and refactors Vote-related components for clarity and consistency.

### Detailed summary
- Updated TypeScript documentation for `ProposalVoteInfo`
- Refactored `VoteButton` and `DelegateButton` components to use `ThirdwebContract`
- Improved display of voting token decimals in `Proposal` component

> The following files were skipped due to too many changes: `apps/dashboard/src/@3rdweb-sdk/react/hooks/useVote.ts`

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

<!-- end pr-codex -->
2024-08-18 05:02:05 +00:00
kien-ngo 44c78f4643 [Dashboard] useRemoveContractMutation to v5 + minor cleanups (#4155)
<!-- start pr-codex -->

## PR-Codex overview
The focus of this PR is to refactor gasless transaction handling in the Dashboard by centralizing contract addresses and relayer URLs.

### Detailed summary
- Introduced `MULTICHAIN_REGISTRY_CONTRACT` constant for contract address
- Centralized relayer URL and forwarder address in `DASHBOARD_ENGINE_RELAYER_URL` and `DASHBOARD_FORWARDER_ADDRESS`
- Updated functions to use centralized constants for contract addresses and relayer URLs

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

<!-- end pr-codex -->
2024-08-18 03:55:32 +00:00
kien-ngo 7aee37b10f [Dashboard] Replace useSDKChainId with useDashboardEVMChainId (#4144)
<!-- start pr-codex -->

## PR-Codex overview
The focus of this PR is to replace the usage of `useSDKChainId` with `useDashboardEVMChainId` in multiple components for better compatibility and functionality.

### Detailed summary
- Replaced `useSDKChainId` with `useDashboardEVMChainId` in multiple components.
- Updated imports and dependencies accordingly.
- Improved compatibility and functionality for the dashboard.

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

<!-- end pr-codex -->
2024-08-18 03:43:32 +00:00
kien-ngo 23a665bdaa [Dashboard] Remove v4 type: OptionalPropertiesInput (#4158)
<!-- start pr-codex -->

## PR-Codex overview
The focus of this PR is to update the type definition for `attributes` in the `IPropertyFieldValues` interface.

### Detailed summary
- Updated `OptionalPropertiesInput` type definition to be a key-value pair object
- Changed `attributes` type in `IPropertyFieldValues` interface to use the updated type definition

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

<!-- end pr-codex -->
2024-08-18 03:32:30 +00:00
Jonas DanielsGitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
9e46b5b94e Version Packages (#4121)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-08-18 12:37:18 +12:00
gregfromstl e0dcc64256 Fix connect button border in firefox (#4160)
Corrects an issue with the border visibility in firefox by explicitly specifying the div height

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on fixing the connect button border issue on Firefox browser.

### Detailed summary
- Added `height: "50px"` to the button style in `Details.tsx` for proper display on Firefox.

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

<!-- end pr-codex -->
2024-08-18 00:03:46 +00:00
gregfromstl f0d6e343ee Adds EIP-1271 Signature Validation Fallback (#4156)
This PR EIP-1271 fallback for smart contract validation since not all chains support the deployless call used in 6792 flow.

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to fix smart contract wallet signature validation on older chains.

### Detailed summary
- Updated the prompt text for signing in on the wallet UI
- Added a fallback to EIP1271 validation for chains not supporting eth_call simulation
- Introduced a new function `verifyEip1271Signature` for EIP1271 signature validation

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

<!-- end pr-codex -->
2024-08-17 23:43:45 +00:00
gregfromstl cf4443a9eb Improve Blobbie Algo (#4159)
![image](https://github.com/user-attachments/assets/cfc34112-3b94-4125-8aba-4a065d7c9ec2)
![image](https://github.com/user-attachments/assets/9daf26b0-fde8-4a77-bebf-a77f94d444f2)
![image](https://github.com/user-attachments/assets/91c4ceb1-c3c0-4be6-a654-d233b699495a)
![image](https://github.com/user-attachments/assets/7a298ad2-7fa4-4967-a7ea-7e9ec2fcf7be)

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to improve the Blobbie algorithm for generating unique gradient avatars based on provided addresses.

### Detailed summary
- Updated color calculation logic for better color pairing
- Removed unused `nearestColor` function
- Refactored color and position calculations for Blobbie avatar
- Adjusted ellipse positions and sizes for better visual representation

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

<!-- end pr-codex -->
2024-08-17 23:12:15 +00:00
gregfromstl 355795a2d4 Fix text wrapping on connect button (#4157)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on fixing text wrapping on the Connect Button in the `Details.tsx` file.

### Detailed summary
- Added `whiteSpace: "nowrap"` to prevent text wrapping
- Updated styles for better button display

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

<!-- end pr-codex -->
2024-08-17 19:37:43 +00:00
kien-ngo 5fda794569 [SDK] Add more VoteERC20 extensions (for Dashboard) (#4139)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR exposes ERC20Vote extensions and adds more Vote contract extensions.

### Detailed summary
- Exposed ERC20Vote extensions
- Added more Vote contract extensions
- Updated types for vote and proposal states
- Implemented functions for proposal existence, execution, and voting counts

> The following files were skipped due to too many changes: `packages/thirdweb/src/extensions/vote/read/getAll.ts`

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

<!-- end pr-codex -->
2024-08-17 12:28:02 +00:00
kien-ngo 93b3bad783 [SDK] Expose thirdweb extensions (for Dashboard) (#4149)
<!-- start pr-codex -->

## PR-Codex overview
The focus of this PR is to export contracts related to Publisher, Multichain Registry, and Contract Factory functionalities.

### Detailed summary
- Added Publisher contract exports for reading and writing operations
- Added Multichain Registry exports for reading and writing operations
- Added Contract Factory export for deploying proxies

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

<!-- end pr-codex -->
2024-08-17 12:02:02 +00:00
Joaquim VergesandGitHub f5952621ab feat(wallet): handle eth_sendTransaction when doing zksync direct deploys (#4153) 2024-08-17 23:52:10 +12:00
kien-ngo 1d9f4e5e3e [Dashboard] MismatchButton to v5 (#4152)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview

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

<!-- end pr-codex -->
2024-08-17 10:01:56 +00:00
gregfromstl 2e99057f90 feat(wallet-ui): initial app (#3478)
1. Created a new `.env.example` file specifying the `NEXT_PUBLIC_ROOT_DOMAIN` variable.
2. Updated `.gitignore` to include `.env*.local` instead of `.env*`.
3. Modified the `Layout` component in `[ecosystem]/layout.tsx` to accept `children` and `params` properties and display the ecosystem and children elements.
4. Updated the `Page` component in `[ecosystem]/page.tsx` to return a simple `div` with the text `Page`.
5. Added a new `middleware.ts` file to handle dynamic routing based on the request host, matching all paths except for specific routes (e.g., `/api`, `/_next`, `/_static`). Rewrites the URL to point to either the root application or the appropriate ecosystem dynamic route.

---

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on adding ecosystem-related features and improving UI components.

### Detailed summary
- Added `Ecosystem` and token types
- Updated `biome.json` schema
- Implemented revalidate function
- Added NFT loading and card components
- Updated environment variables
- Improved layout and metadata handling
- Added new UI components like `Skeleton`, `Label`, and `Input`
- Enhanced client and ecosystem API integration

> The following files were skipped due to too many changes: `apps/wallet-ui/src/lib/chains.ts`, `apps/wallet-ui/src/components/ui/sonner.tsx`, `apps/wallet-ui/src/components/ConnectButton.tsx`, `apps/wallet-ui/src/app/[ecosystem]/login/page.tsx`, `apps/wallet-ui/src/app/[ecosystem]/(ui)/layout.tsx`, `apps/wallet-ui/src/components/ui/badge.tsx`, `apps/wallet-ui/src/components/ui/popover.tsx`, `apps/wallet-ui/src/middleware.ts`, `apps/wallet-ui/src/lib/assets/erc20.ts`, `apps/wallet-ui/src/components/ui/button.tsx`, `apps/wallet-ui/src/components/NftCard.tsx`, `apps/wallet-ui/src/components/NftGallery.tsx`, `apps/wallet-ui/src/lib/auth.ts`, `apps/wallet-ui/src/lib/assets/erc721.ts`, `apps/wallet-ui/src/app/[ecosystem]/(ui)/wallet/[address]/layout.tsx`, `apps/wallet-ui/src/util/simplehash.ts`, `apps/wallet-ui/src/components/ChainCombobox.tsx`, `apps/wallet-ui/src/components/TransactionToastProvider.tsx`, `apps/wallet-ui/src/app/globals.css`, `apps/wallet-ui/src/components/ChainIcon.tsx`, `apps/wallet-ui/src/components/ui/dialog.tsx`, `apps/wallet-ui/src/components/ui/form.tsx`, `apps/wallet-ui/src/components/ui/command.tsx`, `apps/wallet-ui/src/components/NftModal.tsx`, `pnpm-lock.yaml`

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

<!-- end pr-codex -->
2024-08-17 08:08:48 +00:00
gregfromstl 13764f1abb Connect UI Profile Image Improvements (#4126)
<!-- start pr-codex -->

## PR-Codex overview
This PR focuses on cosmetic improvements to the Connect UI, introduces Blobbie component for unique avatars, and updates button styles and sizes.

### Detailed summary
- Increased `minWidth` of `TransactionButton` to 165px
- Updated `defaultButtonTitle` in `en.ts`
- Added `Blobbie` component for unique avatars
- Updated button styles and sizes in `ConnectButton.tsx`
- Added `shortenAddress` import in `wallet.ts`
- Updated styles in `Details.tsx` and `DetailsModal`

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

<!-- end pr-codex -->
2024-08-17 08:03:28 +00:00
iuwqyir 997c3945a7 export usageEventSchema and UsageEvent (#4147)
## Problem solved

Almost the same as https://github.com/thirdweb-dev/js/pull/4122. Made a new PR, because hadn't setup commit signing for graphite, so it failed to merge

Exports the Zod schema for usage events. This way it can be used for validate the message before sending it to the usage tracker queue.
Moved it under core because it is not tied to worker logic and can be used outside workers.
Also exported `UsageEvent` and `usageEventSchema` under node, because I think core is not exported

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to export `usageEventSchema` for Cloudflare worker and define `UsageEvent` schema for node.

### Detailed summary
- Exported `usageEventSchema` for Cloudflare worker and defined `UsageEvent` schema for node
- Added detailed schema for usage events with various optional fields

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

<!-- end pr-codex -->
2024-08-16 21:15:34 +00:00
MananTank 2bf2e1eec4 Update Engine page header (#4125)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR introduces UI improvements to the Engine page layout, including new components, styling updates, and a modal for updating the Engine version.

### Detailed summary
- Added `CopyTextButton`, `Button`, and `Separator` components
- Updated styling and structure of the Engine page layout
- Implemented a modal for updating the Engine version
- Added new icons and components for UI enhancements

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

<!-- end pr-codex -->
2024-08-16 20:37:12 +00:00
MananTank 9b3725a56e Migrate Engine list UI to shadcn/tailwind (#4123)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR enhances UI components in the dashboard app.

### Detailed summary
- Updated tooltip styling in `tooltip.tsx`.
- Refactored dropdown menu in `dropdown-menu.tsx`.
- Improved table UI with dropdown menus in `TWTable.tsx`.
- Implemented modals for editing and removing engine instances in `engine-instances-table.tsx`.

> The following files were skipped due to too many changes: `apps/dashboard/src/components/engine/engine-instances-table.tsx`

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

<!-- end pr-codex -->
2024-08-16 20:37:11 +00:00
MananTank beafe43f46 Move Engine import from Modal to /dashboard/engine/import (#4119)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to refactor the Engine sidebar component and improve error handling in Engine pages.

### Detailed summary
- Refactored `EngineSidebar` component
- Improved error handling with `PageLoading` and `EngineErrorPage`
- Added import functionality for Engine instances

> The following files were skipped due to too many changes: `apps/dashboard/src/pages/dashboard/engine/import.tsx`

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

<!-- end pr-codex -->
2024-08-16 20:37:11 +00:00
Winston YeoandGitHub 214a74c36a chore: add authentication method to usage tracking (#4146) 2024-08-16 20:17:57 +00:00
MananTank d0e3c4defc Fix hydration error in markdown renderer + property and ts cleanup (#4141)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR refactors the `MarkdownRenderer` component in `published-contract`.

### Detailed summary
- Refactored heading components (`h1`, `h2`, `h3`, `h4`, `h5`, `h6`) to remove explicit `any` type
- Refactored `a`, `code`, `p`, `table`, `th`, `td`, `ul`, `ol`, `li` components to use cleaned props without `node`

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

<!-- end pr-codex -->
2024-08-16 18:30:57 +00:00
MananTank 0cdf34ea98 Move Engine pages from client Router to Pages Router (#4113)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR upgrades Engine navigation links, adds new pages for Engine management, and refactors list styling.

### Detailed summary
- Updated Engine navigation links
- Added new pages for Engine management
- Refactored list styling in components

> The following files were skipped due to too many changes: `apps/dashboard/src/components/engine/engine-instances-table.tsx`, `apps/dashboard/src/pages/dashboard/engine/create.tsx`, `apps/dashboard/src/components/engine/EnginePageLayout.tsx`, `apps/dashboard/src/components/engine/engine-list.tsx`

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

<!-- end pr-codex -->
2024-08-16 15:45:43 +00:00
MananTank b1632a3df1 Add force-dynamic declaration for pages using cookies - fix sentry errors (#4140)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to add a new export `dynamic = "force-dynamic"` in three files due to the usage of `cookies()`.

### Detailed summary
- Added `export const dynamic = "force-dynamic"` in `page.tsx` under `dashboard/connect/pay`
- Added `export const dynamic = "force-dynamic"` in `page.tsx` under `dashboard/connect/ecosystem`
- Added `export const dynamic = "force-dynamic"` in `layout.tsx` under `dashboard/connect/ecosystem/[slug]/(active)`

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

<!-- end pr-codex -->
2024-08-16 15:34:13 +00:00
jnsdls d3f43a757b [Optimize] Add CI optimization step using Graphite action (#4115)
tl;dr: https://graphite.dev/docs/stacking-and-ci#reducing-ci-runs-for-github-actions

<!-- start pr-codex -->

---

## PR-Codex overview
This PR optimizes the CI workflow by adding a step to skip unnecessary processes based on a condition.

### Detailed summary
- Added `optimize_ci` job with skip condition
- Updated `build`, `lint`, `test`, `e2e`, and `size` jobs to depend on `optimize_ci` and skip if condition is met

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

<!-- end pr-codex -->
2024-08-15 21:22:24 +00:00
gregfromstl 825352476c fix: throw when no encryption key (#4120)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on enhancing security by throwing an error when no encryption key is provided for custom authentication.

### Detailed summary
- Added error throwing when encryption key is missing for custom JWT authentication
- Added error throwing when encryption key is missing for custom auth endpoint authentication

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

<!-- end pr-codex -->
2024-08-15 21:17:20 +00:00
arcoraven 8caa095a67 fix: update transaction drawer labels (#4118)
<!-- start pr-codex -->

## PR-Codex overview
The focus of this PR is to enhance transaction details display in the dashboard by adding support for effective gas price calculation and showing additional information like account address and block number.

### Detailed summary
- Added `effectiveGasPrice` field to calculate transaction fee
- Displayed account address and linked to explorer
- Differentiated recipient address and contract address
- Showed transaction value in tokens and symbol
- Linked block number to explorer

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

<!-- end pr-codex -->
2024-08-15 19:22:51 +00:00
jnsdls 997e1197e9 analytics overhaul (#4107)
<!-- start pr-codex -->

## PR-Codex overview
This PR enhances blockchain analytics in the dashboard. It introduces support for analytics on specific chains and updates chart components for better visualization.

### Detailed summary
- Added `CHAINSAW_API_KEY` environment variable for contract analytics
- Updated chart components for better visualization
- Improved analytics support for specific chains
- Refactored chart styling for better UI/UX

> The following files were skipped due to too many changes: `apps/dashboard/src/contract-ui/tabs/overview/components/Analytics.tsx`, `apps/dashboard/src/contract-ui/tabs/analytics/page.tsx`

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

<!-- end pr-codex -->
2024-08-15 15:29:50 +00:00
Jonas DanielsandGitHub c9ac25fe3f Version Packages (#4114) 2024-08-15 07:38:54 -07:00
Wyatt MufsonandGitHub 79260c8cd0 Add new auth fields for redirect (#4099) 2024-08-15 07:30:59 -07:00
MananTank cf8badbc46 Move Network Configuration Form+Modal to shadcn/tailwind (#4105)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR updates various UI components for consistency and usability.

### Detailed summary
- Updated styling for `ClaimConditionsForm`, `CustomChainRenderer`, `ToolTipLabel`, `RpcInput`, `ChainIdInput`, `TooltipBox`, `ConfigureNetworkModal`, `ResetClaimEligibility`, `NetworkIdInput`, `IconUpload`, and `ConfigureNetworks`.
- Replaced `TooltipBox` with `ToolTipLabel` and `CircleHelpIcon`.
- Added `Input` from `@/components/ui/input`.
- Removed unnecessary imports.
- Replaced `Modal` components with `Dialog` and `DialogContent`.
- Used `toast` for error notifications.
- Updated button styling and functionality.

> The following files were skipped due to too many changes: `apps/dashboard/src/components/configure-networks/ConfigureNetworks.tsx`, `apps/dashboard/src/pages/[chain_id]/[...paths].tsx`, `apps/dashboard/src/components/configure-networks/ConfigureNetworkForm.tsx`

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

<!-- end pr-codex -->
2024-08-15 05:59:21 +00:00
MananTank 09e4d80b89 Show Top Progress Bar on navigation initiated using useRouter hook (#4097)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR updates Next.js navigation usage in the dashboard app to `useDashboardRouter` from `@/lib/DashboardRouter`.

### Detailed summary
- Replaces `useRouter` with `useDashboardRouter` in multiple files
- Adds `DashboardRouterTopProgressBar` component import in layout files
- Introduces `useDashboardRouter` import in various components
- Defines `createStore` function in `@/lib/reactive.ts`

> The following files were skipped due to too many changes: `apps/dashboard/src/@/lib/DashboardRouter.tsx`

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

<!-- end pr-codex -->
2024-08-15 05:48:22 +00:00
kien-ngo 1edd6c7e4c embed-setup.tsx to v5 (#4108)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to enhance the Contract Embed feature by integrating with `thirdwebClient` and `useV5DashboardChain`.

### Detailed summary
- Added `thirdwebClient` and `useV5DashboardChain` for contract setup
- Updated `contract` type to `ThirdwebContract`
- Refactored `buildIframeSrc` function to use `ThirdwebContract` properties

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

<!-- end pr-codex -->
2024-08-15 05:37:15 +00:00
kien-ngo 588f19639f [Dashboard] ContractMetadata settings to v5 (#4100)
<!-- start pr-codex -->

## PR-Codex overview
This PR updates the SettingsMetadata component in the contract UI to handle contract data more efficiently.

### Detailed summary
- Refactored the SettingsMetadata component to use ThirdwebContract type
- Updated schema imports and data handling
- Removed unnecessary dependencies and functions

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

<!-- end pr-codex -->
2024-08-15 05:26:34 +00:00
Jonas DanielsGitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
f2c12781ef Version Packages (#4044)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-08-15 17:14:31 +12:00
kien-ngo 9d7d513d37 [Dashboard] PrimarySaleRecipient to v5 (#4098)
<!-- start pr-codex -->

## PR-Codex overview
This PR focuses on updating the contract UI settings for primary sale recipient address handling.

### Detailed summary
- Updated handling of primary sale recipient address in contract settings UI
- Refactored usage of Thirdweb SDK functions
- Added error handling for invalid recipient address
- Improved transaction handling and form reset functionality

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

<!-- end pr-codex -->
2024-08-15 01:11:20 +00:00
kien-ngo 10de2712dd [Dashboard] Remove useClaimNFT; use erc1155/claimTo (#4102)
The component in this PR is meant for Edition Drop only

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to update the `ClaimTab` component to support ERC1155 contracts and improve transaction handling.

### Detailed summary
- Renamed `ClaimTab` component to `ClaimTabERC1155`.
- Updated `ClaimTabERC1155` to work with ERC1155 contracts.
- Improved transaction handling in `ClaimTabERC1155`.
- Removed unnecessary imports and updated dependencies.

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

<!-- end pr-codex -->
2024-08-15 00:59:13 +00:00
gregfromstl 0ca1a79342 feat: cleanup ui (#4092)
- Reduced border radius on buttons
- Reduced connected button size
- Removed layout shift between connected and unconnected states
- Remove Rainbow from default wallets (replaced with Rabby)

https://github.com/user-attachments/assets/334f09d5-46d1-40e3-8b3a-5937771f277c

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on UI cosmetic improvements for wallet-related components.

### Detailed summary
- Added `io.rabby` wallet
- Adjusted padding and borderRadius in various components
- Modified button sizes and styles
- Updated wallet image sizes and text styles

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

<!-- end pr-codex -->
2024-08-15 00:44:18 +00:00
kien-ngo be344ac8c4 [Dashboard] Migration Royalties to v5 (#4051)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR updates the `SettingsRoyalties` component to use new contract and royalty information and improves error handling during royalty settings updates.

### Detailed summary
- Updated `SettingsRoyalties` component to use new contract and royalty information
- Improved error handling during royalty settings updates
- Replaced `thirdweb` imports with `sonner` and `thirdweb/react`
- Refactored default royalty info handling and transaction mutation logic

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

<!-- end pr-codex -->
2024-08-15 00:26:39 +00:00
754ad99cfd Feat: Transaction Simulator (#3715)
Co-authored-by: Kien Ngo <[email protected]>
Co-authored-by: Manan Tank <[email protected]>
2024-08-14 17:24:31 -07:00
MananTank d6e4898458 Add Pay success tracking (#4103)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR enhances payment tracking in `MismatchButton` and `PayModalButton` components.

### Detailed summary
- Added tracking events for payment attempts and successes in `MismatchButton` and `PayModalButton`
- Utilized `useTrack` hook for event tracking
- Improved event tracking for different payment types and statuses

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

<!-- end pr-codex -->
2024-08-14 21:37:11 +00:00
YashandGitHub 191fb3a3a6 Modular contracts - rename extensions to modules (#3969) 2024-08-14 21:35:36 +00:00
MananTank 03a809a33f Add onPurchaseSuccess callback for Pay (#4101)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR adds `onPurchaseSuccess` callback to various components and hooks in the codebase, triggering when a user completes a purchase using thirdweb pay.

### Detailed summary
- Added `onPurchaseSuccess` callback to `PayEmbed`, `ConnectButton`, `TransactionButton`, and `useSendTransaction`
- Updated props in multiple components to include `onSuccess` callback parameter
- Added type definitions for `BuyWithCryptoStatus` and `BuyWithFiatStatus`
- Implemented logic to call `onSuccess` callback upon successful purchase completion

> The following files were skipped due to too many changes: `packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatFlow.tsx`

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

<!-- end pr-codex -->
2024-08-14 21:05:41 +00:00
kien-ngo 874ef7af4e [Dashboard] Hide ERC721 Claim button if viewing ERC1155 Drop (#4104)
For Edition Drop we have a dedicated ClaimTabERC1155 inside each Edition's page
2024-08-14 20:10:11 +00:00
joaquim-verges ef9c7df220 feat(native): add passkey support in connect UI (#4077)
## Problem solved

Added passkey UI in connect for react native

<!-- start pr-codex -->

---

## PR-Codex overview
This PR introduces passkey login support in React Native.

### Detailed summary
- Updated colors in the design system
- Added passkey domain logic
- Improved wallet loading components
- Added passkey authentication screen
- Updated wallet icons and images

> The following files were skipped due to too many changes: `packages/thirdweb/src/react/native/ui/connect/InAppWalletUI.tsx`

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

<!-- end pr-codex -->
2024-08-14 19:44:37 +00:00
joaquim-verges a640a1e147 feat(inapp): add passkey authentication for native clients (#4022)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR introduces support for `passkeyDomain` in in-app wallets, updates error handling in signup screens, and improves storage handling.

### Detailed summary
- Added `passkeyDomain` support in in-app wallets
- Updated error handling in signup screens
- Improved storage handling for in-app wallets

> The following files were skipped due to too many changes: `packages/thirdweb/src/wallets/in-app/web/utils/Storage/LocalStorage.ts`, `packages/thirdweb/src/utils/bytecode/cbor-decode.ts`, `packages/thirdweb/package.json`, `packages/thirdweb/src/wallets/wallet-connect/receiver/session-store.test.ts`, `pnpm-lock.yaml`, `packages/thirdweb/src/wallets/in-app/native/native-connector.ts`, `packages/thirdweb/src/wallets/in-app/web/lib/web-connector.ts`, `packages/thirdweb/src/wallets/in-app/core/authentication/passkeys.ts`, `packages/thirdweb/src/wallets/in-app/native/auth/passkeys.ts`, `packages/thirdweb/src/wallets/in-app/web/lib/auth/passkeys.ts`

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

<!-- end pr-codex -->
2024-08-14 19:44:35 +00:00
kien-ngo 52678e02a8 [Dashboard] use MediaRenderer for contract's avatar (#4095)
- [x] Contract metadata header now uses <MediaRenderer /> instead of <Image/>
This way is works with videos and it gets rid of that weird border-radius bug (see image)

<img width="324" alt="image" src="https://github.com/user-attachments/assets/a57f95c1-eb45-4e6f-8121-0d10358c7c6b">

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to refactor the `MetadataHeader` component in the custom-contract folder by replacing the `resolveScheme` function with `MediaRenderer` for image rendering.

### Detailed summary
- Replaced `resolveScheme` with `MediaRenderer` for image rendering
- Updated image rendering logic with additional props
- Removed unused imports and variables

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

<!-- end pr-codex -->
2024-08-14 14:04:07 +00:00
MananTank b9ed7535a4 Fix Connection with Safe using WalletConnect Link (#4091)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on fixing the connection with Safe using WalletConnect link.

### Detailed summary
- Added support for Safe supported chains in WalletConnect
- Updated chain selection logic based on walletId
- Included specific chains for Safe connection

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

<!-- end pr-codex -->
2024-08-14 11:39:29 +00:00
Joaquim VergesandGitHub 70d4a5a3db fix(dashboard): fix wrong 'version' prop import (#4096) 2024-08-14 21:51:56 +12:00
jnsdls ea28704a04 [Refactor] Remove unused functions and improve faucet validation (#4093) 2024-08-14 00:50:22 +00:00
jnsdls 814024ae24 [Chore] Remove unused 'amount' field from FaucetButton component and claim route (#4090)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to update the testnet faucet claim route to fix issues related to the amount handling.

### Detailed summary
- Removed `amount` from request payload
- Updated amount handling in the faucet claim route to always transfer 0.01
- Improved error handling and response consistency

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

<!-- end pr-codex -->
2024-08-13 23:11:24 +00:00
joaquim-verges 9d3fa73da7 feat(dashboard): bring zksync signer back to direct deploys (#4089)
## Problem solved

for direct deploys, right now go back to the zksync ethers signer wrapper - will implement it properly inside account v5
2024-08-13 22:14:05 +00:00
jnsdls fea4a4afe8 [Fix] Remove unused loginRequired prop from MismatchButton component (#4088)
<!-- start pr-codex -->

## PR-Codex overview
This PR updates the `MismatchButton.tsx` component in the dashboard app.

### Detailed summary
- Updated `CustomConnectWallet` component with new props
- Removed `loginRequired={false}` prop from `CustomConnectWallet` usage

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

<!-- end pr-codex -->
2024-08-13 22:00:38 +00:00
Phillip HoandGitHub 2e16f9ecef chore: Add queue metrics to dashboard (#4075) 2024-08-13 21:59:34 +00:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
1032bc7cc4 chore(deps): bump @stripe/react-stripe-js from 2.7.2 to 2.7.3 (#4063)
Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-13 13:02:34 -07:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
7e6d1decfc chore(deps-dev): bump react-native from 0.74.2 to 0.74.5 (#4061)
Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-13 12:48:51 -07:00
jnsdls 73b2c512ce [Chore] Add temporary redirect for /gas to /explore and remove GasPage component (#4087) 2024-08-13 18:14:18 +00:00
MananTank 13cda91d10 Remove sign-in requirement for TransactionButton (#4086)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR updates the `MismatchButton` component in the dashboard by adding the `loginRequired` prop to `CustomConnectWallet`.

### Detailed summary
- Added `loginRequired={false}` prop to `CustomConnectWallet` in `MismatchButton.tsx`

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

<!-- end pr-codex -->
2024-08-13 17:58:37 +00:00
MananTank e91421a252 Fix isLoggedin auth action (#4085)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR updates the authentication logic in `auth-actions.ts` to check for a matching creatorWalletAddress in the JSON data.

### Detailed summary
- Updated condition to check for `creatorWalletAddress` in JSON data instead of `address`.

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

<!-- end pr-codex -->
2024-08-13 17:45:31 +00:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
74c6bca538 chore(deps): bump @hookform/resolvers from 3.6.0 to 3.9.0 (#4064)
Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-13 10:45:02 -07:00
MananTank 23beb9d263 Add validation for NFT claim amount to be integer (#4080)
## Problem solved

Short description of the bug fixed or feature added
2024-08-13 17:21:15 +00:00
jnsdls 69657377f4 [Fix] Lower faucet amount to 0.01 (#4084) 2024-08-13 16:48:33 +00:00
MananTank 9db4b293a5 dynamically import onboarding components - reduce Stripe errors and bundle size (#4081)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR updates the codebase by implementing lazy loading for onboarding components to improve performance.

### Detailed summary
- Implemented lazy loading for onboarding components
- Added `LazyOnboardingBilling` component for billing
- Updated multiple files to use lazy loading for onboarding components

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

<!-- end pr-codex -->
2024-08-13 16:37:26 +00:00
MananTank 867d2dae8a Fix useLayoutEffect warnings (#4079)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR updates the usage of `useLayoutEffect` to `useIsomorphicLayoutEffect` for consistent server-side rendering compatibility.

### Detailed summary
- Replaces `useLayoutEffect` with `useIsomorphicLayoutEffect` in multiple files
- Ensures consistent rendering behavior across client and server side

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

<!-- end pr-codex -->
2024-08-13 16:26:34 +00:00
MananTank cb27dafca7 Do not show "No Funds" Modal when switch chain is required (#4083)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to handle a specific condition `networksMismatch` before executing the button's `onClick` functionality.

### Detailed summary
- Added a condition to check for `networksMismatch` before executing the button's `onClick` functionality.
- Stored the event reference in `eventRef.current` when `networksMismatch` is true.

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

<!-- end pr-codex -->
2024-08-13 16:21:33 +00:00
kien-ngo 6b7eedeecb [Dash] various small updates and fixes (#4076)
- [x] Fix clipboard value for the [copy button] inside /explorer page
- [x] Better handling for some edge cases where the contract's compilation target is a very long string
- [x] Instead of displaying "Custom" for non-thirdweb contracts, display the contract type based on the compilation target

<hr />

Before:
<img width="1241" alt="image" src="https://github.com/user-attachments/assets/397cc15f-5941-4a5c-ae11-cae5a7a7fbde">

After:
<img width="830" alt="image" src="https://github.com/user-attachments/assets/2a353e9c-04c8-4d6d-b15f-c26b7f423213">

<hr />

Before:
<img width="665" alt="image" src="https://github.com/user-attachments/assets/93465f35-d3c4-466c-b9cd-ab905c4fc6f1">

After:
<img width="667" alt="image" src="https://github.com/user-attachments/assets/24c59796-913d-42a4-95a2-2a63e6e726c3">

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to enhance how contract metadata is displayed in the dashboard.

### Detailed summary
- Improved handling of long contract names from the thirdweb endpoint
- Updated the display of contract type in the contract table
- Refactored the usage of contract metadata in different components

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

<!-- end pr-codex -->
2024-08-13 07:16:13 +00:00
MananTank 53da850397 Fix Various "couldn't be rendered statically" errors in Sentry (#4067)
TLDR; is - In the Chain landing page, we don't really care about filtering the popular contracts - so I removed so we can statically render the chain page,

Added force-dynamic for /popular and /trending pages where we allow filtering by search params

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to implement dynamic rendering using searchParams and improve sorting functionality in the dashboard pages.

### Detailed summary
- Implemented dynamic rendering using `searchParams`
- Updated sorting functionality in trending pages
- Refactored `searchParams` in components
- Removed unnecessary imports

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

<!-- end pr-codex -->
2024-08-13 04:11:48 +00:00
kien-ngo de1bd6e903 [Dashboard] Fix contract query key (#4073)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to refactor the `useDashboardContractMetadata` hook to use a more descriptive query key and improve code readability.

### Detailed summary
- Refactored the query key to include contract metadata details
- Improved code readability by restructuring the Promise.all block
- Updated the return object format for consistency

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

<!-- end pr-codex -->
2024-08-13 03:56:15 +00:00
ff7f61c038 Dustin/treasure chain page update (#4072)
Co-authored-by: Jonas Daniels <[email protected]>
2024-08-12 20:26:37 -07:00
FirekeeperandGitHub 2408a7f9ed Docs - .NET 1.4.0 // Unity 5.0.0-beta.3 (#4071) 2024-08-12 20:25:49 -07:00
98bb37c1a1 chore(deps-dev): bump @swc-node/register from 1.10.0 to 1.10.9 (#4060)
Co-authored-by: dependabot <[email protected]>
2024-08-12 20:24:21 -07:00
gregfromstl 3c32b99b3a refactor(thirdweb): update siwe interface (#4045)
<!-- start pr-codex -->

## PR-Codex overview
This PR updates the SIWE interface to include a new `wallet` authentication option and refactors related methods for consistency.

### Detailed summary
- Added `wallet` as a new authentication option
- Updated interface methods to support `wallet` authentication
- Refactored SIWE-related functions for consistency

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

<!-- end pr-codex -->
2024-08-13 02:36:29 +00:00
kien-ngo e5a046ecdd [Dashboard] Fix missing contract metadata (#4070)
- [x] Remove duplicated formatCompilerMetadata method
- [x] Add getCompilerMetadata method to the SDK
- [x] Add a custom hook for Dashboard for fetching basic contract metadata (useDashboardContractMetadata)

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to add a contract utility method `getCompilerMetadata()` and update contract metadata handling in the dashboard.

### Detailed summary
- Added `getCompilerMetadata()` utility method to fetch and format compiler metadata
- Updated contract metadata handling in the dashboard components
- Added `useDashboardContractMetadata` hook for fetching contract metadata in the dashboard

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

<!-- end pr-codex -->
2024-08-13 02:07:44 +00:00
kien-ngo 237f5faf42 [Dashboard] Migrate PlatformFees to v5 (#4050)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to migrate zod schemas from SDK v4 to a new location for form validations in the dashboard.

### Detailed summary
- Migrated zod schemas for PlatformFees and Royalties from SDK v4 to `schemas.ts`
- Updated `page.tsx` and `platform-fees.tsx` to use the new zod schemas and adapt to the changes in the SDK
- Refactored form validations and platform fee settings handling in `platform-fees.tsx`

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

<!-- end pr-codex -->
2024-08-13 01:50:49 +00:00
gregandGitHub ad2588b5de chore: fix deploy-split test (#4068) 2024-08-12 18:49:52 -07:00
kien-ngo db8695d0e8 [Dashboard]: Migrate major NFT features to v5 (#3998)
# High level changes
- `mint-form.tsx` is "over-abstracted" (not sure if that's the right word) - it's being used for too many different NFT features, making the code hard-to-migrate.
- solution: breaking it down to different component which makes it much easier to remove v4 code

# to test
- [x] UpdateMetadataForm
  - [x] Drop contracts
  - [x] Collection contracts
- [x] SharedMetadataForm
- [x] NFTMintForm
- [x] LazyMintForm

<!-- start pr-codex -->

---

## PR-Codex overview
This PR introduces NFT extensions for ERC721 and ERC1155 contracts, adds a new `updateTokenURI` function, and updates components for NFT minting and metadata management.

### Detailed summary
- Added NFT extension with `updateTokenURI` function for ERC721 and ERC1155 contracts
- Updated components for NFT minting and metadata management

> The following files were skipped due to too many changes: `apps/dashboard/src/contract-ui/tabs/permissions/components/contract-permission.tsx`, `packages/thirdweb/src/extensions/erc721/write/updateTokenURI.ts`, `packages/thirdweb/src/extensions/erc1155/write/updateTokenURI.ts`, `apps/dashboard/src/contract-ui/tabs/nfts/components/shared-metadata-form.tsx`, `apps/dashboard/src/contract-ui/tabs/nfts/components/lazy-mint-form.tsx`, `apps/dashboard/src/contract-ui/tabs/nfts/components/update-metadata-form.tsx`, `apps/dashboard/src/contract-ui/tabs/nfts/components/mint-form.tsx`

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

<!-- end pr-codex -->
2024-08-13 00:27:22 +00:00
MananTank 2d4a5c3384 Update Deploy modal (#4057)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to refactor the custom contract deployment process by introducing a new `DeployStatusModal` component.

### Detailed summary
- Added `DeployStatusModal` component for custom contract deployment status tracking
- Refactored `useCustomContractDeployMutation` to use `DeployStatusModal`
- Removed `DeployModalProvider` component and related context logic

> The following files were skipped due to too many changes: `apps/dashboard/src/components/contract-components/contract-deploy-form/deploy-context-modal.tsx`

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

<!-- end pr-codex -->
2024-08-13 00:06:43 +00:00
Joaquim VergesandGitHub dbf3873aaf feat(dashboard): add handle_all_urls relation to assetlinks.json for Android app link verification (#4069) 2024-08-13 12:06:09 +12:00
MananTank b15aa4cdff Add Deploy button link on the Contract Card (#4066)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to add a deploy button with a rocket icon to the ContractCard component in the Explore section.

### Detailed summary
- Added `RocketIcon` and deploy button to `ContractCard`
- Adjusted styling of `ContractCard` component for better layout
- Linked deploy button to deployment page with `Link`

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

<!-- end pr-codex -->
2024-08-12 23:31:51 +00:00
gregfromstl 689b8dc160 test: fix split tests (#4065)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR updates test descriptions in the `split` extension to run only if a secret key is present, enhancing security.

### Detailed summary
- Updated test descriptions to run only if a secret key is present
- Renamed test suites for `getAllRecipientsAddresses`, `getAllRecipientsPercentages`, and `getRecipientSplitPercentage`

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

<!-- end pr-codex -->
2024-08-12 22:40:18 +00:00
gregfromstl 218355bf95 docs: fix multi auth jsdocs (#4056)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR updates documentation comments in `useProfiles.ts` and `profiles.ts` for clarity.

### Detailed summary
- Updated description comments in `profiles.ts` for clarity and consistency.
- Added `@wallet` tag to indicate in-app wallet-specific methods.
- Removed redundant descriptions to improve readability.

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

<!-- end pr-codex -->
2024-08-12 22:01:39 +00:00
9be0a2fe85 Update Startup program page layout (#4058)
Co-authored-by: Ginessi <[email protected]>
Co-authored-by: Manan Tank <[email protected]>
2024-08-12 14:49:03 -07:00
gregfromstl 22b335b1f2 chore: delete solutions page (#4059)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to restructure the directory layout by deleting specific files and updating URL redirects related to gaming solutions.

### Detailed summary
- Deleted `page.mdx`, `layout.tsx`, and `sidebar.tsx` in `solutions` directory
- Removed images `unreal.png` and `preview.png` in `gaming/assets`
- Deleted `page.mdx` in `gaming/overview` directory
- Updated URL redirects for `/gaming`, `/solutions`, and `/solutions/gaming`
- Redirected `/gaming` to `/`
- Redirected `/solutions` to `/`
- Redirected `/solutions/gaming` to `/`
- Updated redirect from `/signature-minting` to `/contracts/design-docs/signature-mint`
- Updated reference from `/references/typescript/v5/embeddedWallet` to `/references/typescript/v5/inAppWallet`

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

<!-- end pr-codex -->
2024-08-12 20:57:30 +00:00
MananTank dfbaeb1c3d [dashboard] Fix chains fetch failture in localhost (#4053)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to simplify the API request in the `useApi.ts` file by removing unnecessary headers and changing the request method to GET.

### Detailed summary
- Removed unnecessary headers from the API request
- Changed the request method to GET

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

<!-- end pr-codex -->
2024-08-12 20:46:03 +00:00
MananTank dc99b88cac Fix Chainlist can't be rendered statically error in sentry (#4054)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR adds a `dynamic` export to force the page as dynamic for determining table/grid view based on viewport.

### Detailed summary
- Added `dynamic` export to force page as dynamic
- Updated comments to explain the purpose of the `dynamic` export

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

<!-- end pr-codex -->
2024-08-12 19:13:27 +00:00
Phillip HoandGitHub 66906dbef3 chore: Engine v2-beta in docs (#4049) 2024-08-12 10:04:29 -07:00
gregfromstl 7a68e3b8ed fix(react): switch chains for SIWE (#4047)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on updating authentication logic to switch to the proper chain before signing payloads.

### Detailed summary
- Updated `getLoginPayload` to include `chainId` parameter
- Added logic to switch to the correct chain before signing payloads
- Updated initialization of `thirdwebAuth` to handle chain switching
- Imported `getCachedChain` function in `useSiweAuth.ts`

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

<!-- end pr-codex -->
2024-08-12 05:34:36 +00:00
gregfromstl cb4b6fde85 fix(playground): do not attempt to decode nonexistent jwt (#4046)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to update how the authentication result is retrieved in the `GatedContentPreview` function.

### Detailed summary
- Refactored the authentication result retrieval logic to handle `jwt?.value` more efficiently.
- Updated the conditional check for `authResult` to account for the new retrieval logic.

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

<!-- end pr-codex -->
2024-08-12 05:01:02 +00:00
kien-ngo 141fd53759 [Dashboard/SDK] Add more Split extensions and remove Split v4 code from Dashboard (#4033)
<!-- start pr-codex -->

## PR-Codex overview
This PR adds more functionality to the `Split` contract extensions, including deploying the `Split` contract, reading recipient addresses and percentages, and testing these features.

### Detailed summary
- Added more Split contract extensions
- Updated `deploys.ts` with new exports for deploying Split contract
- Updated `split.ts` with new exports for reading recipient addresses and percentages
- Modified `page.tsx` to display contract balance using `getContract`
- Added new files for reading recipient addresses and percentages
- Updated `account-balance.tsx` to use `getContract` and `useSplitBalances`
- Added tests for getting all recipient addresses and percentages
- Added functionality to get recipient split percentage and corresponding tests

> The following files were skipped due to too many changes: `packages/thirdweb/src/extensions/split/__generated__/Split/read/totalShares.ts`, `apps/dashboard/src/contract-ui/tabs/split/components/distribute-button.tsx`, `packages/thirdweb/test/src/test-contracts.ts`, `apps/dashboard/src/@3rdweb-sdk/react/hooks/useSplit.ts`, `packages/thirdweb/src/extensions/prebuilts/deploy-split.ts`, `packages/thirdweb/src/extensions/prebuilts/__generated__/Split/write/initialize.ts`, `apps/dashboard/src/contract-ui/tabs/split/page.tsx`

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

<!-- end pr-codex -->
2024-08-11 22:17:38 +00:00
joaquim-verges 478d843975 feat(dashboard): add apple-app-site-association for iOS app link verification (#4043)
## Problem solved

for passkeys on ios

<!-- start pr-codex -->

---

## PR-Codex overview
This PR updates the `apple-app-site-association` and `assetlinks.json` files in the dashboard public directory to include specific app and web credentials information.

### Detailed summary
- Added `webcredentials` for specific app in `apple-app-site-association`
- Updated `sha256_cert_fingerprints` in `assetlinks.json`

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

<!-- end pr-codex -->
2024-08-11 22:11:13 +00:00
Jonas DanielsGitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
386fe1ce68 Version Packages (#4042)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-08-11 12:38:36 -07:00
jnsdls 539bdab403 [Refactor] Remove unused Bun availability check in CLI bin file (#4040)
FIXES: https://github.com/thirdweb-dev/js/issues/3991
2024-08-11 19:13:39 +00:00
jnsdls 0e3cb1338b [Hotfix] Remove async modifier from TrendingContractSection in trending-table.tsx (#4041)
FIXES: DASH-128
2024-08-11 19:02:09 +00:00
34cdd4ce95 feat(dashboard): add assetlinks.json for Android app link verification (#4039)
Co-authored-by: joaquim-verges <[email protected]>
2024-08-11 11:18:22 -07:00
Jonas DanielsandGitHub c31617436c [Chore] Remove unused 'faucet' service from chain logic (#4038) 2024-08-11 01:31:34 -07:00
Jonas DanielsandGitHub 40fbe9abb9 [Feature] Refactor chain services handling in API calls (#4037) 2024-08-11 00:08:15 -07:00
Nick PapadakisandGitHub 74e005214d Update page.mdx (#4036)
Signed-off-by: Nick Papadakis <[email protected]>
2024-08-10 20:54:45 -07:00
LubovandGitHub 1c48c20785 Update page.mdx (#4035)
Signed-off-by: Lubov <[email protected]>
2024-08-10 21:28:38 +12:00
gregfromstl 7befc61b70 Unreal 1.1 Docs (#3917)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to enhance the Thirdweb Unreal SDK documentation by adding detailed information about Blueprint system, signers, runtime settings, and common enums.

### Detailed summary
- Added documentation for Blueprint Overview, ThirdwebSigner, ThirdwebRuntimeSettings, and ThirdwebCommon.
- Updated sidebar links and icons.
- Updated tsconfig.json with consistent casing.
- Added Getting Started guide with integration steps and images.

> The following files were skipped due to too many changes: `apps/portal/src/app/unreal/thirdweb-wallet-handle/page.mdx`, `apps/portal/src/app/unreal/thirdweb-subsystem/page.mdx`, `apps/portal/src/app/unreal/thirdweb/page.mdx`, `apps/portal/src/app/unreal/page.mdx`, `apps/portal/src/app/unreal/thirdweb-function-library/page.mdx`

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

<!-- end pr-codex -->
2024-08-10 03:42:49 +00:00
MananTank 6b4503a91c Deploy form layout updates, Fix faucet claim condition (#4030)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR updates the logic for checking if a user can claim in the testnet faucet, adds a new React switch component, refactors common form fieldsets, and improves UI components.

### Detailed summary
- Updated `canClaim` logic in testnet faucet route
- Added `@radix-ui/react-switch` component
- Refactored common form fieldsets into `Fieldset` component
- Improved UI components and form field layouts

> The following files were skipped due to too many changes: `apps/dashboard/src/components/contract-components/contract-deploy-form/platform-fee-fieldset.tsx`, `pnpm-lock.yaml`, `apps/dashboard/src/components/contract-components/contract-deploy-form/trusted-forwarders-fieldset.tsx`, `apps/dashboard/src/components/contract-components/contract-deploy-form/split-fieldset.tsx`, `apps/dashboard/src/components/contract-components/contract-deploy-form/custom-contract.tsx`

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

<!-- end pr-codex -->
2024-08-09 22:04:48 +00:00
Jonas DanielsGitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
0fe38b9210 Version Packages (#3987)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-08-09 14:51:07 -07:00
Alec AnanianandGitHub c953c3f4c8 feat(react): add enabled param to useWalletBalance hook (#4032) 2024-08-09 14:38:14 -07:00
MananTank 1a71de0983 Fix broken Contract metadata image (#4031)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to enhance the `MetadataHeader` component by adding a new function `resolveScheme` to handle image URIs with a thirdweb client.

### Detailed summary
- Added `resolveScheme` function import from `thirdweb/storage`
- Modified `src` attribute in `Image` component to use `resolveScheme` for handling image URIs

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

<!-- end pr-codex -->
2024-08-09 21:09:32 +00:00
gregfromstl b0494f6eb4 fix(wallet): fix SIWE auth in ecosystem wallets (#4029)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on fixing SIWE authentication in ecosystem wallets.

### Detailed summary
- Added `ecosystem` parameter to SIWE authentication functions
- Updated SIWE authentication logic to include `ecosystem` parameter

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

<!-- end pr-codex -->
2024-08-09 20:15:32 +00:00
MananTank fe9e9c7ba3 Show No Funds modal with Faucet/Pay options for TransactionButton (#4025)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR updates components related to the testnet faucet functionality and improves the UI/UX of the dashboard.

### Detailed summary
- Added a new `CanClaimResponseType` type for claim eligibility status
- Updated styles and logic for the `FaucetButton` component
- Improved tooltip functionality with a new `ToolTipLabel` component
- Added a new dialog component and updated styles for `MismatchButton`

> The following files were skipped due to too many changes: `apps/dashboard/src/components/buttons/MismatchButton.tsx`

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

<!-- end pr-codex -->
2024-08-09 19:05:45 +00:00
FirekeeperandGitHub d41dc9a632 Force legacy 248, 9372, 841, 842 (#4020) 2024-08-09 12:04:18 -07:00
Jonas DanielsandGitHub 4c659a1d82 fix account signer crash (#4028) 2024-08-09 12:03:26 -07:00
gregfromstl b56f21b87d chore: upgrade viem to 2.19.3 and cleanup redundant imports (#4023)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
The PR updates `viem` to version 2.19.3 and removes a constant from `constants.ts`.

### Detailed summary
- Updated `viem` dependency to version 2.19.3
- Removed `universalSignatureValidatorAbi` constant from `constants.ts`

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

<!-- end pr-codex -->
2024-08-09 18:10:23 +00:00
MananTank 4d49a7c228 add type='button' as default to shadcn button component (#4026)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR adds a conditional `type` property to the `button` component based on the component type.

### Detailed summary
- Added `btnOnlyProps` variable to conditionally set `type` property for button component based on the component type.

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

<!-- end pr-codex -->
2024-08-09 17:50:33 +00:00
GWSzeto d8569fbd1f added back in build for cli (#4024)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to enhance the build process for smart contracts in the portal app by adding a new build command with options for detecting and compiling contracts.

### Detailed summary
- Added a new `Build` section in `page.mdx`
- Introduced a `Build` command to compile smart contracts
- Provided usage instructions and options for the `Build` command

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

<!-- end pr-codex -->
2024-08-09 17:42:37 +00:00
MananTank ed7d153cf6 Update Error Handler Modal UI (#4017)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR updates the styling and functionality of error handling components in the dashboard.

### Detailed summary
- Updated styling and functionality of error handling components
- Added `CopyAddressFormControl` component
- Improved error message copying functionality
- Updated dialog structure and content
- Added support link button in the error dialog

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

<!-- end pr-codex -->
2024-08-09 17:37:42 +00:00
MananTank a3c0be4f40 Update Deploy Form Header UI (#4016)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to add a share button feature for contracts, enabling users to share contract links easily.

### Detailed summary
- Added `shareLink` function to enable sharing contract links
- Updated `ShareButton` component to use `toast` from `sonner`
- Modified UI to include a share button for contracts
- Improved version selection functionality for contracts

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

<!-- end pr-codex -->
2024-08-09 17:31:27 +00:00
kien-ngo c31f25c51e Add Vote extensions (#3993)
- This will be a part of the Dashboard migration to v5
- The changes in modular extensions are probably because whoever added the extensions, was not using the latest generate script (Joaquim modified it to include erc20Value)

<!-- start pr-codex -->

---

## PR-Codex overview
This PR adds `erc20Value` functionality to various contract extensions in the `thirdweb` package.

### Detailed summary
- Added `erc20Value` functionality to multiple contract extensions in the `thirdweb` package.

> The following files were skipped due to too many changes: `packages/thirdweb/src/extensions/modular/__generated__/BatchMetadataERC1155/write/uploadMetadata.ts`, `packages/thirdweb/src/extensions/modular/__generated__/RoyaltyERC721/write/setDefaultRoyaltyInfo.ts`, `packages/thirdweb/src/extensions/modular/__generated__/RoyaltyERC1155/write/setDefaultRoyaltyInfo.ts`, `packages/thirdweb/src/extensions/modular/__generated__/RoyaltyERC721/write/setRoyaltyInfoForToken.ts`, `packages/thirdweb/src/extensions/modular/__generated__/RoyaltyERC1155/write/setRoyaltyInfoForToken.ts`, `packages/thirdweb/src/extensions/modular/__generated__/DelayedRevealBatchMetadataERC721/write/reveal.ts`, `packages/thirdweb/src/extensions/modular/__generated__/MintableERC20/write/completeOwnershipHandover.ts`, `packages/thirdweb/src/extensions/modular/__generated__/ClaimableERC1155/write/setClaimConditionByTokenId.ts`, `packages/thirdweb/src/extensions/modular/__generated__/OpenEditionMetadataERC721/write/setSharedMetadata.ts`, `packages/thirdweb/src/extensions/modular/__generated__/OpenEditionMetadataERC1155/write/setSharedMetadata.ts`, `packages/thirdweb/src/extensions/modular/__generated__/DelayedRevealBatchMetadataERC721/write/uploadMetadata.ts`, `packages/thirdweb/src/extensions/vote/read/quorumNumeratorByBlockNumber.ts`, `packages/thirdweb/src/extensions/vote/__generated__/Vote/read/token.ts`, `packages/thirdweb/src/extensions/vote/__generated__/Vote/read/votingDelay.ts`, `packages/thirdweb/src/extensions/vote/__generated__/Vote/read/votingPeriod.ts`, `packages/thirdweb/src/extensions/vote/__generated__/Vote/read/COUNTING_MODE.ts`, `packages/thirdweb/src/extensions/vote/__generated__/Vote/read/proposalIndex.ts`, `packages/thirdweb/src/extensions/vote/__generated__/Vote/read/BALLOT_TYPEHASH.ts`, `packages/thirdweb/src/extensions/vote/__generated__/Vote/read/proposalThreshold.ts`, `packages/thirdweb/src/extensions/vote/__generated__/Vote/read/quorumDenominator.ts`, `packages/thirdweb/src/extensions/vote/__generated__/Vote/read/getAllProposals.ts`, `packages/thirdweb/scripts/generate/abis/vote/Vote.json`, `packages/thirdweb/src/extensions/vote/__generated__/Vote/read/state.ts`, `packages/thirdweb/src/exports/extensions/vote.ts`, `packages/thirdweb/src/extensions/vote/__generated__/Vote/read/quorum.ts`, `packages/thirdweb/src/extensions/vote/__generated__/Vote/read/proposals.ts`, `packages/thirdweb/src/extensions/vote/__generated__/Vote/read/hasVoted.ts`, `packages/thirdweb/src/extensions/vote/__generated__/Vote/read/getVotes.ts`, `packages/thirdweb/src/extensions/vote/__generated__/Vote/read/proposalDeadline.ts`, `packages/thirdweb/src/extensions/vote/__generated__/Vote/read/proposalSnapshot.ts`, `packages/thirdweb/src/extensions/vote/__generated__/Vote/read/proposalVotes.ts`, `packages/thirdweb/src/extensions/vote/__generated__/Vote/write/setVotingDelay.ts`, `packages/thirdweb/src/extensions/vote/__generated__/Vote/write/castVote.ts`, `packages/thirdweb/src/extensions/vote/__generated__/Vote/read/getVotesWithParams.ts`, `packages/thirdweb/src/extensions/vote/__generated__/Vote/write/setVotingPeriod.ts`, `packages/thirdweb/src/extensions/vote/__generated__/Vote/write/relay.ts`, `packages/thirdweb/src/extensions/vote/__generated__/Vote/read/hashProposal.ts`, `packages/thirdweb/src/extensions/vote/__generated__/Vote/write/setProposalThreshold.ts`, `packages/thirdweb/src/extensions/vote/__generated__/Vote/write/updateQuorumNumerator.ts`, `packages/thirdweb/src/extensions/vote/__generated__/Vote/write/propose.ts`, `packages/thirdweb/src/extensions/vote/__generated__/Vote/write/execute.ts`, `packages/thirdweb/src/extensions/vote/__generated__/Vote/write/castVoteWithReason.ts`, `packages/thirdweb/src/extensions/vote/__generated__/Vote/write/castVoteBySig.ts`, `packages/thirdweb/src/extensions/vote/__generated__/Vote/write/castVoteWithReasonAndParams.ts`, `packages/thirdweb/src/extensions/vote/__generated__/Vote/write/castVoteWithReasonAndParamsBySig.ts`

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

<!-- end pr-codex -->
2024-08-09 01:38:27 +00:00
kien-ngo 5367eed3b6 Split extensions (#3995)
This will be a part of the Dashboard migration to v5 (Split page)

<!-- start pr-codex -->

---

## PR-Codex overview
This PR adds Split contract extensions for Thirdweb, enabling token-specific functions like distribute and release.

### Detailed summary
- Added new Split contract extensions for token-specific operations
- Included functions like distributeByToken, totalReleasedByToken, releasableByToken
- Updated existing functions to support tokenAddress parameter

> The following files were skipped due to too many changes: `packages/thirdweb/src/extensions/split/__generated__/Split/read/totalReleased.ts`, `packages/thirdweb/src/extensions/split/__generated__/Split/read/payee.ts`, `packages/thirdweb/src/extensions/split/__generated__/Split/read/shares.ts`, `packages/thirdweb/src/extensions/split/__generated__/Split/read/released.ts`, `packages/thirdweb/src/extensions/split/__generated__/Split/read/releasable.ts`, `packages/thirdweb/src/extensions/split/__generated__/Split/write/release.ts`

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

<!-- end pr-codex -->
2024-08-09 01:23:19 +00:00
kien-ngo 1586d774df Dashboard: Migrate account-signer to v5 (#4019)
<!-- start pr-codex -->

## PR-Codex overview
The focus of this PR is to update the account permissions feature in the dashboard.

### Detailed summary
- Added `thirdwebClient` and `useV5DashboardChain` for contract handling
- Updated `AccountSigners` component to fetch admins and signers
- Refactored `AccountSigner` component for better data handling

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

<!-- end pr-codex -->
2024-08-09 01:11:51 +00:00
YashandGitHub 0aeeccd42a Fix add to dashboard for zksync (#4007) 2024-08-08 18:05:49 -07:00
MananTank 4a807e41e8 Fix stretched chain icons (#4018)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to refactor the `ChainIcon` component to use the `cn` utility function for handling class names.

### Detailed summary
- Imported `cn` utility function
- Updated class name handling in `ChainIcon` component to use `cn` function for better readability and maintainability

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

<!-- end pr-codex -->
2024-08-09 00:32:09 +00:00
gregfromstl 05cee23bbb fix(wallet): resolve issues with native AutoConnect and URL token retrieval (#4015)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to fix the native AutoConnect feature in the `thirdweb` package by checking if the code is running in a web environment.

### Detailed summary
- Added a check for `window?.location` to ensure code is running in a web environment before fetching a URL token.

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

<!-- end pr-codex -->
2024-08-09 00:11:49 +00:00
gregfromstl bbb4f1c53f feat(react): multi-auth UI (#3870)
## Problem solved

Short description of the bug fixed or feature added

## Changes made

- [ ] Public API changes: list the public API changes made if any
- [ ] Internal API changes: explain the internal logic changes

## How to test

- [ ] Automated tests: link to unit test file
- [ ] Manual tests: step by step instructions on how to test

## Contributor NFT

Paste in your wallet address below and we will airdrop you a special NFT when your pull request is merged.

```Address: ```

<!-- start pr-codex -->

---

## PR-Codex overview
This PR adds account linking functionality, SIWE authentication, and profile management features to the Connect UI in `thirdweb`.

### Detailed summary
- Added account linking to Connect UI
- Introduced `useProfiles` hook for fetching linked profiles
- Updated UI components and locales for profile management
- Enhanced authentication options with SIWE
- Improved wallet icons and authentication methods

> The following files were skipped due to too many changes: `packages/thirdweb/src/react/web/ui/ConnectWallet/icons/AddUserIcon.tsx`, `packages/thirdweb/src/react/web/wallets/shared/oauthSignIn.ts`, `packages/thirdweb/src/wallets/ecosystem/types.ts`, `packages/thirdweb/src/wallets/in-app/core/authentication/types.ts`, `packages/thirdweb/src/react/web/ui/ConnectWallet/Modal/AnyWalletConnectUI.tsx`, `packages/thirdweb/src/react/web/ui/ConnectWallet/icons/MultiUserIcon.tsx`, `packages/thirdweb/src/wallets/in-app/web/lib/auth/oauth.ts`, `packages/thirdweb/src/wallets/in-app/core/authentication/getLoginPath.ts`, `packages/thirdweb/src/react/web/wallets/ecosystem/EcosystemWalletFormUI.tsx`, `packages/thirdweb/src/wallets/in-app/core/authentication/linkAccount.ts`, `packages/thirdweb/src/react/core/hooks/others/useProfiles.ts`, `packages/thirdweb/src/react/web/ui/components/WalletImage.tsx`, `packages/thirdweb/src/react/web/wallets/ecosystem/EcosystemWalletConnectUI.tsx`, `packages/thirdweb/src/react/web/ui/ConnectWallet/screens/ManageWalletScreen.tsx`, `packages/thirdweb/src/react/web/wallets/in-app/InAppWalletConnectUI.tsx`, `packages/thirdweb/src/react/web/wallets/in-app/InAppWalletFormUI.tsx`, `packages/thirdweb/src/wallets/in-app/core/authentication/siwe.ts`, `packages/thirdweb/src/react/web/ui/ConnectWallet/screens/LinkProfileScreen.tsx`, `packages/thirdweb/src/wallets/in-app/web/lib/auth/otp.ts`, `packages/thirdweb/src/react/web/wallets/shared/ConnectWalletSocialOptions.tsx`, `packages/thirdweb/src/react/web/ui/ConnectWallet/Details.tsx`, `packages/thirdweb/src/react/web/ui/ConnectWallet/screens/LinkedProfilesScreen.tsx`, `packages/thirdweb/src/react/web/wallets/shared/SocialLogin.tsx`, `packages/thirdweb/src/wallets/in-app/web/lib/web-connector.ts`, `packages/thirdweb/src/wallets/in-app/native/native-connector.ts`, `packages/thirdweb/src/react/web/wallets/shared/PassKeyLogin.tsx`, `packages/thirdweb/src/react/web/wallets/shared/OTPLoginUI.tsx`, `packages/thirdweb/src/wallets/in-app/native/auth/native-auth.ts`

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

<!-- end pr-codex -->
2024-08-08 23:37:35 +00:00
gregfromstl f74d52369f feat(thirdweb): headless multi-auth (#3797)
### TL;DR

Wallets can now add additional profiles to an account. Once added, any connected profile can be used to access the same wallet. This feature allows multiple profiles such as Google and Discord to be linked to a single wallet.

### What changed?

- Introduced a new method `linkProfile` to connect additional profiles to an existing wallet
- Added backend logic to handle profile linking and retrieval of linked profiles
- Minor modifications in types and export statements
- Updated embedded wallet URL to `localhost:3000`

### How to test?

1. Connect a wallet using one strategy (e.g., Google)
2. Use the `linkProfile` method to add another profile (e.g., Discord)
3. Verify both profiles can access the same wallet
4. Retrieve all linked profiles using the `getProfiles` method and verify the details

### Why make this change?

This change provides more flexibility and convenience to users by allowing them to link multiple profiles to a single wallet. It enhances user experience by providing multiple avenues for wallet access.

---

<!-- start pr-codex -->

---

## PR-Codex overview
This PR updates authentication types and imports across different wallet-related files.

### Detailed summary
- Updated imports and types in authentication-related files
- Replaced `type.js` with `types.js` in multiple files
- Added `Profile` type in `authentication/types.ts`
- Updated functions from `authenticate` to `connect` in multiple files

> The following files were skipped due to too many changes: `.changeset/green-wombats-rest.md`, `packages/thirdweb/src/wallets/in-app/native/auth/native-auth.ts`, `packages/thirdweb/src/wallets/in-app/core/interfaces/connector.ts`, `packages/thirdweb/src/wallets/in-app/web/lib/auth/abstract-login.ts`, `packages/thirdweb/src/wallets/in-app/native/native-connector.ts`, `packages/thirdweb/src/wallets/in-app/core/wallet/profiles.ts`, `packages/thirdweb/src/wallets/in-app/core/wallet/in-app-core.ts`, `packages/thirdweb/src/wallets/in-app/core/authentication/linkAccount.ts`, `packages/thirdweb/src/wallets/in-app/web/lib/web-connector.ts`, `packages/thirdweb/src/wallets/in-app/web/lib/auth/iframe-auth.ts`, `packages/thirdweb/src/wallets/in-app/web/lib/auth/base-login.ts`, `packages/thirdweb/src/extensions/marketplace/english-auctions/english-auctions.test.ts`, `packages/thirdweb/src/extensions/marketplace/direct-listings/direct-listings.test.ts`

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

<!-- end pr-codex -->
2024-08-08 23:37:32 +00:00
kien-ngo 419873a3c6 [Hotfix] ethers v5 adapter (#4014)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to make a small fix in the `ethers5.ts` adapter by replacing the `chainId` parameter with a predefined chain value.

### Detailed summary
- Replaced `chainId` with a predefined chain value in the `fromEthersContract` function in `ethers5.ts` adapter.

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

<!-- end pr-codex -->
2024-08-08 21:53:52 +00:00
gregfromstl 357a03aa8f test(smart-wallet): update tests to run sequentially and improve admin check (#4011)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to update the test suite for SmartWallet integration by making adjustments to the expectations related to event logs.

### Detailed summary
- Updated expectations for event logs in tests
- Changed `expect` assertions to use `logs.some` method for checking conditions

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

<!-- end pr-codex -->
2024-08-08 21:27:49 +00:00
kien-ngo 164dbed673 Dashboard v5 Aug 07 run (#3988)
# High-level changes
- [x] ContractMetadata section now fully on v5
- [x] Moved some code of the ClaimCondition section to v5
- [x] Removed claimCondition utils methods -> used the inner logics directly to avoid importing types from v4 packages
- [x] Forcefully hard-coded some types in v4 that are not in v5
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to update contract metadata handling and claim condition detection.

### Detailed summary
- Updated `ContractMetadata` component to use `ThirdwebContract`
- Improved claim condition detection in various components
- Refactored claim condition form components for better functionality

> The following files were skipped due to too many changes: `apps/dashboard/src/contract-ui/tabs/claim-conditions/components/claim-conditions-form/phase.tsx`

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

<!-- end pr-codex -->
2024-08-08 21:08:10 +00:00
6ccb6be3a0 Joe plume additions (#4013)
Signed-off-by: Joe-Thirdweb <[email protected]>
Co-authored-by: Jonas Daniels <[email protected]>
2024-08-08 13:58:13 -07:00
MananTank 7cba594046 Fix "All Wallets" not shown by default in Pay UI when trying to connect a new wallet (#4008)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on fixing the issue where "All Wallets" were not shown by default in the Pay UI when connecting a new wallet.

### Detailed summary
- Modified `BuyScreen.tsx` to ensure "All Wallets" are shown by default in the Pay UI
- Updated the logic for displaying recommended wallets and wallet options

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

<!-- end pr-codex -->
2024-08-08 20:32:37 +00:00
gregfromstl d48cd13d53 test(thirdweb): skip deployModularCore tests dependent on TW_SECRET_KEY (#4012)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR skips the test `deployModularCore` in `deploy-modular-core.test.ts`.

### Detailed summary
- Skips the test `deployModularCore` in `deploy-modular-core.test.ts` by changing `describe.runIf` to `describe.skip`

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

<!-- end pr-codex -->
2024-08-08 19:33:05 +00:00
MananTank ae83544c3a Move CMD+K search to shadcn/tailwind, clamp search result title to 2 lines (#4010)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to refactor the search functionality in the `CmdKSearch` component by introducing a new dialog UI for searching contracts.

### Detailed summary
- Added a new dialog UI for searching contracts
- Replaced Chakra UI components with custom UI components
- Updated search functionality with new design and features

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

<!-- end pr-codex -->
2024-08-08 19:20:31 +00:00
GWSzeto a996b54323 updated from modules to extensions in the build sidebar (#4009)
<!-- start pr-codex -->

## PR-Codex overview
The focus of this PR is to update the file `sidebar.tsx` in the contracts app to replace references to "modules" with "extensions" for clarity and consistency.

### Detailed summary
- Replaced all occurrences of `modulesSlug` with `extensionsSlug` for better naming
- Updated links and names to reflect the change from "Modules" to "Extensions"

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

<!-- end pr-codex -->
2024-08-08 18:23:05 +00:00
BahadorandGitHub 91317dcba3 Update page.mdx (#4000)
Signed-off-by: Bahador <[email protected]>
2024-08-08 10:38:53 -07:00
MananTank e6ac1cc802 [dashboard] No sign-in required for /dashboard/connect/playground page (#4002)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR updates the middleware and user hook in the dashboard app to use a new `isLoginRequired` function for checking logged-in paths.

### Detailed summary
- Added `isLoginRequired` function in `constants/auth.ts`
- Updated middleware to use `isLoginRequired` function
- Updated user hook to use `isLoginRequired` function

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

<!-- end pr-codex -->
2024-08-08 17:20:36 +00:00
MananTank 3649e3994a [dash] deploy form layout + various UI updates/fixes (#3994)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to update various UI components and layouts across different pages in the dashboard app.

### Detailed summary
- Updated styling for `nav-link.client.tsx` and `color-mode-toggle.tsx`
- Refactored layout in `publish/[...paths].tsx`
- Removed `MobileMenu` import in `chain-header.tsx`
- Added `Sidebar` component in `layout.tsx` and `chainPage/layout.tsx`
- Updated UI components in `BurgerMenuButton.tsx` and `publish.tsx`

> The following files were skipped due to too many changes: `apps/dashboard/src/components/pages/publish.tsx`

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

<!-- end pr-codex -->
2024-08-08 13:11:45 +00:00
gregfromstl dd7d28c44f fix(ts): migrate serializeTransaction and universalSignatureValidatorByteCode to viem (#3997)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to enhance the `serializeTransaction` interface in the `thirdweb` package to include a separate signature input while maintaining backwards compatibility.

### Detailed summary
- Improved `serializeTransaction` interface in `thirdweb` package
- Added separate signature input while maintaining backwards compatibility
- Updated dependencies in `crypto/package.json`
- Updated `package.json` in `thirdweb`
- Updated `typesVersions` in `package.json` of `thirdweb`
- Updated imports in `verify-hash.ts`
- Updated exports in `package.json` of `thirdweb`
- Updated types and functions in `serialize-transaction.test.ts`
- Updated types and functions in `serialize-transaction.ts`

> The following files were skipped due to too many changes: `packages/thirdweb/src/transaction/serialize-transaction.ts`, `pnpm-lock.yaml`

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

<!-- end pr-codex -->
2024-08-08 08:35:05 +00:00
Jonas DanielsandGitHub b58a0e531f [Chore] Unify import statements in chain definition files (#3999) 2024-08-07 23:24:40 -07:00
2b4629b505 Added Fraxtal and Mode Testnets to the chain-definitions (#3996)
Signed-off-by: Jonas Daniels <[email protected]>
Co-authored-by: Jonas Daniels <[email protected]>
2024-08-07 21:42:16 -07:00
MananTank 698b8dbb97 allow useActiveWalletChain direct usage in dashboard (#3990)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to replace the usage of `useDashboardActiveWalletChain` with `useActiveWalletChain` for consistency and clarity.

### Detailed summary
- Replaced `useDashboardActiveWalletChain` with `useActiveWalletChain` in multiple files for consistent usage.
- Removed unnecessary imports of `useDashboardActiveWalletChain`.
- Updated functions and components to use `useActiveWalletChain` for better readability and understanding.

> The following files were skipped due to too many changes: `apps/dashboard/src/components/buttons/MismatchButton.tsx`

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

<!-- end pr-codex -->
2024-08-08 01:19:05 +00:00
MananTank a4bc285cb7 Sync Chain object changes to Connection manager and wallets from UI components (#3989)
* When `chain` or `chains` prop passed to UI components like `ConnectButton` , `ConnectEmbed` etc are updated - make sure that those chain makes their way to connection manager ( useActiveWalletChain ) and to all the wallets ( getChain )

This is mainly for dashboard - where users can modify the chains and we need to update the chain objects when that's done

<!-- start pr-codex -->

---

## PR-Codex overview
This PR updates wallet adapters to use cached chain objects for improved performance.

### Detailed summary
- Added `getCachedChainIfExists` function to retrieve cached chain objects.
- Updated `getChain` method in wallet adapters to use cached chains.
- Removed unnecessary `cacheChains` function calls.
- Added `useConnectionManager` hook to manage defined chains store.

> The following files were skipped due to too many changes: `packages/thirdweb/src/react/native/ui/connect/ConnectButton.tsx`, `packages/thirdweb/src/wallets/manager/index.ts`

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

<!-- end pr-codex -->
2024-08-08 01:19:01 +00:00
GWSzeto 7c2f616dfe renamed from extension to module for modular contracts (#3985)
<!-- start pr-codex -->

## PR-Codex overview
The focus of this PR is to remove numerous contract pages and assets related to ERC standards and extensions.

### Detailed summary
- Deleted multiple contract pages and assets related to ERC standards and extensions
- Renamed "extensions" to "modules" in contract descriptions and comments

> The following files were skipped due to too many changes: `apps/portal/src/app/contracts/modular-contracts/core-contracts/erc-20/page.mdx`, `apps/portal/src/app/contracts/modular-contracts/core-contracts/erc-1155/page.mdx`, `apps/portal/src/app/contracts/modular-contracts/extension-contracts/erc-20/misc/transferableERC20/page.mdx`, `apps/portal/src/app/contracts/modular-contracts/extension-contracts/erc-721/misc/transferableERC721/page.mdx`, `apps/portal/src/app/contracts/modular-contracts/extension-contracts/erc-1155/misc/transferableERC1155/page.mdx`, `apps/portal/src/app/contracts/modular-contracts/extension-contracts/erc-1155/metadata/simpleMetadataERC1155/page.mdx`, `apps/portal/src/app/contracts/modular-contracts/extension-contracts/erc-20/minting/mintableERC20/page.mdx`, `apps/portal/src/app/contracts/modular-contracts/extension-contracts/erc-721/metadata/batchMetadataERC721/page.mdx`, `apps/portal/src/app/contracts/modular-contracts/extension-contracts/erc-1155/metadata/batchMetadataERC1155/page.mdx`, `apps/portal/src/app/contracts/modular-contracts/extension-contracts/erc-1155/metadata/openEditionMetadataERC1155/page.mdx`, `apps/portal/src/app/contracts/modular-contracts/extension-contracts/erc-721/minting/mintableERC721/page.mdx`, `apps/portal/src/app/contracts/modular-contracts/extension-contracts/erc-1155/minting/mintableERC1155/page.mdx`, `apps/portal/src/app/contracts/modular-contracts/extension-contracts/erc-721/metadata/openEditionMetadataERC721/page.mdx`, `apps/portal/src/app/contracts/modular-contracts/extension-contracts/erc-20/minting/claimableERC20/page.mdx`, `apps/portal/src/app/contracts/modular-contracts/extension-contracts/erc-721/minting/claimableERC721/page.mdx`, `apps/portal/src/app/contracts/modular-contracts/extension-contracts/erc-1155/minting/claimableERC1155/page.mdx`, `apps/portal/src/app/contracts/modular-contracts/extension-contracts/erc-721/metadata/delayedRevealBatchMetadataERC721/page.mdx`, `apps/portal/src/app/contracts/modular-contracts/how-it-works/page.mdx`, `apps/portal/src/app/contracts/modular-contracts/extension-contracts/erc-721/misc/royaltyERC721/page.mdx`, `apps/portal/src/app/contracts/modular-contracts/extension-contracts/erc-1155/misc/royaltyERC1155/page.mdx`, `apps/portal/src/app/contracts/modular-contracts/overview/page.mdx`, `apps/portal/src/app/contracts/modular-contracts/modular-contracts/page.mdx`, `apps/portal/src/app/contracts/modular-contracts/get-started/page.mdx`, `apps/portal/src/app/contracts/sidebar.tsx`

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

<!-- end pr-codex -->
2024-08-07 19:15:43 +00:00
4d0e00a7c4 Add Abstract testnet to ZK Sync chain checks (#3986)
Co-authored-by: Jonas Daniels <[email protected]>
2024-08-07 11:18:54 -07:00
kien-ngo e3220d4a8d Dashboard v5: Remove v4 code (#3982)
High-level changes:
- [x] useAdmin migrated to v5
- [x] useAdminOrSelf migrated to v5
- [x] ERC20 mint form to v5
2024-08-07 16:12:49 +00:00
FirekeeperandGitHub 68e0aa2d90 Unity v5 initial docs (#3958) 2024-08-06 21:24:56 -07:00
MananTank ce00999e95 cleanup-imports (#3983)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR updates import paths to use absolute imports and removes unnecessary imports.

### Detailed summary
- Updated import paths to use absolute imports (`@/lib/utils`, `@/components/ui`, `@/components/pagination-buttons`, etc.)
- Removed unnecessary imports from various files

> The following files were skipped due to too many changes: `apps/dashboard/src/pages/grant/superchain.tsx`, `apps/dashboard/src/pages/open-source.tsx`, `apps/dashboard/src/@/components/color-mode-toggle.tsx`, `apps/dashboard/src/pages/learn/index.tsx`, `apps/dashboard/src/components/pay/PayAnalytics/components/Payouts.tsx`, `apps/dashboard/src/components/homepage/sections/PricingEngine.tsx`, `apps/dashboard/src/lib/vercel-utils.ts`, `apps/dashboard/src/components/color-mode/color-mode-toggle.tsx`, `apps/dashboard/src/components/pay/PayAnalytics/components/PayNewCustomers.tsx`, `apps/dashboard/src/app/(dashboard)/dashboard/connect/ecosystem/[slug]/(active)/hooks/use-ecosystem.ts`, `apps/dashboard/src/components/pay/PayConfig.tsx`, `apps/dashboard/src/components/explore/publisher/index.tsx`, `apps/dashboard/src/@3rdweb-sdk/react/hooks/useApi.ts`, `apps/dashboard/src/pages/template/[id].tsx`, `apps/dashboard/src/contract-ui/tabs/english-auctions/components/table.tsx`, `apps/dashboard/src/@3rdweb-sdk/react/hooks/useLoggedInUser.ts`, `apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/(chainPage)/page.tsx`, `apps/dashboard/src/app/(dashboard)/(chain)/chainlist/components/server/chainlist-card.tsx`, `apps/dashboard/src/components/contract-components/contract-deploy-form/trusted-forwarders-fieldset.tsx`, `apps/dashboard/src/components/pay/PayAnalytics/components/PaymentsSuccessRate.tsx`, `apps/dashboard/src/components/contract-components/contract-deploy-form/contract-metadata-fieldset.tsx`, `apps/dashboard/src/app/(dashboard)/(chain)/chainlist/components/server/chainlist-row.tsx`, `apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/(chainPage)/components/server/sidebar-content.tsx`, `apps/dashboard/src/app/login/auth-actions.ts`, `apps/dashboard/src/pages/api/moralis/balances.ts`, `apps/dashboard/src/pages/404.tsx`, `apps/dashboard/src/pages/hackathon/earn.tsx`, `apps/dashboard/src/components/landing-pages/layout.tsx`, `apps/dashboard/src/pages/hackathon/consumer-crypto.tsx`, `apps/dashboard/src/pages/_app.tsx`, `apps/dashboard/src/pages/index.tsx`, `apps/dashboard/src/pages/hackathon/readyplayer3.tsx`, `apps/dashboard/src/pages/community/ambassadors.tsx`, `apps/dashboard/src/contract-ui/tabs/manage/components/getExtensionInstalledParams.ts`, `apps/dashboard/src/components/engine/overview/backend-wallets-table.tsx`, `apps/dashboard/src/components/product-pages/common/ProductPage.tsx`, `apps/dashboard/src/components/pay/PayAnalytics/components/PayCustomersTable.tsx`, `apps/dashboard/src/components/cmd-k-search/index.tsx`, `apps/dashboard/src/@3rdweb-sdk/react/hooks/useEngine.ts`, `apps/dashboard/src/components/buttons/TransactionButton.tsx`, `apps/dashboard/src/components/pages/publish.tsx`, `apps/dashboard/src/components/onboarding/Steps.tsx`, `apps/dashboard/src/components/pay/PayAnalytics/PayAnalytics.tsx`, `apps/dashboard/src/contract-ui/tabs/manage/page.tsx`, `apps/dashboard/src/components/pay/PayAnalytics/components/PaymentHistory.tsx`, `apps/dashboard/src/components/contract-components/contract-deploy-form/custom-contract.tsx`, `apps/dashboard/src/app/(dashboard)/trending/components/trending-table.tsx`, `apps/dashboard/src/contract-ui/tabs/settings/components/metadata.tsx`, `apps/dashboard/src/components/selects/CustomChainRenderer.tsx`, `apps/dashboard/src/components/selects/NetworkSelectorButton.tsx`

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

<!-- end pr-codex -->
2024-08-07 01:29:48 +00:00
MananTank 347c4de046 Update deploy form layout (#3938)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to update various text labels and add a new sidebar component for contracts in the dashboard.

### Detailed summary
- Updated text labels for wallet addresses in different contract settings
- Added a new `ContractsSidebar` component to the dashboard
- Updated styling for file upload components
- Modified form field labels and descriptions for contract settings

> The following files were skipped due to too many changes: `apps/dashboard/src/components/contract-components/contract-deploy-form/contract-metadata-fieldset.tsx`, `apps/dashboard/src/components/contract-components/contract-deploy-form/custom-contract.tsx`

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

<!-- end pr-codex -->
2024-08-07 01:29:45 +00:00
MananTank 48eb472645 Move deploy form outside the drawer to a page (#3936)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to update components related to publishing contracts, including adding deployment functionality and improving UI elements.

### Detailed summary
- Updated `NetworkSelectorButton` to handle deployment theme
- Added deployment functionality in `PublishPage`
- Enhanced `ShareButton` UI and functionality
- Improved UI elements in `TrustedForwardersFieldset`
- Updated `PublishWithVersionPage` with deployment logic and UI enhancements

> The following files were skipped due to too many changes: `apps/dashboard/src/components/pages/publish.tsx`

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

<!-- end pr-codex -->
2024-08-07 00:45:27 +00:00
Jonas DanielsandGitHub 6530e41948 [Chore] Update turbo dependency to version 2.0.12 (#3979) 2024-08-06 16:19:11 -07:00
MananTank 06bc0c1ed4 Preserve Chain overrides in dashboard + enable editing / adding new chains in CustomConnectWallet button (#3972)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to update chain-related functions and improve chain handling in various components.

### Detailed summary
- Updated chain-related functions in multiple files
- Improved chain handling in components and SDK contexts
- Refactored chain mapping and RPC URL retrieval functions

> The following files were skipped due to too many changes: `apps/dashboard/src/middleware.ts`, `apps/dashboard/src/components/contract-components/import-contract/modal.tsx`, `apps/dashboard/src/components/smart-wallets/AccountFactories/factory-contracts.tsx`, `apps/dashboard/.eslintrc.js`, `apps/dashboard/src/contract-ui/tabs/shared-components/cancel-tab.tsx`, `apps/dashboard/src/@3rdweb-sdk/react/hooks/useRegistry.ts`, `apps/dashboard/src/contract-ui/tabs/account/components/deposit-native.tsx`, `apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/(chainPage)/components/client/PayModal.tsx`, `apps/dashboard/src/contract-ui/tabs/shared-components/list-button.tsx`, `apps/dashboard/src/components/contract-components/contract-deploy-form/index.tsx`, `apps/dashboard/src/@3rdweb-sdk/react/hooks/useEngine.ts`, `apps/dashboard/src/hooks/useContractAbiItems.ts`, `apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/(chainPage)/layout.tsx`, `apps/dashboard/src/pages/api/moralis/balances.ts`, `apps/dashboard/src/contract-ui/tabs/direct-listings/components/table.tsx`, `apps/dashboard/src/contract-ui/tabs/settings/components/platform-fees.tsx`, `apps/dashboard/src/contract-ui/tabs/settings/components/primary-sale.tsx`, `apps/dashboard/src/contract-ui/tabs/nfts/components/mint-form.tsx`, `apps/dashboard/src/contract-ui/tabs/english-auctions/components/table.tsx`, `apps/dashboard/src/contract-ui/tabs/nfts/components/mint-supply-tab.tsx`, `apps/dashboard/src/contract-ui/tabs/settings/components/royalties.tsx`, `apps/dashboard/src/contract-ui/tabs/nfts/components/claim-tab.tsx`, `apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/(chainPage)/components/client/FaucetButton.tsx`, `apps/dashboard/src/contract-ui/tabs/nfts/components/airdrop-tab.tsx`, `apps/dashboard/src/contract-ui/tabs/tokens/components/mint-button.tsx`, `apps/dashboard/src/contract-ui/tabs/accounts/page.tsx`, `apps/dashboard/src/contract-ui/tabs/nfts/components/burn-tab.tsx`, `apps/dashboard/src/contract-ui/tabs/nfts/components/mint-button.tsx`, `apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/(chainPage)/components/server/chain-header.tsx`, `apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/(chainPage)/components/client/add-chain-to-wallet.tsx`, `apps/dashboard/src/contract-ui/tabs/nfts/components/lazy-mint-button.tsx`, `apps/dashboard/src/components/buttons/TransactionButton.tsx`, `apps/dashboard/src/contract-ui/tabs/nfts/components/transfer-tab.tsx`, `apps/dashboard/src/contract-ui/tabs/nfts/components/reveal-button.tsx`, `apps/dashboard/src/contract-ui/tabs/nfts/components/batch-lazy-mint-button.tsx`, `apps/dashboard/src/contract-ui/tabs/nfts/components/reveal-form.tsx`, `apps/dashboard/src/contract-ui/tabs/tokens/components/claim-form.tsx`, `apps/dashboard/src/contract-ui/tabs/nfts/components/shared-metadata-button.tsx`, `apps/dashboard/src/contract-ui/tabs/manage/page.tsx`, `apps/dashboard/src/components/app-layouts/app.tsx`, `apps/dashboard/src/components/engine/contract-subscription/contract-subscriptions-table.tsx`, `apps/dashboard/src/components/selects/NetworkSelectorButton.tsx`, `apps/dashboard/src/components/app-layouts/provider-setup.tsx`, `apps/dashboard/src/contract-ui/tabs/overview/components/MarketplaceDetails.tsx`, `apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/tx/[txHash]/page.tsx`, `apps/dashboard/src/contract-ui/tabs/settings/components/metadata.tsx`, `apps/dashboard/src/components/app-layouts/providers.tsx`, `apps/dashboard/src/contract-ui/tabs/split/page.tsx`, `apps/dashboard/src/@3rdweb-sdk/react/components/connect-wallet/index.tsx`, `apps/dashboard/src/pages/[chain_id]/[...paths].tsx`, `apps/dashboard/src/lib/v5-adapter.ts`, `apps/dashboard/src/components/buttons/MismatchButton.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 -->
2024-08-06 22:47:21 +00:00
Jonas DanielsandGitHub ccc3a2d2c8 speed up docs (#3967) 2024-08-06 15:44:36 -07:00
Jonas DanielsGitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
deb704a084 Version Packages (#3966)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-08-06 15:26:32 -07:00
dc86fa2e6e updated pay interface for onramp + gas (#3894)
Signed-off-by: Jonas Daniels <[email protected]>
Co-authored-by: Jonas Daniels <[email protected]>
2024-08-06 15:16:49 -07:00
Aryan MalikandGitHub 64d1b79b61 fix: update import statement for smartWallet in smart-wallet.ts (#3968) 2024-08-06 15:09:37 -07:00
gregfromstl f4e84e099a test(ts): adds test case for signMessage (#3978)
### TL;DR

Added a new test case to `sign-message.test.ts` to verify the signature generated by the `signMessage` function when provided with a specific message and private key.

### What changed?

The test file `sign-message.test.ts` in the `thirdweb` package has been updated to include a new test case that checks the signature generated by the `signMessage` function.

### How to test?

Run the test suite for the `thirdweb` package to ensure all tests, including the new one, pass correctly.

### Why make this change?

To enhance test coverage and ensure that the `signMessage` function generates the expected signature when given specific inputs.

---
2024-08-06 21:39:57 +00:00
jnsdls b9807f001b [Feature] Add analytics tracking to FaucetButton component (#3977)
### TL;DR

Added analytics tracking to the `FaucetButton` component.

### What changed?

Integrated `useTrack` hook to capture and track events (attempt, success, error) for claiming funds via the FaucetButton. Updated error handling for clarity.

### How to test?

1. Deploy the dashboard.
2. Navigate to the FaucetButton component.
3. Attempt to claim funds and observe tracking behavior in the configured analytics dashboard.

### Why make this change?

To gain better insights into how users interact with the FaucetButton and to capture relevant events for analysis.

---
2024-08-06 21:10:38 +00:00
gregfromstl 358a7577c1 fix(wallet): resolve wallet adapter info retrieval issue (#3976) 2024-08-06 20:54:38 +00:00
kien-ngo c05a94d985 Dashboard: Delete Marketplace v2 listing page (#3975)
- [x] Marketplace v2 is very outdated
- [x] Marketplace v3 is out for over 2 years
- [x] After the _incident_, people should be on v3 now
- [x] This also helps remove more sdk v4 code

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to refactor and clean up the contract UI listings components.

### Detailed summary
- Removed unused components from listings page
- Updated route configuration for listings
- Refactored ListingStats component
- Updated imports and dependencies

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

<!-- end pr-codex -->
2024-08-06 20:49:05 +00:00
ianandGitHub ab5d6bcfe2 New Pay Guides + Sidebar Structure (#3970) 2024-08-06 13:11:00 -07:00
d7e59305bd upstream viem tweaks (#3934)
Co-authored-by: greg <[email protected]>
Co-authored-by: Jonas Daniels <[email protected]>
2024-08-06 10:48:48 -07:00
Jonas DanielsandGitHub edb86b9728 [Chore] Update CI badge link in README.md (#3973) 2024-08-06 10:45:44 -07:00
Jonas DanielsandGitHub 23c1cfa283 [Test] Conditionally run toSerializableTransaction tests based on TW_SECRET_KEY environment variable (#3965) 2024-08-06 00:12:22 -07:00
Jonas DanielsandGitHub 9944f9d731 [Chore] Remove benchmark job from CI workflow (#3964) 2024-08-06 00:10:33 -07:00
jnsdls 2e3c5e9dbd [Fix] Handle account switching inside connected wallet for SIWE auth (#3963)
FIXES: #3912

### TL;DR
This PR fixes the handling of account switching within a connected wallet in Sign-In with Ethereum (SIWE) authentication states.

### What changed?
- Updated the `isLoggedIn` function to accept an `address` argument and added more checks to validate the JWT and the associated address.
- Pass `account` as a new parameter to `useSiweAuth` to ensure the correct account is handled.
- Removed experimental server external packages from `next.config.mjs`.
- Removed `@shikijs/twoslash` dependency from `package.json`.

### How to test?
1. Switch accounts within a connected wallet and ensure the SIWE authentication state updates correctly.
2. Verify that the application runs without errors related to the removed experimental packages and dependencies.

### Why make this change?
To ensure better account management and state consistency within the SIWE authentication framework, and to remove unused or experimental configurations for better stability and performance.

---

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on enhancing account switching in SIWE authentication states.

### Detailed summary
- Updated functions to include `account` parameter for SIWE authentication
- Changed login and authentication logic
- Added `getAuthResult` function for server-side auth
- Updated dependencies and imports

> The following files were skipped due to too many changes: `pnpm-lock.yaml`

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

<!-- end pr-codex -->
2024-08-06 06:53:24 +00:00
gregfromstl 206b825d7c fix(portal): update prefix URL in EditPage component (#3962)
Updated the GitHub edit URL prefix in the EditPage component from 'https://github.com/thirdweb-dev/docs-v2/edit/main/src/app' to 'https://github.com/thirdweb-dev/js/edit/main/apps/portal/src/app'.

---

## Problem solved

Short description of the bug fixed or feature added
2024-08-06 06:33:23 +00:00
gregfromstl 584aa7a5fe test(thirdweb): add condition to serialize-transaction eip1559 test based on TW_SECRET_KEY (#3955)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on adding a conditional test suite for the `eip1559` function based on the presence of a secret key.

### Detailed summary
- Conditionally runs the `eip1559` test suite based on the presence of `TW_SECRET_KEY` environment variable.

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

<!-- end pr-codex -->
2024-08-06 05:29:27 +00:00
kien-ngo 2500be36e7 Dashboard v5: Aug 05 updates (#3942)
### High level changes
- [x] Deleted `apps/dashboard/src/components/contract-tabs/code/ContractCode.tsx` - doesn't seem to be used anywhere
- [x] Uninstall v4's react-core and wallets packages
- [x] Rename some components's names to make it clear that they are for ERC20 only (`mint-form-erc20`)
- [x] `useTxNotifications` now only accepts v5 contract

### Tested areas
- [x] ERC20 mintTo button
- [x] CreateListingButton (minor change but need to test anyway)
- [x] ContractSidebar.tsx

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to update contract-related components and dependencies.

### Detailed summary
- Updated `CreateListingButton` props in different tab pages
- Added `contractV5` variable in multiple components
- Updated dependencies and removed unused ones

> The following files were skipped due to too many changes: `apps/dashboard/src/contract-ui/tabs/nfts/components/batch-lazy-mint-button.tsx`, `apps/dashboard/src/core-ui/batch-upload/batch-lazy-mint.tsx`, `apps/dashboard/src/contract-ui/tabs/shared-components/list-button.tsx`, `apps/dashboard/src/hooks/useTxNotifications.ts`, `apps/dashboard/src/core-ui/sidebar/detail-page.tsx`, `apps/dashboard/src/contexts/error-handler.tsx`, `apps/dashboard/src/contract-ui/tabs/tokens/components/mint-form.tsx`

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

<!-- end pr-codex -->
2024-08-06 05:18:27 +00:00
gregfromstl b7daefb394 fix(app): update header texts and contract address (#3956)
### TL;DR
Updates various UI headings in the payment-related pages and updates the NFT contract address in the transaction button component.

### What changed?
- Updated headings in `pay/page.tsx`:
  - 'Fund wallets' to 'Top Up'
  - 'Direct Payments' to 'Commerce'
  - 'Onchain Payments' to 'Transactions'
- Changed NFT contract address in `transaction-button.tsx` from `0x96B30d36f783c7BC68535De23147e2ce65788e93` to `0x827c1c3889923015C1FC31BF677D00FbE6F01D52`.

### How to test?
1. Navigate to the payment page and verify that the headings are updated.
2. Ensure that the transactions are working correctly with the new contract address.

### Why make this change?
The updates are intended to enhance user comprehension and ensure the correct NFT contract is being used.

---

## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to update text and component names related to payment transactions in the playground web app.

### Detailed summary
- Updated the `nftContract` address in `transaction-button.tsx`
- Changed "Fund wallets" to "Top Up" in `page.tsx`
- Renamed "Direct Payments" to "Commerce"
- Replaced "Onchain Payments" with "Transactions"

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

<!-- end pr-codex -->
2024-08-06 05:14:51 +00:00
ianandGitHub 9eeb69e3dd Add direct payments guide and webhooks documentation (#3957) 2024-08-05 22:10:43 -07:00
2e963137fb Updating Aleph Zero and Lumia chainlist (#3960)
Co-authored-by: Jonas Daniels <[email protected]>
2024-08-05 22:04:23 -07:00
kien-ngo 0ae539f384 Docs: Update locale table (#3959)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR updates the language codes for French and Korean in the sign-in customization page.

### Detailed summary
- Updated language code for French to `fr_FR`
- Updated language code for Korean to `ko_KR`

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

<!-- end pr-codex -->
2024-08-06 03:13:25 +00:00
gregfromstl dce096fba4 chore: remove faulty test (#3954)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR skips unit tests requiring a secret key and updates a URL in the downloadMock function.

### Detailed summary
- Skips unit tests in claimERC20, claimERC721, and claimERC1155 if no secret key available
- Updated URL in `downloadMock` function in `storage.ts`

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

<!-- end pr-codex -->
2024-08-06 00:07:45 +00:00
Jonas DanielsGitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>GitHub Action
34e6f69568 Version Packages (#3953)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: GitHub Action <[email protected]>
2024-08-05 17:04:41 -07:00
Jonas Daniels c9e14e366c Revert "Version Packages (#3950)"
This reverts commit 65eb299eb0.
2024-08-05 16:24:13 -07:00
Jonas DanielsandGitHub 4308c4a1cf [Chore] Update thirdweb dependency to use workspace protocol (#3952) 2024-08-05 16:20:44 -07:00
Jonas DanielsGitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
65eb299eb0 Version Packages (#3950)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-08-05 16:18:53 -07:00
gregfromstl 1309602889 docs: adds telegram changeset (#3951)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR adds a new feature to the `thirdweb` module, enabling users to log in to in-app wallets using Telegram.

### Detailed summary
- Added support for Telegram login option in in-app wallets using `thirdweb`
- Updated `inAppWallet` function to include Telegram login strategy
- Added example code snippet for connecting to wallet using Telegram strategy

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

<!-- end pr-codex -->
2024-08-05 22:54:17 +00:00
GWSzeto 09ebee8e41 added build back into the docs (#3949)
Modified .gitignore so that it accepts the build folder

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to add detailed documentation for various ERC standards in smart contracts.

### Detailed summary
- Added documentation for ERC721, ERC1155, and ERC20 smart contract standards
- Included usage examples and base contracts for each extension
- Updated metadata and images for clarity and consistency

> The following files were skipped due to too many changes: `apps/portal/src/app/contracts/build/extensions/erc-1155/ERC1155Mintable/page.mdx`, `apps/portal/src/app/contracts/build/extensions/erc-721/ERC721Mintable/page.mdx`, `apps/portal/src/app/contracts/build/extensions/erc-1155/ERC1155Enumerable/page.mdx`, `apps/portal/src/app/contracts/build/extensions/erc-721/ERC721Revealable/page.mdx`, `apps/portal/src/app/contracts/build/extensions/erc-1155/ERC1155Revealable/page.mdx`, `apps/portal/src/app/contracts/build/extensions/erc-721/ERC721Enumerable/page.mdx`, `apps/portal/src/app/contracts/build/extensions/erc-1155/ERC1155Burnable/page.mdx`, `apps/portal/src/app/contracts/build/extensions/erc-721/ERC721BatchMintable/page.mdx`, `apps/portal/src/app/contracts/build/extensions/erc-20/ERC20BatchMintable/page.mdx`, `apps/portal/src/app/contracts/build/extensions/erc-721/ERC721Supply/page.mdx`, `apps/portal/src/app/contracts/build/extensions/erc-1155/ERC1155Supply/page.mdx`, `apps/portal/src/app/contracts/build/extensions/erc-1155/ERC1155Claimable/page.mdx`, `apps/portal/src/app/contracts/build/extensions/erc-1155/ERC1155BatchMintable/page.mdx`, `apps/portal/src/app/contracts/build/extensions/erc-721/ERC721Claimable/page.mdx`, `apps/portal/src/app/contracts/build/extensions/erc-20/ERC20ClaimConditions/page.mdx`, `apps/portal/src/app/contracts/build/extensions/erc-20/ERC20/page.mdx`, `apps/portal/src/app/contracts/build/extensions/erc-721/ERC721ClaimConditions/page.mdx`, `apps/portal/src/app/contracts/build/base-contracts/erc-20/base/page.mdx`, `apps/portal/src/app/contracts/build/extensions/general/Multicall/page.mdx`, `apps/portal/src/app/contracts/build/modular-contracts/page.mdx`, `apps/portal/src/app/contracts/build/extensions/erc-721/ERC721ClaimCustom/page.mdx`, `apps/portal/src/app/contracts/build/extensions/erc-1155/ERC1155ClaimCustom/page.mdx`, `apps/portal/src/app/contracts/build/base-contracts/erc-4337/account-factory/page.mdx`, `apps/portal/src/app/contracts/build/base-contracts/erc-20/vote/page.mdx`, `apps/portal/src/app/contracts/build/extensions/erc-1155/ERC1155ClaimConditions/page.mdx`, `apps/portal/src/app/contracts/build/extensions/general/PermissionsEnumerable/page.mdx`, `apps/portal/src/app/contracts/build/base-contracts/erc-4337/managed-account-factory/page.mdx`, `apps/portal/src/app/contracts/build/base-contracts/erc-20/drop/page.mdx`, `apps/portal/src/app/contracts/build/extensions/erc-1155/ERC1155ClaimPhases/page.mdx`, `apps/portal/src/app/contracts/build/extensions/general/Ownable/page.mdx`, `apps/portal/src/app/contracts/build/base-contracts/erc-20/drop-vote/page.mdx`, `apps/portal/src/app/contracts/build/extensions/erc-721/ERC721ClaimPhases/page.mdx`, `apps/portal/src/app/contracts/build/extensions/general/BatchMintMetadata/page.mdx`, `apps/portal/src/app/contracts/build/extensions/general/Permissions/page.mdx`, `apps/portal/src/app/contracts/build/extensions/erc-721/ERC721Staking/page.mdx`, `apps/portal/src/app/contracts/build/extensions/erc-20/ERC20Permit/page.mdx`, `apps/portal/src/app/contracts/build/base-contracts/erc-20/signature-mint/page.mdx`, `apps/portal/src/app/contracts/build/base-contracts/erc-4337/page.mdx`, `apps/portal/src/app/contracts/build/extensions/erc-20/ERC20Staking/page.mdx`, `apps/portal/src/app/contracts/build/extensions/general/ContractMetadata/page.mdx`, `apps/portal/src/app/contracts/build/extensions/general/PlatformFee/page.mdx`, `apps/portal/src/app/contracts/build/base-contracts/erc-721/delayed-reveal/page.mdx`, `apps/portal/src/app/contracts/build/base-contracts/erc-20/signature-mint-vote/page.mdx`, `apps/portal/src/app/contracts/build/base-contracts/erc-1155/delayed-reveal/page.mdx`, `apps/portal/src/app/contracts/build/extensions/general/LazyMint/page.mdx`, `apps/portal/src/app/contracts/build/base-contracts/erc-721/signature-mint/page.mdx`, `apps/portal/src/app/contracts/build/extensions/erc-4337/AccountExtension/page.mdx`, `apps/portal/src/app/contracts/build/extensions/general/PrimarySale/page.mdx`, `apps/portal/src/app/contracts/build/base-contracts/erc-1155/signature-mint/page.mdx`, `apps/portal/src/app/contracts/build/base-contracts/erc-4337/managed-account/page.mdx`, `apps/portal/src/app/contracts/build/extensions/erc-1155/ERC1155Staking/page.mdx`, `apps/portal/src/app/contracts/build/base-contracts/erc-721/base/page.mdx`, `apps/portal/src/app/contracts/build/extensions/erc-4337/SmartWallet/page.mdx`, `apps/portal/src/app/contracts/build/base-contracts/erc-4337/account/page.mdx`, `apps/portal/src/app/contracts/build/base-contracts/erc-721/lazy-mint/page.mdx`, `apps/portal/src/app/contracts/build/extensions/general/DelayedReveal/page.mdx`, `apps/portal/src/app/contracts/build/extensions/erc-4337/SmartWalletFactory/page.mdx`, `apps/portal/src/app/contracts/build/get-started/page.mdx`, `apps/portal/src/app/contracts/build/extensions/general/Royalty/page.mdx`, `apps/portal/src/app/contracts/build/base-contracts/erc-721/drop/page.mdx`, `apps/portal/src/app/contracts/build/base-contracts/erc-1155/lazy-mint/page.mdx`, `apps/portal/src/app/contracts/build/base-contracts/erc-1155/base/page.mdx`, `apps/portal/src/app/contracts/build/base-contracts/erc-1155/drop/page.mdx`, `apps/portal/src/app/contracts/build/extensions/erc-20/ERC20SignatureMint/page.mdx`, `apps/portal/src/app/contracts/build/base-contracts/page.mdx`, `apps/portal/src/app/contracts/build/extensions/erc-721/ERC721SignatureMint/page.mdx`, `apps/portal/src/app/contracts/build/extensions/erc-1155/ERC1155SignatureMint/page.mdx`, `apps/portal/src/app/contracts/build/extensions/page.mdx`, `apps/portal/src/app/contracts/build/extensions/erc-1155/ERC1155DropSinglePhase/page.mdx`, `apps/portal/src/app/contracts/build/extensions/general/DropSinglePhase/page.mdx`, `apps/portal/src/app/contracts/build/extensions/general/Drop/page.mdx`, `apps/portal/src/app/contracts/build/extensions/erc-1155/ERC1155Drop/page.mdx`, `apps/portal/src/app/contracts/build/overview/assets/extension-model.svg`

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

<!-- end pr-codex -->
2024-08-05 22:42:20 +00:00
ea2247c40c Added Celo Alfajores Testnet within the chain-definitions (#3941)
Signed-off-by: Jonas Daniels <[email protected]>
Co-authored-by: Jonas Daniels <[email protected]>
2024-08-05 15:30:42 -07:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
a8061277fb chore(deps-dev): bump typescript from 5.5.2 to 5.5.4 (#3945)
Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-05 15:23:19 -07:00
Jonas DanielsandGitHub eb94d2ad18 [Feature] Add Content Security Policy and security headers configuration (#3943) 2024-08-05 15:20:13 -07:00
kien-ngo b3aabee23b Dashboard v5: Remove more v4 code (#3927)
This PR is the first step to eventually remove all the v4 code inside `src/contract-ui/tabs/nfts/page.tsx`

2 main components that is now v4-free:
- [x] useIsMinter
- [x] MinterOnly

In fear of putting up a huge PR, I submit this PR as the first in this series

<!-- start pr-codex -->

---

## PR-Codex overview
This PR updates contract handling and minter role detection across multiple components.

### Detailed summary
- Updated contract handling to use `ThirdwebContract`
- Improved minter role detection logic
- Refactored minting components to use updated contract handling

> The following files were skipped due to too many changes: `apps/dashboard/src/contract-ui/tabs/nfts/components/shared-metadata-button.tsx`, `apps/dashboard/src/contract-ui/tabs/nfts/components/batch-lazy-mint-button.tsx`, `apps/dashboard/src/contract-ui/tabs/nfts/page.tsx`

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

<!-- end pr-codex -->
2024-08-05 20:43:02 +00:00
kien-ngo 72fad8f22d Dashboard v5: Remove useStorageUpload (#3929)
- Add new React hook that uses v5's `upload` under the hood
- Sacrifice has been made - we remove the progress % from the loading bar

<!-- start pr-codex -->

---

## PR-Codex overview
The PR focuses on replacing `useStorageUpload` with `useDashboardStorageUpload` in multiple components for IPFS file uploads.

### Detailed summary
- Replaced `useStorageUpload` with `useDashboardStorageUpload` in `button.tsx`, `string-input.tsx`, `IconUpload.tsx`, and `dropzone.tsx`.
- Updated file upload logic in `FileUpload` component in `dropzone.tsx`.
- Added `useDashboardStorageUpload` in `useDashboardStorageUpload.tsx` for IPFS file uploads.

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

<!-- end pr-codex -->
2024-08-05 20:26:18 +00:00
MananTank e2db196790 Fix Forced dark theme on certain pages (#3940)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to add a new `useForceDarkTheme` hook to enforce dark theme across multiple pages.

### Detailed summary
- Added `useForceDarkTheme` hook to enforce dark theme.
- Updated multiple pages to use the new hook.
- Removed `DarkMode` component from affected pages.

> The following files were skipped due to too many changes: `apps/dashboard/src/pages/404.tsx`, `apps/dashboard/src/pages/index.tsx`, `apps/dashboard/src/pages/template/[id].tsx`, `apps/dashboard/src/pages/open-source.tsx`, `apps/dashboard/src/pages/contact-us.tsx`, `apps/dashboard/src/pages/community/ambassadors.tsx`

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

<!-- end pr-codex -->
2024-08-05 20:06:59 +00:00
gregfromstl ae28e27a8c feat: telegram login (#3830)
## TL;DR

This PR introduces support for Telegram OAuth across various components of the thirdweb packages.

## What changed?

- Added 'Telegram' as an OAuth option in `WALLETS` array within the `constants.ts` file.
- Introduced `telegramIconUri` constant and its usage across the application.
- Updated `socialIcons` object and methods to handle new Telegram icon.
- Enhanced `WalletImage` components to recognize and display the Telegram icon.
- Included Telegram in OAuth login path determination within `oauthSignIn.ts`.
- Updated enumerations and type definitions to include Telegram.
- Modified `InAppNativeConnector` and `InAppWebConnector` to handle Telegram OAuth redirection.

## How to test?

1. Navigate to the authentication section in the application.
2. Check for the new 'Sign in with Telegram' option.
3. Attempt to sign in using a Telegram account and verify the successful login flow.

## Why make this change?

To expand the authentication options available to users, providing more flexibility and convenience. Telegram is a popular messaging app, and integrating it as an OAuth option can enhance user experience.

---

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to add `Telegram` as a supported authentication option across various parts of the application.

### Detailed summary
- Added `Telegram` as an authentication option in various files
- Included `TELEGRAM_ICON` in multiple components
- Updated social icons with `telegramIconUri`

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

<!-- end pr-codex -->
2024-08-05 19:49:16 +00:00
kien-ngo 9640b184ad Dashboard: Fix [Open IPFS folder] link (#3935)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to refactor the logic for getting the folder path from an IPFS hash URL in the `dropzone.tsx` component.

### Detailed summary
- Refactored logic to extract folder path from IPFS hash URL
- Updated return statement to use the extracted folder path for the IPFS URL

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

<!-- end pr-codex -->
2024-08-05 16:59:18 +00:00
kien-ngo a2e13820f2 Dashboard v5: Update dashboard [...paths].tsx to v5 (#3925)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to refactor contract detection logic and improve metadata handling.

### Detailed summary
- Removed `detectContractFeature` from `@thirdweb-dev/sdk`
- Added functions for detecting ERC20, ERC721, and ERC1155 extensions
- Improved contract metadata handling with `getContractMetadata` function

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

<!-- end pr-codex -->
2024-08-05 16:46:09 +00:00
jnsdls d0ea16e887 [Fix] Add 'Chainlist' link to header and update navigation structure (#3939)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to add a new `Chainlist` link in the header and a corresponding button in the app shell.

### Detailed summary
- Added `Chainlist` link in the header navigation.
- Included a `Chainlist` button in the app shell for quick access.
- Removed previous `Chainlist` link implementation.

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

<!-- end pr-codex -->
2024-08-05 16:41:37 +00:00
kien-ngo 1f3448e1ea Portal: Improve ts docs (#3937)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR enhances error handling and callback functionality in various components like `TransactionButton` and `CreateDirectListingButton`.

### Detailed summary
- Added guidance for error handling and callbacks in `TransactionButton`
- Updated comments in `CreateDirectListingButton`
- Improved error handling info in `ClaimButton`
- Added examples and instructions for handling errors and callbacks in components

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

<!-- end pr-codex -->
2024-08-05 06:27:14 +00:00
MananTank ad619a779c Use shadcn checkbox in deploy form (#3928)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to refactor and improve the UI components in the custom contract form.

### Detailed summary
- Added `CheckboxWithLabel` component with enhanced functionality.
- Refactored `Tooltip` to `ToolTipLabel` for better usability.
- Updated usage of components like `TrackedLinkTW` and `Spinner`.
- Improved layout and styling for better user experience.

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

<!-- end pr-codex -->
2024-08-04 18:55:17 +00:00
MananTank 09e89e5e6b Move FileInput from chakra to tailwind (#3926)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR updates various components to replace Chakra UI props with className for styling consistency.

### Detailed summary
- Replaced Chakra UI props with className for consistent styling in multiple components.
- Updated styling in `FileInput` component for better consistency and maintainability.
- Added new imports and removed unnecessary imports in `FileInput` component.

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

<!-- end pr-codex -->
2024-08-04 18:46:46 +00:00
jnsdls baefa5e9c7 [Chore] Uniform formatting in package.json and update fs imports (#3933) 2024-08-03 23:53:16 +00:00
kien-ngo 57e87528c8 chore: add a small test for numberToHex() (#3932)
Happened to write this quick test when debugging an issue

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to add a test for the `numberToHex` function in `hex.ts`.

### Detailed summary
- Added a test suite for `numberToHex` function in `hex.ts`
- Tested conversion of a number to a hexadecimal string with specified size and sign
- Asserted the correctness of the conversion result

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

<!-- end pr-codex -->
2024-08-03 23:39:39 +00:00
Jonas DanielsandGitHub 0b5dc2a137 [Fix] Validate and decode nextPath to ensure it is a relative path before redirecting (#3930) 2024-08-03 15:56:32 -07:00
jnsdls 0d23d5d6d5 [Fix] Exclude auth token from pay URLs when setting request headers (#3931)
This PR updates the fetch utility in the Thirdweb package to exclude the authorization token from being sent when the endpoint is related to the pay service. This ensures that requests to 'pay.' prefixed URLs are always made on behalf of the 'developer' rather than the 'end user.' It introduces a new function, isPayUrl, to determine if the URL belongs to the pay service.

---
2024-08-03 22:38:12 +00:00
kien-ngo 16376e56d7 Fix typo in docs (#3924)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR introduces information about using Ethers.js in version 5 of the thirdweb SDK.

### Detailed summary
- Added a section titled "Ethers.js in v5" in `page.mdx`
- Clarified that SDK v5 is compatible with Ethers.js v5 and v6

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

<!-- end pr-codex -->
2024-08-03 05:19:07 +00:00
kien-ngo 3f923e4469 Update to React migration docs (#3923)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on migrating React SDK v4 to v5. It includes changes in installation steps, interacting with contracts, and introducing an ethers.js adapter.

### Detailed summary
- Updated installation steps for React SDK v5
- Added new components for interacting with contracts
- Introduced an ethers.js adapter for compatibility with v5
- Updated sidebar links for migration guidance

> The following files were skipped due to too many changes: `apps/portal/src/app/react/v5/sidebar.tsx`

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

<!-- end pr-codex -->
2024-08-03 05:09:30 +00:00
kien-ngo c7a417e285 <Crusade> Claim NFT drop to v5 (#3910)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to optimize NFT claiming functionality in the dashboard.

### Detailed summary
- Refactored NFTClaimButton to use `contractAddress` and `chainId`
- Updated NFTClaimForm to use `contractAddress` and `chainId` instead of `contract`
- Improved error handling in NFTClaimForm
- Added transaction handling in NFTClaimForm

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

<!-- end pr-codex -->
2024-08-03 01:58:31 +00:00
gregfromstl a97d7636ba docs: add callouts for generating client ID across multiple guides (#3921)
### TL;DR

Added information callouts across various SDK documentation pages, prompting users to generate a client ID to access blockchain APIs, storage, and more.

### What changed?

1. Integrated `Link` and `Button` components from `next/link` and `@/components/ui/button` respectively.
2. Added `<Callout>` components with instructional text and links for generating client IDs.
3. Changed existing callout in TypeScript client page from 'Api Key' to 'Client ID'.

### How to test?

Check the following pages for the new callout additions:
- `/connect`
- `/react-native/v5`
- `/react/v5`
- `/typescript/v5`
- `/typescript/v5/client`

### Why make this change?

To guide users in generating a client ID, which is necessary to access various features offered by the SDK.

---

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to update references from "Api Key" to "Client ID" and add a `Link` and `Button` component for generating client IDs in various pages.

### Detailed summary
- Updated "Api Key" to "Client ID" in callouts
- Added `Link` and `Button` components for generating client IDs in multiple pages

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

<!-- end pr-codex -->
2024-08-03 01:55:02 +00:00
Jonas DanielsandGitHub 80e0957857 [Feature] Add portal build configuration to turbo.json and update changeset (#3922) 2024-08-02 18:11:35 -07:00
gregfromstl 14d3d18ad2 fix: portal dependencies (#3920)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on updating dependencies and adding webpack configuration.

### Detailed summary
- Skipped a test for executing zkcandy tx via SDK
- Updated `remark-gfm` version
- Added webpack configuration for external libraries
- Updated dependencies for linting and fixed scripts
- Updated various `mdast-util` packages
- Updated `micromark-extension` packages
- Updated `remark-gfm` version in multiple places

> The following files were skipped due to too many changes: `pnpm-lock.yaml`

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

<!-- end pr-codex -->
2024-08-03 00:38:06 +00:00
MananTank 079dc921d4 [dashboard] Enhance UI consistency across chain page components (#3919)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to update various UI components in the dashboard app for better styling consistency and functionality.

### Detailed summary
- Updated styling of `CopyTextButton`, `ExplorerSection`, `LiveStats`, and `ChainOverviewSection`.
- Replaced `CopyButton` import with `CopyTextButton`.
- Improved button and link styling for better user experience.

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

<!-- end pr-codex -->
2024-08-03 00:10:36 +00:00
kien-ngo c2e86c6828 <Crusade> Type-only migration! (#3909)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to update types and imports related to NFT metadata handling in various files.

### Detailed summary
- Updated types to use `NFTInput` instead of `NFTMetadataInput` for NFT metadata handling.
- Updated imports to use `NFTInput` from "thirdweb/utils" in multiple files.
- Adjusted function signatures and parameters accordingly for consistency and compatibility.

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

<!-- end pr-codex -->
2024-08-02 23:32:06 +00:00
gregfromstl 9d519c6590 chore: move the docs to the monorepo (#3915)
Adds the docs to the monorepo
2024-08-02 22:41:36 +00:00
kien-ngo d04b03226a <Crusade> Dashboard to v5: Marketplace v3 (#3907)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to add a `type` field to `DirectListing` and `EnglishAuction` types in the marketplace extensions.

### Detailed summary
- Added `type` field to `DirectListing` and `EnglishAuction` types
- Updated components to handle `type` field for pricing display
- Refactored contract role checks for Marketplace v3 compatibility

> The following files were skipped due to too many changes: `apps/dashboard/src/contract-ui/tabs/listings/components/list-form.tsx`

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

<!-- end pr-codex -->
2024-08-02 22:17:03 +00:00
MananTank c24dadaa60 Chain page tweaks (#3916)
<!-- start pr-codex -->

## PR-Codex overview
This PR updates various components and functions related to chain metadata and wallet connection logic.

### Detailed summary
- Improved conditional rendering for `ChainCTA` component
- Updated styles and behavior in `SidebarContent` and `MobileMenu`
- Added `useCustomConnectModal` hook for custom wallet connection modal
- Enhanced `AddChainToWallet` component with custom connect modal functionality

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

<!-- end pr-codex -->
2024-08-02 22:09:42 +00:00
gregfromstl 2c751b4fce test: adds msw (#3913)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to add `msw` for network call mocking, update dependencies, and enhance wallet integration tests.

### Detailed summary
- Added `msw` for network call mocking in tests
- Updated dependencies
- Improved wallet integration tests with new functions

> The following files were skipped due to too many changes: `pnpm-lock.yaml`

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

<!-- end pr-codex -->
2024-08-02 20:16:31 +00:00
Joe-Thirdweb e7f7ae8452 Chainlist default banner for PAID CHAINS (#3911)
## Problem solved

Short description of the bug fixed or feature added
Added a default banner and CTA image for every paying chain except lens.
Added an about section to every paying chain
Added a link to their website for every paying chain

##How to test
Visit the chain's chainlist page and view the images.
Click on their "learn More" butttons to be taken to their website.
Chains Added
- Lumia Mainnet
- Superposition Testnet
- Aleph 0 Mainnet
- b3 Mainnet
- Campnetwork v2 testnet
- Donatuz mainnet
- Fuse
- Gemuchain
- 0g labs testnet
- zkCandy
- zkSync

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to add metadata for different blockchains in the dashboard.

### Detailed summary
- Added metadata for Lumia Mainnet, Superposition Testnet, Aleph 0 Mainnet, B3 Mainnet, CampNetwork Testnet v2, Donatuz, Fuse, Gemuchain, 0G-Newton-Testnet, Plume, zkCandy, and zkSync
- Updated `utils.ts` with imports for new assets
- Updated chain metadata record with details for each blockchain

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

<!-- end pr-codex -->
2024-08-02 19:14:22 +00:00
9c292a4903 [dashboard] Chain page redesign (#3826)
Co-authored-by: Manan Tank <[email protected]>
2024-08-02 19:01:12 +00:00
jnsdls b06272c35d [Feature] Add Chainlist link and update header styles (#3899)
<!-- start pr-codex -->

## PR-Codex overview
The focus of this PR is to add a new link "Chainlist" to the dashboard header and update styles for better user experience.

### Detailed summary
- Added "Chainlist" link to the dashboard header
- Updated styles for the "Chainlist" link to match the design
- Adjusted styles for active links in the header for better visibility and consistency

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

<!-- end pr-codex -->
2024-08-02 17:44:14 +00:00
joaquim-verges 366646e354 chore(jsdocs): enhance JSDoc examples across multiple hooks and functions (#3908)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR introduces enhancements related to wallet interactions, contract calls, and event monitoring in the application.

### Detailed summary
- Added functionality to pre-authenticate users via email or phone number
- Enhanced wallet connection components with account abstraction and gas sponsorship options
- Updated wallet connection buttons to support account abstraction and gas sponsorship
- Improved wallet information retrieval with examples
- Expanded capabilities for fetching wallet balances for native and specific tokens
- Enhanced contract call preparation with examples of different method signatures and value options
- Improved contract event monitoring with event extensions and custom event watching
- Updated contract read hooks to automatically update on contract changes

> The following files were skipped due to too many changes: `packages/thirdweb/src/react/core/hooks/contract/useReadContract.ts`, `packages/thirdweb/src/transaction/actions/send-transaction.ts`, `packages/thirdweb/src/react/web/hooks/transaction/useSendTransaction.tsx`

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

<!-- end pr-codex -->
2024-08-02 03:17:02 +00:00
joaquim-verges 8eeec64388 fix(tests): update PayEmbed tests to use waitFor for render assertions (#3906)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to update test files in `PayEmbed-disconnected.test.tsx` and `PayEmbed.test.tsx` to use `waitFor` for asynchronous operations.

### Detailed summary
- Added `waitFor` for asynchronous operations in test files
- Updated test cases to handle asynchronous rendering and interactions

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

<!-- end pr-codex -->
2024-08-01 20:03:45 +00:00
Jonas DanielsGitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>GitHub Action
4dea4ba3c0 Version Packages (#3900)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: GitHub Action <[email protected]>
2024-08-02 08:02:39 +12:00
Jonas DanielsandGitHub a66071b2c2 [Fix] Correct integer check logic in middleware function (#3905) 2024-08-01 12:20:15 -07:00
gregfromstl 306f3da606 fix(thirdweb): resolve occasional iframe error during OAuth login (#3903)
### TL;DR
Fix occasional iframe error when logging in with oauth

### What changed?
Removed error throwing for invalid event type in OAuth login flow.

### How to test?
Attempt OAuth login and ensure no errors occur related to iframes.

### Why make this change?
To prevent unnecessary exceptions which impede the OAuth login user experience.

---
2024-08-01 18:56:12 +00:00
Manan TankandGitHub e6495c1541 Remove ja_JP locale set in playground for ConnectButton (#3904) 2024-08-02 06:23:16 +12:00
Joaquim VergesandGitHub 825ef239a0 fix(gas): handle gas free chains where baseFeePerGas is 0 (#3901) 2024-08-01 21:30:09 +12:00
joaquim-verges 13d9741f77 feat(localization): Add Korean and French locale support (#3895)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR adds Korean and French locales, updates wallet connection screens, and adds smart wallet content.

### Detailed summary
- Added Korean and French locales
- Updated wallet connection screens with new locales
- Added smart wallet content for Korean locale

> The following files were skipped due to too many changes: `packages/thirdweb/src/react/web/wallets/local/locale/kr.ts`, `packages/thirdweb/src/react/web/wallets/shared/locale/kr.ts`, `packages/thirdweb/src/react/web/wallets/local/locale/fr.ts`, `packages/thirdweb/src/react/web/wallets/local/locale/ja.ts`, `packages/thirdweb/src/react/web/wallets/shared/locale/ja.ts`, `packages/thirdweb/src/react/web/wallets/shared/locale/fr.ts`, `packages/thirdweb/src/react/web/ui/ConnectWallet/locale/kr.ts`, `packages/thirdweb/src/react/web/ui/ConnectWallet/locale/fr.ts`

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

<!-- end pr-codex -->
2024-08-01 08:07:23 +00:00
Jonas DanielsGitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
94f5ed601d Version Packages (#3898)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-07-31 23:24:25 -07:00
Jonas DanielsandGitHub 4463848671 [Fix] Remove 'create' command from key-requiring CLI commands (#3897) 2024-07-31 23:10:54 -07:00
gregandGitHub 3b49b18f4d fix(react): OTP validation in React Native Connect UI (#3896) 2024-07-31 23:10:43 -07:00
Joaquim VergesandGitHub 2e0ca0ecee feat(webGL): Update CB wallet v4 for webGL (#3893) 2024-08-01 13:25:05 +12:00
MananTank ff6a319caf Map generic inputs to prebuilt components for Modular Contract install params fiedsets (#3887)
<!-- start pr-codex -->

## PR-Codex overview
The focus of this PR is to update contract form components with improved form handling and modular extension support.

### Detailed summary
- Added `isBeta` prop to `ContractCard` and `publishedContractToShow` check
- Updated `PrimarySaleFieldset` and `RoyaltyFieldset` with improved form handling
- Enhanced modular extension support in `ModularContractDefaultExtensionsFieldset`

> The following files were skipped due to too many changes: `apps/dashboard/src/components/contract-components/contract-deploy-form/modular-contract-default-extensions-fieldset.tsx`

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

<!-- end pr-codex -->
2024-07-31 23:23:41 +00:00
MananTank 744c570ed1 [dashboard] Use dark default Theme for first time users (#3890)
<!-- start pr-codex -->

## PR-Codex overview
This PR introduces a new `defaultTheme` prop set to "dark" in the `_app.tsx` file.

### Detailed summary
- Added `defaultTheme` prop with value "dark" in the `_app.tsx` file.

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

<!-- end pr-codex -->
2024-07-31 22:08:51 +00:00
MananTank fff9550c8f [dashboard] Fix Spinner size in Add to wallet button in chain page (#3888)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to update the styling of the "Add to wallet" button in the `add-chain-to-wallet.tsx` component.

### Detailed summary
- Updated the `className` of the button to include `gap-2` for spacing
- Adjusted the Spinner size with the class `size-3`

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

<!-- end pr-codex -->
2024-07-31 19:16:32 +00:00
Jonas DanielsGitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>GitHub Action
f925451c15 Version Packages (#3874)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: GitHub Action <[email protected]>
2024-08-01 06:45:44 +12:00
gregfromstl fd30702ffd fix(thirdweb): mobile auth (#3886)
### TL;DR

Improved social authentication flexibility by adding support for an optional `redirectUrl` parameter and a new `mobile` mode.

### What changed?

- `getLoginPath.ts`: Added handling for `redirectUrl` and a new mode `mobile`.
- `native-auth.ts`: Updated social login to use `mobile` mode and include `redirectUrl`.
- `auth/middleware.ts`: Enhanced error handling for recovery codes by attempting fallback recovery code method.
- `native-connector.ts`: Fixed typo in console error message and ensured `redirectUrl` defaults correctly for native social logins.

### How to test?

1. Initiate a social login with the added `mobile` mode and verify if the `redirectUrl` functions correctly.
2. Trigger an error scenario in recovery code fetching and check that the fallback method is attempted and appropriate error is thrown if both fail.
3. Check the console for corrected error messages.

### Why make this change?

To increase the robustness and flexibility of social authentication by supporting mobile specific workflows and enhanced error resilience.

---

## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to enhance mobile authentication in the thirdweb application by updating redirect URLs and recovery code handling.

### Detailed summary
- Updated authentication mode to "mobile" instead of "popup"
- Added `redirectUrl` parameter for mobile authentication
- Improved error handling for recovery code retrieval
- Modified login path generation to support mobile authentication

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

<!-- end pr-codex -->
2024-07-31 16:44:08 +00:00
Joaquim VergesandGitHub 6cd279bc49 fix(ethers5adapter): correct transaction result nonces handling (#3885) 2024-07-31 22:19:28 +12:00
jnsdls 75cc5a6434 [Fix] Improve contract deploy logging and optimize Redis initialization (#3883)
<!-- start pr-codex -->

## PR-Codex overview
The focus of this PR is to refactor the Redis caching implementation by encapsulating the Redis instance creation and usage inside a function to avoid unnecessary calls during build.

### Detailed summary
- Encapsulated Redis instance creation and usage inside a function `getRedis()`
- Refactored cache functions to use `getRedis()` function for Redis instance access

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

<!-- end pr-codex -->
2024-07-30 22:07:21 +00:00
kien-ngo e7d6161819 Add prebuilt component: CreateDirectListingButton (#3881)
<!-- start pr-codex -->

## PR-Codex overview
This PR adds a `CreateDirectListingButton` component for the Marketplace v3, allowing users to create direct listings for NFTs.

### Detailed summary
- Added `CreateDirectListingButton` component
- Updated `getPayMetadata` function
- Added test file for `CreateDirectListingButton`
- Updated `CreateDirectListingButton` component implementation

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

<!-- end pr-codex -->
2024-07-30 21:51:19 +00:00
MananTank 4171f1536d Improved error messages when connection management hooks used outside ThirdwebProvider (#3882)
<!-- start pr-codex -->

## PR-Codex overview
This PR improves error messages for connection management hooks used outside `ThirdwebProvider`.

### Detailed summary
- Added `useConnectionManagerCtx` to provide specific error messages
- Updated hooks to use `useConnectionManagerCtx` instead of `useConnectionManager`

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

<!-- end pr-codex -->
2024-07-30 20:59:57 +00:00
MananTank 5eb495581d Fix autoconnect of wallets connected from "All wallets" screen (#3880)
FIXES: DASH-104

<!-- start pr-codex -->

## PR-Codex overview
This PR focuses on fixing the `useAutoConnectCore` function in `useAutoConnect.ts` to handle auto-connect for wallets from the "All wallets" screen.

### Detailed summary
- Fixed autoConnect for wallets from "All wallets" screen
- Added `createWallet` import
- Updated logic to handle lastActiveWalletId not found in availableWallets

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

<!-- end pr-codex -->
2024-07-30 17:37:45 +00:00
MananTank 36172a0476 [dash] Use the correct chain in Smart Account deposit native funds transaction (#3879)
<!-- start pr-codex -->

## PR-Codex overview
The focus of this PR is to update the DepositNative component to include the chain information for better functionality.

### Detailed summary
- Updated `DepositNative` component in `account/page.tsx` to include `chain` information
- Added `mapStoredChainTov5Chain` function to map chain data in `map-chains.tsx`
- Imported `mapStoredChainTov5Chain` in `NetworkSelectorButton.tsx` and `deposit-native.tsx`

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

<!-- end pr-codex -->
2024-07-30 16:56:06 +00:00
kien-ngo cee989d41d (crusade) Dashboard v5 (#3876)
<!-- start pr-codex -->

## PR-Codex overview
The focus of this PR is to refactor components in the contract UI tabs to use `contractAddress` and `chainId` instead of passing the entire `contract` object.

### Detailed summary
- Refactored `DirectListingsTable` and `EnglishAuctionsTable` components to accept `contractAddress` and `chainId`
- Updated `CancelDirectListing` and `CancelEnglishAuction` components to use `contractAddress` and `chainId`
- Modified `MarketplaceTable` components to receive `contractAddress` and `chainId` instead of `contract` object

> The following files were skipped due to too many changes: `apps/dashboard/src/contract-ui/tabs/claim-conditions/components/snapshot-upload.tsx`, `apps/dashboard/src/utils/tx-frame.ts`, `apps/dashboard/src/contract-ui/tabs/shared-components/listing-drawer.tsx`, `apps/dashboard/src/contract-ui/tabs/shared-components/cancel-tab.tsx`, `apps/dashboard/src/constants/currencies.ts`

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

<!-- end pr-codex -->
2024-07-30 16:42:41 +00:00
MananTank c55652f310 [dash] Fix wrong balance shown in Split contract (#3878)
<!-- start pr-codex -->

## PR-Codex overview
This PR updates the `nativeBalanceQuery` function in `page.tsx` to use the `contractAddress` instead of `address`.

### Detailed summary
- Updated `nativeBalanceQuery` to use `contractAddress` instead of `address`

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

<!-- end pr-codex -->
2024-07-30 16:29:19 +00:00
MananTank 9246ecb1e6 [dashboard] Add missing chakra color in theme (#3877)
<!-- start pr-codex -->

## PR-Codex overview
The focus of this PR is to update the `backgroundCardHighlight` theme property in `apps/dashboard/src/theme/index.ts`.

### Detailed summary
- Updated `backgroundCardHighlight` property values
- Removed unused theme properties like `backgroundBody`, `wordmark`, `heading`, etc.

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

<!-- end pr-codex -->
2024-07-30 16:22:39 +00:00
jnsdls 337c8c953e [Feature] Add German localization for ConnectWallet and related components (#3875)
<!-- start pr-codex -->

## PR-Codex overview
This PR adds German localization to the `thirdweb` package, including translations and locale updates for various wallet-related components.

### Detailed summary
- Added German localization to the `thirdweb` package
- Updated `LocaleId` type to include `"de_DE"`
- Added German translations for wallet connection screens and instructions
- Updated locale files for smart wallets, injected wallets, and shared wallets to include German translations

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

<!-- end pr-codex -->
2024-07-30 08:08:47 +00:00
IDubuque 7e21d93a77 add refund to substatus (#3856)
## Problem solved

- add refund status

## Changes made

- [ ] Public API changes: list the public API changes made if any
- [ ] Internal API changes: explain the internal logic changes

## How to test

- [ ] Automated tests: link to unit test file
- [ ] Manual tests: step by step instructions on how to test

## Contributor NFT

Paste in your wallet address below and we will airdrop you a special NFT when your pull request is merged.

```Address: ```

<!-- start pr-codex -->

---

## PR-Codex overview
This PR adds a new status "REFUNDED" to the `getStatus.ts` file and defines a new `SwapType` type with values "SAME_CHAIN" and "CROSS_CHAIN".

### Detailed summary
- Added status "REFUNDED" to possible statuses in `getStatus.ts`
- Defined new `SwapType` type with values "SAME_CHAIN" and "CROSS_CHAIN"

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

<!-- end pr-codex -->
2024-07-30 07:41:48 +00:00
jnsdls 97f7ad4d29 [Fix] Redirect CLI login to support page and remove CLI login route (#3872)
<!-- start pr-codex -->

## PR-Codex overview
The focus of this PR is to temporarily redirect the CLI login page to a support page to troubleshoot device linking issues.

### Detailed summary
- Added a temporary redirect for `/cli/login` to a support page for troubleshooting device linking issues.

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

<!-- end pr-codex -->
2024-07-30 06:54:39 +00:00
jnsdls f702cf7216 [Fix] Ensure -k flag is included for key-requiring thirdweb CLI commands (#3871)
FIXES: DASH-50

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to temporarily disable CLI login and provide guidance on using secret keys for specific commands.

### Detailed summary
- Temporarily disable CLI login functionality
- Provide guidance on passing secret keys for specific commands
- Check for missing -k flag in certain commands

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

<!-- end pr-codex -->
2024-07-30 06:42:40 +00:00
Jonas DanielsandGitHub 0797a56ba6 Update CODEOWNERS (#3873)
Signed-off-by: Jonas Daniels <[email protected]>
2024-07-29 23:41:51 -07:00
AmineAfia 76d35bd428 Add a status page to engine dashboard (#3848)
## Problem solved

Short description of the bug fixed or feature added

## Changes made

- [ ] Added status page to engine
![CleanShot 2024-07-29 at 00 34 13@2x](https://github.com/user-attachments/assets/68b79b2b-7256-4015-89c9-0cc84a361ee8)

- [ ] Internal API changes: explain the internal logic changes

## How to test

- [ ] Automated tests: link to unit test file
- [ ] Manual tests: step by step instructions on how to test: navigate to engine page and click on the statu snavigation in the left menu

## Contributor NFT

Paste in your wallet address below and we will airdrop you a special NFT when your pull request is merged.

```Address: ```

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to add system metrics functionality to the dashboard, including error rates and status codes.

### Detailed summary
- Added system metrics styling for charts
- Implemented system metrics components like `Healthcheck`, `ErrorRate`, and `StatusCodes`
- Updated `useEngineSystemHealth` hook with a polling interval parameter
- Updated UI components for better visualization of metrics

> The following files were skipped due to too many changes: `apps/dashboard/src/components/engine/system-metrics/components/StatusCodes.tsx`, `apps/dashboard/src/@/components/ui/chart.tsx`

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

<!-- end pr-codex -->
2024-07-30 06:19:09 +00:00
kien-ngo 24459b259b Update OG image for thirdweb.com/support (#3868)
## Problem solved

Short description of the bug fixed or feature added

## Changes made

- [ ] Public API changes: list the public API changes made if any
- [ ] Internal API changes: explain the internal logic changes

## How to test

- [ ] Automated tests: link to unit test file
- [ ] Manual tests: step by step instructions on how to test

## Contributor NFT

Paste in your wallet address below and we will airdrop you a special NFT when your pull request is merged.

```Address: ```

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to add metadata for Open Graph support in the dashboard page.

### Detailed summary
- Added `metadata` object with title and openGraph properties
- Imported `Metadata` type from "next"
- Updated the title for Open Graph support on the dashboard page

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

<!-- end pr-codex -->
2024-07-30 05:01:26 +00:00
Jonas DanielsGitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>GitHub Action
195064adf7 Version Packages (#3852)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: GitHub Action <[email protected]>
2024-07-30 14:24:25 +12:00
Joaquim VergesandGitHub bd44ce935e chore(thirdweb): better TSdocs + more exports (#3869) 2024-07-30 13:39:58 +12:00
gregfromstl 109575eba5 fix(react): update social button styling and behavior logic (#3867)
![Screenshot 2024-07-29 at 5.35.57 PM.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/G5kV6fAq4H1wu10SVop6/b85da5cc-045e-47b9-bde4-e85321c2d802.png)

![Screenshot 2024-07-29 at 4.33.04 PM.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/G5kV6fAq4H1wu10SVop6/36aa163a-2d6a-450f-879f-35a81078360a.png)

![Screenshot 2024-07-29 at 4.30.51 PM.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/G5kV6fAq4H1wu10SVop6/587c10c8-ccd3-4578-a609-83842a037894.png)

<!-- start pr-codex -->

---

## PR-Codex overview
This PR increases the minimum number of social logins displayed before switching to a different layout. It also adjusts the styling of the social login buttons.

### Detailed summary
- Increased minimum social logins displayed to 3
- Adjusted social login buttons layout based on the number of logins
- Updated styling for social login buttons to improve alignment and spacing

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

<!-- end pr-codex -->
2024-07-29 23:21:36 +00:00
kien-ngo e27ebef85b Prebuilt UI: BuyDirectListingButton for Marketplace v3 (#3847)
<!-- start pr-codex -->

## PR-Codex overview
This PR adds a new prebuilt component `BuyDirectListingButton` for Marketplace v3 in Thirdweb.

### Detailed summary
- Added `BuyDirectListingButton` component for buying NFTs from a listing
- Includes necessary logic for preparing and executing transactions
- Provides detailed documentation and testing for the component

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

<!-- end pr-codex -->
2024-07-29 22:39:16 +00:00
Manan TankandGitHub f31e21196a [dashboard] Fix faucet filter in chainlist page (#3859) 2024-07-29 22:37:50 +00:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
5f8c7976dc chore(deps): bump CodSpeedHQ/action from 2 to 3 (#3858)
Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-29 15:01:42 -07:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
07cc040391 chore(deps): bump tailwind-merge from 2.3.0 to 2.4.0 (#3862)
Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-29 15:00:52 -07:00
kien-ngo 91edae58a7 <Crusade> Dashboard to v5 (#3843)
<!-- start pr-codex -->

## PR-Codex overview
This PR exposes `multicall` and `encodeSafeTransferFrom` extensions, adds `RequiredParam` type, and updates NFT UI components.

### Detailed summary
- Exposed `multicall` and `encodeSafeTransferFrom` extensions
- Added `RequiredParam` type
- Updated NFT UI components with new features and improvements

> The following files were skipped due to too many changes: `apps/dashboard/src/contract-ui/tabs/nfts/components/transfer-tab.tsx`, `apps/dashboard/src/contract-ui/tabs/nfts/components/burn-tab.tsx`, `apps/dashboard/src/contract-ui/tabs/nfts/components/airdrop-tab.tsx`

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

<!-- end pr-codex -->
2024-07-29 21:38:25 +00:00
kien-ngo 7ec421f0e7 Add util function: convertParamValues (#3854)
## Problem solved

Short description of the bug fixed or feature added

## Changes made

- [ ] Public API changes: list the public API changes made if any
- [ ] Internal API changes: explain the internal logic changes

## How to test

- [ ] Automated tests: link to unit test file
- [ ] Manual tests: step by step instructions on how to test

## Contributor NFT

Paste in your wallet address below and we will airdrop you a special NFT when your pull request is merged.

```Address: ```

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to add a utility function `parseAbiParams` to convert parameter values based on type for Solidity smart contracts.

### Detailed summary
- Added `parseAbiParams` function to convert parameter values
- Added tests for `parseAbiParams` function
- Utility for ensuring correct parameter formatting

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

<!-- end pr-codex -->
2024-07-29 21:21:46 +00:00
gregfromstl d5e546726a feat(thirdweb): adds useChainMetadata hook to retrieve metadata for a chain (#3857)
### TL;DR

This PR adds a new hook, `useChainMetadata`, to the thirdweb library. The hook allows developers to retrieve metadata for a specific blockchain, such as name, icon, available faucets, and block explorers.

### What changed?

- Added `useChainMetadata` hook in `thirdweb/react`.
- Deprecated `useChainQuery` hook.
- Updated documentation to reflect the new hook.

### How to test?

1. Import the `useChainMetadata` from `thirdweb/react`.
2. Call the hook with a chain defined using `defineChain`.
3. Check the returned metadata for correctness.

### Why make this change?

This change provides a more intuitive and documented way to retrieve chain metadata, replacing the deprecated `useChainQuery` hook. It enhances developer experience by offering a straightforward API to access chain-related information.

---

<!-- start pr-codex -->

---

## PR-Codex overview
This PR adds a new hook `useChainMetadata` to retrieve chain metadata in Thirdweb React. It also updates the `useChainQuery` hook to `useChainMetadata`.

### Detailed summary
- Added `useChainMetadata` hook to retrieve chain metadata
- Updated `useChainQuery` to `useChainMetadata`
- Improved documentation for `useChainMetadata`

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

<!-- end pr-codex -->
2024-07-29 21:02:05 +00:00
gregfromstl e26d0705f7 fix: passkey, email, phone auth (#3860)
### TL;DR
Updated the in-app wallet authentication logic to correctly handle redirect strategies. The previous logic incorrectly threw an error when the strategy was within the list of supported social authentication options.

### What changed?
Modified the condition to check if the strategy is included in the socialAuthOptions and call `connector.authenticateWithRedirect` accordingly.

### How to test?
1. Set up an in-app wallet with a supported social authentication strategy.
2. Initiate the authentication process and verify that the redirection occurs without errors.

### Why make this change?
Ensures that supported social authentication methods that require redirection are handled correctly without causing errors.

---
2024-07-29 20:44:32 +00:00
Manan TankandGitHub 77b852af16 Fix contract card height in dashboard (#3853) 2024-07-29 15:58:22 +00:00
Manan TankandGitHub 9b043315bf Disable system option in next-theme provider (#3855) 2024-07-29 21:17:13 +05:30
kien-ngo cdb2970806 ClaimButton to handle approval for ERC20 (#3846)
## Problem solved

Short description of the bug fixed or feature added

## Changes made

- [ ] Public API changes: list the public API changes made if any
- [ ] Internal API changes: explain the internal logic changes

## How to test

- [ ] Automated tests: link to unit test file
- [ ] Manual tests: step by step instructions on how to test

## Contributor NFT

Paste in your wallet address below and we will airdrop you a special NFT when your pull request is merged.

```Address: ```

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to handle ERC20 approval for the ClaimButton component in the Thirdweb package.

### Detailed summary
- Added `getPayMetadata` function to handle custom Pay metadata
- Updated `ClaimButton` component to handle ERC20 approval
- Utilized hooks for contract interaction and transaction handling

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

<!-- end pr-codex -->
2024-07-29 11:50:27 +00:00
gregfromstl dcfc9363fa docs: jsdoc content improvements (#3851)
### TL;DR

This PR enhances the `createThirdwebClient` and `download` functions by adding detailed descriptions, examples, and additional parameters.

### What changed?

1. `createThirdwebClient` function now includes options for `clientId` and `secretKey`.
2. `download` function now supports multiple URI schemes (IPFS, Arweave, HTTP) and includes examples for each.
3. Added `requestTimeoutMs` parameter to `download` function.
4. Improved JSDoc comments and examples for both functions.

### How to test?

- Create a Thirdweb client using both client ID and secret key, and test its functionality.
- Test downloading files using IPFS, Arweave, and HTTP URIs with different timeout settings.

### Why make this change?

These changes enhance the flexibility and usability of the Thirdweb client and download functions by providing more detailed documentation and additional configurable parameters. This aims to improve developer experience and clarity.

---

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to enhance the Thirdweb SDK by adding the ability to create a client using a client ID or secret key and improving the file download functionality.

### Detailed summary
- Updated `createThirdwebClient` function to accept `clientId` and `secretKey`
- Added support for downloading files from IPFS, Arweave, or HTTP URIs in the `download` function
- Improved error handling and request timeout handling in the `download` function

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

<!-- end pr-codex -->
2024-07-29 05:00:49 +00:00
Jonas DanielsandGitHub 78651115d2 Update CODEOWNERS (#3850)
Signed-off-by: Jonas Daniels <[email protected]>
2024-07-28 18:52:18 -07:00
kien-ngo 7abe1b528f Update templates demo links (#3849)
## Problem solved

Short description of the bug fixed or feature added

## Changes made

- [ ] Public API changes: list the public API changes made if any
- [ ] Internal API changes: explain the internal logic changes

## How to test

- [ ] Automated tests: link to unit test file
- [ ] Manual tests: step by step instructions on how to test

## Contributor NFT

Paste in your wallet address below and we will airdrop you a special NFT when your pull request is merged.

```Address: ```

<!-- start pr-codex -->

---

## PR-Codex overview
This PR updates homepage URLs for the `Vite Starter` and `Next Starter` templates to include `https://`.

### Detailed summary
- Updated homepage URL for `Vite Starter` template
- Updated homepage URL for `Next Starter` template

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

<!-- end pr-codex -->
2024-07-29 00:34:52 +00:00
2e549837f7 Add @component toshow component on components section in docs (#3832)
Co-authored-by: Joaquim Verges <[email protected]>
2024-07-28 16:51:01 -07:00
Jonas DanielsGitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>GitHub Action
4f539ad8d4 Version Packages (#3837)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: GitHub Action <[email protected]>
2024-07-28 09:04:01 +12:00
gregfromstl b551b69291 feat(react): add tabs to view assets screen (#3845)
1. Renamed `ViewFunds` to `ViewAssets` throughout the codebase for better clarity.
2. Updated file names and corresponding imports to reflect this change.
3. Modified the styling of the tabs on the `TransactionsScreen`.
4. Updated the grid layout and spacing in the `ViewNFTs` component.
5. Streamlined token viewing logic by creating reusable content components for tokens and NFTs in `ViewAssets`, `ViewNFTs`, and `ViewTokens`.

---

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to restyle the View Assets Connect UI page and rename `ViewFunds` to `ViewAssets`.

### Detailed summary
- Restyled the View Assets Connect UI page
- Renamed `ViewFunds` component to `ViewAssets`
- Updated references and function names accordingly
- Added new components `ViewTokensContent` and `ViewNFTsContent`
- Updated UI layout and styling for better user experience

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

<!-- end pr-codex -->
2024-07-27 19:53:41 +00:00
gregfromstl 6901a41839 feat(react): adds tab icons to connect ui transactions page (#3844)
![Screenshot 2024-07-27 at 2.07.20 PM.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/G5kV6fAq4H1wu10SVop6/006213aa-0e02-4b06-a3ec-335bcbb91069.png)
![Screenshot 2024-07-27 at 2.07.25 PM.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/G5kV6fAq4H1wu10SVop6/acc841ae-cd8d-4e02-942c-4872aa2b4c2c.png)

### TL;DR
Improved the TransactionsScreen UI in the thirdweb package by adding new icons for better visualization and adjusted some layout styles for uniformity.

### What changed?
- Added CoinsIcon and FundsIcon for better tab representation in TransactionsScreen.tsx.
- Updated Tabs component to support labels with React nodes.
- Implemented padding and minHeight adjustments in BuyTxHistory and WalletTransactionHistory components.
- Conditionally rendered transaction history buttons only when transactions are available.

### How to test?
1. Navigate to the TransactionsScreen in the thirdweb package.
2. Verify that the tabs now display icons alongside text labels.
3. Check the layout adjustments in the transaction history components for proper spacing and padding.

### Why make this change?
To enhance the user experience by improving the visual representation of tabs and ensuring consistency in the layout of transaction history components.

---
2024-07-27 19:24:47 +00:00
kien-ngo d775333b40 Expose ERC20 extension: getApprovalForTransaction (#3831)
## Problem solved

Short description of the bug fixed or feature added

## Changes made

- [ ] Public API changes: list the public API changes made if any
- [ ] Internal API changes: explain the internal logic changes

## How to test

- [ ] Automated tests: link to unit test file
- [ ] Manual tests: step by step instructions on how to test

## Contributor NFT

Paste in your wallet address below and we will airdrop you a special NFT when your pull request is merged.

```Address: ```

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to expose a new ERC20 extension function `getApprovalForTransaction` for handling ERC20 token approvals.

### Detailed summary
- Exposed `getApprovalForTransaction` in `erc20.ts`
- Added `getApprovalForTransaction` function in `getApprovalForTransaction.ts`
- Defined `GetApprovalForTransactionParams` interface in `getApprovalForTransaction.ts`
- Provided detailed documentation and example usage for `getApprovalForTransaction`

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

<!-- end pr-codex -->
2024-07-27 18:44:11 +00:00
gregfromstl b0a303d5ef feat: farcaster login (#3827)
### TL;DR

Added Farcaster icon and login support to the thirdweb package.

### What changed?

- Added Farcaster icon to `socialIcons.ts` and `svgs.ts`
- Updated `WalletImage.tsx` to include Farcaster icon.
- Added Farcaster as a supported social login option throughout the codebase.

### How to test?

1. Ensure the Farcaster icon is rendered correctly by using the Farcaster login option.
2. Verify the Farcaster login flow works as expected on both web and native applications.

### Why make this change?

This update adds support for Farcaster as a social login option, enhancing the flexibility and options available to users for authentication.

---

<!-- start pr-codex -->

---

## PR-Codex overview
This PR adds support for the "Farcaster" authentication option in various parts of the application.

### Detailed summary
- Added "Farcaster" as an authentication option
- Updated login and connection flows to include "Farcaster"
- Introduced Farcaster icons for web and native UI components
- Enhanced social auth login paths to support Farcaster

> The following files were skipped due to too many changes: `packages/thirdweb/src/react/core/utils/socialIcons.ts`

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

<!-- end pr-codex -->
2024-07-27 06:24:10 +00:00
MananTank 95d90ea344 Explore page UI tweaks (#3840)
<!-- start pr-codex -->

## PR-Codex overview
The focus of this PR is to update UI components and improve code readability in the dashboard explore feature.

### Detailed summary
- Updated UI components in `ContractCard` and `PublishUpsellCard`
- Simplified `showSkeleton` logic in `ContractCard`
- Replaced `ChakraNextImage` with `Image` and `Button` components
- Reorganized JSX structure for better readability

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

<!-- end pr-codex -->
2024-07-27 03:48:11 +00:00
jnsdls 0da9703284 [Refactor] Remove unused TimeRangeSwitcher component (#3839) 2024-07-27 01:17:30 +00:00
MananTank 22f7a5ddb3 Update Explorer page layout to tailwind, add Modular contracts (#3836)
<!-- start pr-codex -->

## PR-Codex overview
The focus of this PR is to enhance the UI/UX of the dashboard explore section and components.

### Detailed summary
- Updated styling and layout for Explore page components
- Added `TrackedLinkTW` component for analytics tracking
- Introduced `isBeta` flag for contracts
- Improved UI consistency and accessibility across components

> The following files were skipped due to too many changes: `apps/dashboard/src/components/explore/upsells/deploy-your-own.tsx`, `apps/dashboard/src/components/explore/contract-card/index.tsx`

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

<!-- end pr-codex -->
2024-07-27 01:11:56 +00:00
Manan TankandGitHub 7cb39cdd2a Fix flash of dark theme when loading dashboard in light mode + replace useColorMode with useTheme (#3838) 2024-07-27 00:32:47 +00:00
Manan TankandGitHub b128530355 Move connection manager creation to context instead of global singleton (#3817) 2024-07-26 23:13:22 +00:00
kumaryash90 dd3ae00279 Refresh button for contract metadata (#3834)
<!-- start pr-codex -->

## PR-Codex overview
The focus of this PR is to add a feature for refreshing contract metadata in the Contract Sources page.

### Detailed summary
- Added `RefreshContractMetadataButton` component for refreshing contract metadata
- Imported `useMutation` and `useQueryClient` from `@tanstack/react-query`
- Imported `toast` from `sonner`
- Updated `VerifyContractParams` type to `ContractParams`
- Modified function parameters in `verifyContract`
- Updated conditional check in `ContractSourcesPage`
- Added logic to handle refreshing contract metadata and invalidating queries

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

<!-- end pr-codex -->
2024-07-26 21:20:28 +00:00
jnsdls 676411898b [Feature] Add support for Webhooks in Pay UI component (#3810)
CLOSES: DASH-88, DASH-87, DASH-85, DASH-86

<!-- start pr-codex -->

---

## PR-Codex overview
This PR enhances the Pay UI in the dashboard by adding a new "Webhooks" tab with functionality to create, view, and delete webhooks.

### Detailed summary
- Added a new `WebhooksPage` component
- Integrated webhooks functionality with API calls
- Implemented create and delete webhook features with dialogs
- Updated UI components for webhooks management

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

<!-- end pr-codex -->
2024-07-26 21:06:34 +00:00
jnsdls 169b02020d [Fix] Update AppFooter layout: streamline class names and enhance social media links (#3833)
Refactored the AppFooter component in the dashboard app to simplify the DOM structure, clean up redundant class names and properties, and group social media icons more effectively. Adjusted the layout to use container and grid classes for better organization.

---
2024-07-26 19:42:02 +00:00
kien-ngo 794282533c Add Vanar CTA text (#3828)
## Problem solved

Short description of the bug fixed or feature added

## Changes made

- [ ] Public API changes: list the public API changes made if any
- [ ] Internal API changes: explain the internal logic changes

## How to test

- [ ] Automated tests: link to unit test file
- [ ] Manual tests: step by step instructions on how to test

## Contributor NFT

Paste in your wallet address below and we will airdrop you a special NFT when your pull request is merged.

```Address: ```

<!-- start pr-codex -->

---

## PR-Codex overview
This PR updates the `title` property in the `ChainMetadata` object in `utils.ts`.

### Detailed summary
- Updated the `title` property value in the `ChainMetadata` object to "Fully EVM compatible L1 for Entertainment".

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

<!-- end pr-codex -->
2024-07-26 16:05:31 +00:00
MananTank ebfcbd7051 Fix various UI issues/improvements in dashboard (#3829)
* Improved Dialog styles on mobile
* Use the correct color in form error message
* Fix z-index issue with footer
* Fix z-index issue with tab underline
* Fix padding for various other elements

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to update styles and components in the dashboard layout.

### Detailed summary
- Added padding to a container in `layout.tsx`
- Updated form layout in `create-ticket.client.tsx`
- Adjusted styling in `sidebar.client.tsx`
- Enhanced uninstall dialog in `InstalledExtensionsTable.tsx`
- Modified classnames in `form.tsx`
- Revised dialog styles in `dialog.tsx`
- Refactored layout structure in `index.tsx`

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

<!-- end pr-codex -->
2024-07-26 15:12:22 +00:00
Jonas DanielsGitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>GitHub Action
9eea6e17ab Version Packages (#3819)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: GitHub Action <[email protected]>
2024-07-26 21:20:50 +12:00
jnsdls 74714ccf31 [Feature] Add AppFooter component and integrate it across the app (#3825)
- New `AppFooter` component added in `app-footer.tsx` under `components/blocks`.
- Replaced `DashboardFooter` with `AppFooter` in `dashboard/layout.tsx`.
- Deleted old `DashboardFooter` implementation.
- Updated social icons and layout in the footer.
- Adjusted `DashboardHeader` styles for consistency.

---

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to update the footer component and layout in the dashboard app.

### Detailed summary
- Changed `DashboardFooter` to `AppFooter` in `DashboardLayout`
- Updated styles and content in `AppFooter`
- Removed `MobileBurgerMenu` import
- Updated button variant in `MobileBurgerMenu`
- Updated header layout in `DashboardHeader`

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

<!-- end pr-codex -->
2024-07-26 08:03:19 +00:00
4a4a0612ed feat(pay): Add metadata support for purchase flows (#3750)
Co-authored-by: Manan Tank <[email protected]>
2024-07-26 20:00:51 +12:00
MananTank c7f8bea4bc Move faucet inside chain page layout + UI tweaks (#3824)
<!-- start pr-codex -->

## PR-Codex overview
The focus of this PR is to refactor the `faucet` page in the dashboard for a specific chain.

### Detailed summary
- Moved `getChain` import to a different path
- Reorganized `InfoCard` and added new headings with styling
- Updated `SpinWheel` component with `Skeleton` import and conditional rendering

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

<!-- end pr-codex -->
2024-07-26 00:09:33 +00:00
gregfromstl 3848327373 feat(thirdweb): adds redirect oauth (#3822)
### TL;DR

Added support for OAuth redirects in the In-App wallet authentication flow.

### What changed?

1. Introduced `auth.mode` with options `

---

<!-- start pr-codex -->

---

## PR-Codex overview
This PR introduces the ability to open OAuth windows as a redirect, beneficial for embedded applications like Telegram web apps.

### Detailed summary
- Added `mode: "redirect"` option for OAuth windows
- Implemented functions for OAuth redirection
- Updated authentication options for in-app wallets

> The following files were skipped due to too many changes: `packages/thirdweb/src/react/core/hooks/wallets/useAutoConnect.ts`, `packages/thirdweb/src/wallets/in-app/web/lib/web-connector.ts`

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

<!-- end pr-codex -->
2024-07-25 23:33:31 +00:00
FirekeeperandGitHub bff7a0af6f Unity 4.17.0 (#3812) 2024-07-25 14:49:19 -07:00
Manan TankandGitHub d25a169d47 Fix Modular contracts encodeAbi error when deploying (#3823) 2024-07-26 02:53:05 +05:30
YashandGitHub 9e0dd0194b Fix transaction count for modular deployments (#3820) 2024-07-26 01:29:37 +05:30
Manan TankandGitHub 3ffd555e15 Move /trending page inside dashboard layout (#3816) 2024-07-25 18:47:56 +00:00
Manan TankandGitHub 87dc9a5f90 Allow selecting non-connected wallet on sign-in screen in ConnectEmbed (#3815) 2024-07-25 18:26:53 +00:00
kien-ngo 6081ac7b18 chore: Remove more v4 code from Dashboard (#3813)
## Problem solved

Short description of the bug fixed or feature added

## Changes made

- [ ] Public API changes: list the public API changes made if any
- [ ] Internal API changes: explain the internal logic changes

## How to test

- [ ] Automated tests: link to unit test file
- [ ] Manual tests: step by step instructions on how to test

## Contributor NFT

Paste in your wallet address below and we will airdrop you a special NFT when your pull request is merged.

```Address: ```

<!-- start pr-codex -->

---

## PR-Codex overview
This PR exposes new types `NFTInput` and `NFTMetadata`, updates type imports, and adds `SUPPORTED_CHAIN_ID` type.

### Detailed summary
- Exposed types: `NFTInput` and `NFTMetadata`
- Updated type imports in various files
- Added `SUPPORTED_CHAIN_ID` type definition

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

<!-- end pr-codex -->
2024-07-25 17:31:36 +00:00
kien-ngo 80379a22e3 Give Dashboard > Marketplace section some luv (#3811)
Use this preview link to test:
https://thirdweb.com/avalanche-fuji/0x8C1D464B385A2B7EAa80dcAAD66DD8BC0256e717/direct-listings

<!-- start pr-codex -->

## PR-Codex overview
The focus of this PR is to enhance the listing details display in the dashboard UI.

### Detailed summary
- Added `Listing ID` and `Type` display sections
- Improved `Status` section with additional text for clarity
- Included `Price` section with currency value and symbol
- Commented out a TODO for adding a Buy button in the future

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

<!-- end pr-codex -->
2024-07-25 16:42:10 +00:00
kien-ngo 97a8405d4e Update Vanar page (thirdweb.com/vanar) (#3814)
Note: We are still waiting for the CTA text from them

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to add support for the VANAR blockchain in the dashboard.

### Detailed summary
- Added support for VANAR blockchain in `utils.ts`
- Imported `vanarBanner` and `vanarCTABG` images
- Defined metadata for VANAR blockchain in `chainMetaRecord`

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

<!-- end pr-codex -->
2024-07-25 16:37:02 +00:00
jnsdls 26c7cf17d1 [Refactor] Remove radix toast dependencies and related components (#3808)
### TL;DR

This PR refactors the dashboard application by removing the custom toast component and its dependencies, and migrating to the 'sonner' library for toasts. Key changes include the deletion of toast-related components and utilities, adjustments to the `ExportToCSVButton` component to use 'sonner' for toast notifications, and the streamlining of `package.json` and `pnpm-lock.yaml` files.

### What changed?

- Removed custom toast components (`toast.tsx`, `toaster.tsx`, `use-toast.ts`).
- Updated `ExportToCSVButton.tsx` to use 'sonner' for toast notifications.
- Removed `@radix-ui/react-toast` dependency from `package.json` and `pnpm-lock.yaml`.
- Cleaned up `package.json` and `pnpm-lock.yaml` by removing the old toast dependencies.

### How to test?

1. Export a CSV in the dashboard and confirm that toast notifications appear correctly.
2. Check the application for any missing toast notifications that might indicate issues with the migration.

### Why make this change?

The custom toast implementation was redundant with the introduction of the 'sonner' library, which provides a more efficient and streamlined approach to toast notifications. This migration simplifies the codebase and reduces dependencies.

---
2024-07-25 05:34:06 +00:00
jnsdls df4e58b754 [Fix] Remove redundant z-index values in dialog and toast components (#3807) 2024-07-25 05:02:12 +00:00
GWSzeto d6bbca576b Explorer page to show transaction information (#3674)
- ETH RPC calls to block, transaction and receipt
- TODO: tooltips (copy from blockscout), replace in ENS names where appropriate, decode input data, detect whether it's a transfer or contract interaction, event logs page

### What it looks like
<img width="1055" alt="Screenshot 2024-07-12 at 11 00 23 AM" src="https://github.com/user-attachments/assets/182f392a-1f2a-4323-ab55-706374060b4a">

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on restructuring file paths and importing components for better organization in the dashboard chain pages.

### Detailed summary
- Moved components to `(chainPage)` directory for clarity
- Updated import paths for components in various files
- Refactored file paths for consistency and organization

> The following files were skipped due to too many changes: `apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/tx/[txHash]/page.tsx`

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

<!-- end pr-codex -->
2024-07-25 04:49:46 +00:00
Jonas DanielsGitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
79e34e1f81 Version Packages (#3794)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-07-24 21:46:52 -07:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
284cfdf95c chore(deps): bump typedoc from 0.25.13 to 0.26.5 (#3780)
Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-24 21:26:56 -07:00
83517fbe08 chore(deps-dev): bump @testing-library/jest-dom from 6.4.6 to 6.4.7 (#3778)
Co-authored-by: dependabot <[email protected]>
2024-07-24 21:26:28 -07:00
9cc9f05f68 fix: bun detect (#3791)
Co-authored-by: Joaquim Verges <[email protected]>
Co-authored-by: Jonas Daniels <[email protected]>
2024-07-24 21:26:08 -07:00
dependabot 25b07c4ee7 chore(deps): bump next from 14.2.4 to 14.2.5 (#3776)
Bumps [next](https://github.com/vercel/next.js) from 14.2.4 to 14.2.5.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/vercel/next.js/releases">next's releases</a>.</em></p>
<blockquote>
<h2>v14.2.5</h2>
<blockquote>
<p>[!NOTE]<br />
This release is backporting bug fixes. It does <strong>not</strong> include all pending features/changes on canary.</p>
</blockquote>
<h3>Core Changes</h3>
<ul>
<li>avoid merging global css in a way that leaks into other chunk groups (<a href="https://redirect.github.com/vercel/next.js/issues/67373">#67373</a>)</li>
<li>Fix server action edge redirect with middleware rewrite (<a href="https://redirect.github.com/vercel/next.js/issues/67148">#67148</a>)</li>
<li>fix(next): reject protocol-relative URLs in image optimization (<a href="https://redirect.github.com/vercel/next.js/issues/65752">#65752</a>)</li>
<li>fix(next-swc): correct path interop to filepath for wasm (<a href="https://redirect.github.com/vercel/next.js/issues/65633">#65633</a>)</li>
<li>Use addDependency to track metadata route file changes (<a href="https://redirect.github.com/vercel/next.js/issues/66714">#66714</a>)</li>
<li>Fix noindex is missing on static not-found page (<a href="https://redirect.github.com/vercel/next.js/issues/67135">#67135</a>)</li>
<li>perf: improve retrieving versionInfo on Turbo HMR (<a href="https://redirect.github.com/vercel/next.js/issues/67309">#67309</a>)</li>
<li>fix(next/image): handle invalid url (<a href="https://redirect.github.com/vercel/next.js/issues/67465">#67465</a>)</li>
<li>fix(next): initial prefetch cache not set properly with different search params (<a href="https://redirect.github.com/vercel/next.js/issues/65977">#65977</a>)</li>
<li>fix: Backport class properties fix (<a href="https://redirect.github.com/vercel/next.js/issues/67377">#67377</a>)</li>
<li>Upgrade acorn (<a href="https://redirect.github.com/vercel/next.js/issues/67592">#67592</a>)</li>
</ul>
<h3>Misc</h3>
<ul>
<li>Log stdio for pull-turbo-cache script (<a href="https://redirect.github.com/vercel/next.js/issues/66759">#66759</a>)</li>
<li>Ensure turbo is setup when building in docker (<a href="https://redirect.github.com/vercel/next.js/issues/66804">#66804</a>)</li>
</ul>
<h3>Credits</h3>
<p>Huge thanks to <a href="https://github.com/devjiwonchoi"><code>@​devjiwonchoi</code></a>, <a href="https://github.com/ijjk"><code>@​ijjk</code></a>, <a href="https://github.com/emmerich"><code>@​emmerich</code></a>, <a href="https://github.com/huozhi"><code>@​huozhi</code></a>,  <a href="https://github.com/kdy1"><code>@​kdy1</code></a>, <a href="https://github.com/kwonoj"><code>@​kwonoj</code></a>, <a href="https://github.com/styfle"><code>@​styfle</code></a>, and <a href="https://github.com/sokra"><code>@​sokra</code></a> for helping!</p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/vercel/next.js/commit/0bf7f52db8b2c1e0b13d332de105fab645240e1e"><code>0bf7f52</code></a> v14.2.5</li>
<li><a href="https://github.com/vercel/next.js/commit/30d6dfc8bb97dfa674033c27e5c6a09d6d8e11f0"><code>30d6dfc</code></a> fix: metadata route merging conflicts</li>
<li><a href="https://github.com/vercel/next.js/commit/186ec6b58b0e6cd74a00f72c3bf2d7e1fe1941aa"><code>186ec6b</code></a> Log stdio for pull-turbo-cache script (<a href="https://redirect.github.com/vercel/next.js/issues/66759">#66759</a>)</li>
<li><a href="https://github.com/vercel/next.js/commit/45656d3323d164cf3917a8d6ea21b1a4f34a9844"><code>45656d3</code></a> Ensure turbo is setup when building in docker (<a href="https://redirect.github.com/vercel/next.js/issues/66804">#66804</a>)</li>
<li><a href="https://github.com/vercel/next.js/commit/08e7fd1f010077b13e29a59ce0a5edc50e4886ec"><code>08e7fd1</code></a> Upgrade acorn (<a href="https://redirect.github.com/vercel/next.js/issues/67592">#67592</a>)</li>
<li><a href="https://github.com/vercel/next.js/commit/1d08dab887a349ebd010e99201fd64000d030066"><code>1d08dab</code></a> avoid merging global css in a way that leaks into other chunk groups (<a href="https://redirect.github.com/vercel/next.js/issues/67373">#67373</a>)</li>
<li><a href="https://github.com/vercel/next.js/commit/21a9d591412e2dd0473808216c8edce854d27d88"><code>21a9d59</code></a> Fix server action edge redirect with middleware rewrite (<a href="https://redirect.github.com/vercel/next.js/issues/67148">#67148</a>)</li>
<li><a href="https://github.com/vercel/next.js/commit/1b10b13a7486d223df87d82e93b75eac2e8ed65a"><code>1b10b13</code></a> fix(next): reject protocol-relative URLs in image optimization (<a href="https://redirect.github.com/vercel/next.js/issues/65752">#65752</a>)</li>
<li><a href="https://github.com/vercel/next.js/commit/c64c61d8a8c06d4c6f8d8c773a662c12ac20635e"><code>c64c61d</code></a> fix(next-swc): correct path interop to filepath for wasm (<a href="https://redirect.github.com/vercel/next.js/issues/65633">#65633</a>)</li>
<li><a href="https://github.com/vercel/next.js/commit/6c661d2ce5126de18abb8f6326e79725dbd5493c"><code>6c661d2</code></a> Use addDependency to track metadata route file changes (<a href="https://redirect.github.com/vercel/next.js/issues/66714">#66714</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/vercel/next.js/compare/v14.2.4...v14.2.5">compare view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=next&package-manager=npm_and_yarn&previous-version=14.2.4&new-version=14.2.5)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

</details>

<!-- start pr-codex -->

---

## PR-Codex overview
This PR updates the Next.js version to 14.2.5 in multiple packages and dependencies.

### Detailed summary
- Updated Next.js version to 14.2.5 in `wallet-ui`, `playground-web`, `dashboard`
- Updated `next-auth` to version 4.24.7
- Updated `typescript` to version 5.5.2

> The following files were skipped due to too many changes: `pnpm-lock.yaml`

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

<!-- end pr-codex -->
2024-07-25 03:34:07 +00:00
Joaquim VergesandGitHub b27c842f26 chore(claim-button): add ClaimButton component changeset (#3806) 2024-07-25 15:14:47 +12:00
dependabot 10c292d7bd chore(deps): bump viem from 2.16.5 to 2.17.10 (#3783)
Bumps [viem](https://github.com/wevm/viem) from 2.16.5 to 2.17.10.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/wevm/viem/releases">viem's releases</a>.</em></p>
<blockquote>
<h2>[email protected]</h2>
<h3>Patch Changes</h3>
<ul>
<li>
<p><a href="https://redirect.github.com/wevm/viem/pull/2513">#2513</a> <a href="https://github.com/wevm/viem/commit/3af06fe23dda1f44d43b3d3cec5d985894c2840a"><code>3af06fe</code></a> Thanks <a href="https://github.com/hoangtan282"><code>@​hoangtan282</code></a>! - Added Funki Mainnet.</p>
</li>
<li>
<p><a href="https://redirect.github.com/wevm/viem/pull/2519">#2519</a> <a href="https://github.com/wevm/viem/commit/01cdac14d508fbae50a31492e244b7adbe858bab"><code>01cdac1</code></a> Thanks <a href="https://github.com/cbfyi"><code>@​cbfyi</code></a>! - Added dispute game factory address for Base Sepolia.</p>
</li>
<li>
<p><a href="https://redirect.github.com/wevm/viem/pull/2515">#2515</a> <a href="https://github.com/wevm/viem/commit/b7e4fa518b1798741cf029f34ed3154695ab3a16"><code>b7e4fa5</code></a> Thanks <a href="https://github.com/JoeyKhd"><code>@​JoeyKhd</code></a>! - Added Root Network chain.</p>
</li>
</ul>
<h2>[email protected].9</h2>
<h3>Patch Changes</h3>
<ul>
<li><a href="https://github.com/wevm/viem/commit/b71e656e08dadc44e2c1eccb5f505f70ce4d3aaf"><code>b71e656e</code></a> Thanks <a href="https://github.com/jxom"><code>@​jxom</code></a>! - Exported types required for inference.</li>
</ul>
<h2>[email protected].8</h2>
<h3>Patch Changes</h3>
<ul>
<li><a href="https://github.com/wevm/viem/commit/690cb9a78a801edf7ea3ab1d8cf1a0cd794fc32a"><code>690cb9a7</code></a> Thanks <a href="https://github.com/jxom"><code>@​jxom</code></a>! - Exported types required for inference.</li>
</ul>
<h2>[email protected].7</h2>
<h3>Patch Changes</h3>
<ul>
<li>
<p><a href="https://github.com/wevm/viem/commit/7d3d505221d4bb2ccc002be1cddc9e2011e33c01"><code>7d3d505</code></a> Thanks <a href="https://github.com/jxom"><code>@​jxom</code></a>! - Allow override of <code>Content-Type</code> header on <code>http</code> transport.</p>
</li>
<li>
<p><a href="https://github.com/wevm/viem/commit/aa42f47fe8b5ce19858e5855ecdceae7000dbb92"><code>aa42f47</code></a> Thanks <a href="https://github.com/jxom"><code>@​jxom</code></a>! - Updated Darwinia chain explorer URL.</p>
</li>
<li>
<p><a href="https://github.com/wevm/viem/commit/759e34dde23ca50275d9e4df38805e8f0b285753"><code>759e34d</code></a> Thanks <a href="https://github.com/jxom"><code>@​jxom</code></a>! - Enforced <code>r</code> and <code>s</code> hex values on <code>Signature</code> to be always padded to 32 bytes.</p>
</li>
</ul>
<h2>[email protected].5</h2>
<h3>Patch Changes</h3>
<ul>
<li><a href="https://redirect.github.com/wevm/viem/pull/2500">#2500</a> <a href="https://github.com/wevm/viem/commit/f6d60054bdcf8ada44c8af46b66eda50b05dd08b"><code>f6d60054</code></a> Thanks <a href="https://github.com/lucadonnoh"><code>@​lucadonnoh</code></a>! - Added OP Stack contract addresses for Mode Testnet chain.</li>
</ul>
<h2>[email protected].4</h2>
<h3>Patch Changes</h3>
<ul>
<li><a href="https://redirect.github.com/wevm/viem/pull/2493">#2493</a> <a href="https://github.com/wevm/viem/commit/ef3601d1db04e41c993943c0cfc72d3a64bbb6db"><code>ef3601d</code></a> Thanks <a href="https://github.com/billalxcode"><code>@​billalxcode</code></a>! - Added DreyerX Testnet chain</li>
</ul>
<h2>[email protected].3</h2>
<h3>Patch Changes</h3>
<ul>
<li><a href="https://github.com/wevm/viem/commit/ec3b0e08f0a379249224e65092277191f1a8502b"><code>ec3b0e0</code></a> Thanks <a href="https://github.com/jxom"><code>@​jxom</code></a>! - Added fallback verification in <code>verifyHash</code>.</li>
</ul>
<h2>[email protected].2</h2>
<h3>Patch Changes</h3>
<ul>
<li>
<p><a href="https://redirect.github.com/wevm/viem/pull/2479">#2479</a> <a href="https://github.com/wevm/viem/commit/5028b3fb723100e49ca9b301405360b23c2a1003"><code>5028b3f</code></a> Thanks <a href="https://github.com/keyding"><code>@​keyding</code></a>! - Added Artela Testnet chain.</p>
</li>
<li>
<p><a href="https://redirect.github.com/wevm/viem/pull/2478">#2478</a> <a href="https://github.com/wevm/viem/commit/795ca46cf93bc496abb23a5b868ea48bd80860ae"><code>795ca46</code></a> Thanks <a href="https://github.com/sj719045032"><code>@​sj719045032</code></a>! - Added zkLink Nova Sepolia Testnet chain.</p>
</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/wevm/viem/commit/8e3c9ec058885ac94f5b3a3d8f38eee201130ab5"><code>8e3c9ec</code></a> chore: bump size</li>
<li><a href="https://github.com/wevm/viem/commit/892d62fd17d14e60cfcb36caa671516caee990c4"><code>892d62f</code></a> chore: version package (<a href="https://redirect.github.com/wevm/viem/issues/2520">#2520</a>)</li>
<li><a href="https://github.com/wevm/viem/commit/01cdac14d508fbae50a31492e244b7adbe858bab"><code>01cdac1</code></a> feat: add dispute game factory address for Base Sepolia (<a href="https://redirect.github.com/wevm/viem/issues/2519">#2519</a>)</li>
<li><a href="https://github.com/wevm/viem/commit/7e17bb1b7413cb9d9f406c6d274511a6c8b7eef4"><code>7e17bb1</code></a> chore: up solady test</li>
<li><a href="https://github.com/wevm/viem/commit/b7e4fa518b1798741cf029f34ed3154695ab3a16"><code>b7e4fa5</code></a> feat: add root and root poricini (<a href="https://redirect.github.com/wevm/viem/issues/2515">#2515</a>)</li>
<li><a href="https://github.com/wevm/viem/commit/c3fac1be047cac22b3e0e1bd154038754b2b583e"><code>c3fac1b</code></a> chore: tweak funkiMainnet</li>
<li><a href="https://github.com/wevm/viem/commit/42c197776b300c5c44f09e86157fa344ddc2659f"><code>42c1977</code></a> chore: format</li>
<li><a href="https://github.com/wevm/viem/commit/3af06fe23dda1f44d43b3d3cec5d985894c2840a"><code>3af06fe</code></a> feat: add Funki Mainnet (<a href="https://redirect.github.com/wevm/viem/issues/2513">#2513</a>)</li>
<li><a href="https://github.com/wevm/viem/commit/3354c46174cdb7e86036bf28b696a0ce6cf982d5"><code>3354c46</code></a> docs: add missing <code>http</code> import in the config file example (<a href="https://redirect.github.com/wevm/viem/issues/2517">#2517</a>)</li>
<li><a href="https://github.com/wevm/viem/commit/752680e14df5ef6b4afcff5c2b9a2ecd1491f1a7"><code>752680e</code></a> chore: update nonceManager tests</li>
<li>Additional commits viewable in <a href="https://github.com/wevm/viem/compare/[email protected]@2.17.10">compare view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=viem&package-manager=npm_and_yarn&previous-version=2.16.5&new-version=2.17.10)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

</details>

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is updating the `viem` package version from `2.16.5` to `2.17.10` across multiple locations.

### Detailed summary
- Updated `viem` package version from `2.16.5` to `2.17.10` in multiple files
- Peer dependencies and dev dependencies updated to `[email protected]`

> The following files were skipped due to too many changes: `pnpm-lock.yaml`

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

<!-- end pr-codex -->
2024-07-25 02:45:39 +00:00
kumaryash90 8599fbf4e0 Deploy modular core with default extensions (#3524)
## Problem solved

Short description of the bug fixed or feature added

## Changes made

- [ ] Public API changes: list the public API changes made if any
- [ ] Internal API changes: explain the internal logic changes

## How to test

- [ ] Automated tests: link to unit test file
- [ ] Manual tests: step by step instructions on how to test

## Contributor NFT

Paste in your wallet address below and we will airdrop you a special NFT when your pull request is merged.

```Address: ```

<!-- start pr-codex -->

---

## PR-Codex overview
This PR introduces support for modular extensions in contract publishing forms.

### Detailed summary
- Added support for modular extensions in contract publishing forms
- Updated extension input fields to handle modular extensions
- Implemented extension installation parameters for modular extensions

> The following files were skipped due to too many changes: `apps/dashboard/src/components/contract-components/contract-publish-form/index.tsx`, `legacy_packages/sdk/src/evm/common/any-evm-utils/getModularDeploymentInfo.ts`, `legacy_packages/sdk/src/evm/core/sdk.ts`

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

<!-- end pr-codex -->
2024-07-25 02:18:44 +00:00
jnsdls 5c9af853fa [Refactor] Simplify RPC client map key usage in getRpcClient function (#3805)
### TL;DR
Fixes an issue with RPC client reuse to improve performance.

### What changed?
The change replaces the use of `chainId` with `rpcUrl` as the key in the `rpcClientMap` to ensure the correct RPC client is reused.

### How to test?
Test by running existing unit tests and functional tests for RPC client related functionality. Ensure that performance metrics show improvement in RPC client reuse scenarios.

### Why make this change?
This change is motivated by the need to improve performance by ensuring the RPC client is correctly reused.

---
2024-07-25 01:35:50 +00:00
joaquim-verges cb616f75ed fix(gas): correct gas estimation logic on Arbitrum Sepolia (#3804)
<!-- start pr-codex -->

## PR-Codex overview
This PR fixes gas estimation issues on Arbitrum Sepolia and ensures proper handling of zero `maxPriorityFeePerGas`.

### Detailed summary
- Fixed gas estimation for Arbitrum Sepolia
- Added test case for 0 `maxPriorityFeePerGas`
- Updated conditions for handling `maxPriorityFeePerGas` as `null`

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

<!-- end pr-codex -->
2024-07-25 00:36:07 +00:00
joaquim-verges c82c524e13 feat(smart): allow overriding nonce for smart accounts (#3782)
<!-- start pr-codex -->

## PR-Codex overview
The focus of this PR is to allow overriding the nonce for smart accounts in the `thirdweb` package.

### Detailed summary
- Added the ability to override nonce for smart accounts
- Exported `generateRandomUint192` function
- Updated imports and added new functions in `userop.ts` file
- Modified `createUnsignedUserOp` function to use custom nonce logic

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

<!-- end pr-codex -->
2024-07-24 22:37:45 +00:00
joaquim-verges e7581fc5bd fix(tests): conditionally run ClaimButton tests based on TW_SECRET_KEY environment variable (#3803) 2024-07-24 22:32:07 +00:00
Manan TankandGitHub 8fa7eef5bc Add missing JSdoc tags for docs organization (#3802) 2024-07-24 20:40:38 +00:00
joaquim-verges 39b31d9d0c fix(tests): conditionally run tests based on TW_SECRET_KEY environment variable (#3790)
<!-- start pr-codex -->

## PR-Codex overview
This PR updates test descriptions to conditionally run based on a secret key presence.

### Detailed summary
- Updated test descriptions to run conditionally with `runIf` based on `TW_SECRET_KEY`
- Added conditional execution for specific test cases
- Ensured tests run only if the secret key is present

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

<!-- end pr-codex -->
2024-07-24 19:57:35 +00:00
gregfromstl a51f53f531 fix: standardize RPC URL construction across the codebase (#3801)
<!-- start pr-codex -->

## PR-Codex overview
This PR focuses on fixing the RPC URL construction for chains in the `thirdweb` package.

### Detailed summary
- Updated RPC URL construction in `IFrameWallet` for signing transactions and typed data
- Updated RPC URL construction in chain utilities for defining, caching, and converting chains

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

<!-- end pr-codex -->
2024-07-24 19:40:26 +00:00
gregfromstl b15118a34f fix(thirdweb): clean-up send funds styles (#3800)
### TL;DR

This pull request centers the text and aligns the spinner in the SendFunds button within the ConnectWallet screen.

### What changed?

- Added `textAlign: "center"` to the button style to center the text
- Moved the spinner alignment condition to ensure it appears correctly when the button is in a pending state

### How to test?

1. Navigate to the `ConnectWallet` screen
2. Trigger the `SendFunds` action
3. Verify that the button text is centered and the spinner is correctly aligned during pending state

### Why make this change?

This change improves the UI by ensuring the button text is consistently centered and the spinner is appropriately aligned during the fund sending process.

---

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on making minor style fixes on the Connect UI Send Funds page.

### Detailed summary
- Updated the text element to be centered and multiline with a red color for error messages
- Adjusted the conditional rendering of the spinner to display only when sending funds is pending

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

<!-- end pr-codex -->
2024-07-24 19:17:08 +00:00
kien-ngo f4d44428b4 Dashboard cleanup (#3789)
- [x] Remove ethers.utils.isAddress
- [x] Remove useBalanceForAddress
- [x] Remove useTransferNativeToken

<!-- start pr-codex -->

---

## PR-Codex overview
This PR updates wallet balance functions and address validation in various components.

### Detailed summary
- Updated `getWalletBalance` function parameter from `account` to `address`
- Replaced `utils.isAddress` with `isAddress` for address validation
- Updated balance retrieval and address validation in multiple components
- Added new wallet balance hooks for fetching balances
- Refactored deposit functionality to use new wallet balance hooks

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

<!-- end pr-codex -->
2024-07-24 17:50:46 +00:00
jnsdls 634923ae29 [Fix] Handle non-SVG chain icons correctly in opengraph-image component (#3799) 2024-07-24 17:22:02 +00:00
Kien NgoandGitHub 15df5f7cbf Update middleware.ts (#3798) 2024-07-24 15:18:34 +00:00
kien-ngo 105e523ce4 Prebuilt UI: ClaimButton for all thirdweb Drop contracts (#3785)
## Problem solved

Short description of the bug fixed or feature added

## Changes made

- [ ] Public API changes: list the public API changes made if any
- [ ] Internal API changes: explain the internal logic changes

## How to test

- [ ] Automated tests: link to unit test file
- [ ] Manual tests: step by step instructions on how to test

## Contributor NFT

Paste in your wallet address below and we will airdrop you a special NFT when your pull request is merged.

```Address: ```

<!-- start pr-codex -->

---

## PR-Codex overview
This PR adds a `ClaimButton` component for claiming tokens from thirdweb Drop contracts.

### Detailed summary
- Added `ClaimButton` component for thirdweb Drop contracts
- Defined types for different token claim parameters
- Implemented claim logic for ERC721, ERC1155, and ERC20 tokens
- Added tests for ERC721 and ERC1155 claim scenarios

> The following files were skipped due to too many changes: `packages/thirdweb/src/react/web/ui/prebuilt/thirdweb/ClaimButton/ClaimButton.test.tsx`

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

<!-- end pr-codex -->
2024-07-24 10:19:35 +00:00
MananTank fc23b90c34 Dashboard color fixes (#3781)
<!-- start pr-codex -->

## PR-Codex overview
The focus of this PR is to update text colors across the application for better consistency and clarity.

### Detailed summary
- Updated text color classes to `text-success-text` and `text-destructive-text` for better clarity and consistency.
- Renamed background color class from `bg-destructive` to `bg-warning` for better semantics.
- Adjusted CSS variables for text colors to enhance readability and maintain consistency.

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

<!-- end pr-codex -->
2024-07-24 07:55:31 +00:00
gregfromstl a560af22a1 fix(dashboard): audited contract icon alignment (#3793)
### TL;DR

Improve the UI layout of the contract-card component by adjusting spacing and removing unnecessary Skeleton wrappers.

### What changed?

The `gap` property for the `Flex` component was increased from 0 to 1 to provide better spacing. The `Skeleton` wrappers around the `Icon` and `Text` components were removed for a cleaner design.

### How to test?

1. Go to the dashboard and navigate to the explore section.
2. Check the contract-card components and observe the new spacing and the absence of loading skeletons around the `Icon` and `Text`.

### Why make this change?

The change is aimed at improving the user interface by making the contract-card component cleaner and visually more appealing.

---
2024-07-24 07:43:09 +00:00
Joaquim VergesandGitHub c51f7857e2 fix(gas): handle Polygon Amoy Gas Station fee data (#3796) 2024-07-24 13:29:09 +12:00
Manan TankandGitHub 5fabe66613 Fix XDC network sendTransaction issue (#3792) 2024-07-24 01:54:34 +05:30
kien-ngo 891bc988d6 update middleware to handle chainId: 404 (#3786)
<!-- start pr-codex -->

## PR-Codex overview
This PR ensures that the `possibleChainId` is not rewritten to the slug if it equals 404.

### Detailed summary
- Updated condition to exclude rewriting `possibleChainId` if it equals 404.

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

<!-- end pr-codex -->
2024-07-23 04:19:44 +00:00
MananTank 934ab63f6a Fix import contract not working in dashboard (#3784)
<!-- start pr-codex -->

## PR-Codex overview
This PR updates the `useRegistry.ts` and `hooks.ts` files to include a new `account` value of `300000n`.

### Detailed summary
- Updated `useRegistry.ts` and `hooks.ts` with `account: 300000n` value
- Called `deployContext.nextStep()` after the changes

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

<!-- end pr-codex -->
2024-07-22 23:42:27 +00:00
Jonas DanielsGitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>GitHub Action
e0e4ce016c Version Packages (#3768)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: GitHub Action <[email protected]>
2024-07-23 10:22:02 +12:00
gregfromstl d3c83023f8 Auth Refactor (#3779)
### TL;DR
Improved the in-app wallet sign-in speed by refactoring OAuth path handling to make it more generic and efficient.

### What changed?
- Standardized the OAuth path handling to make it more generic and reusable across multiple providers.
- Updated `getLoginPath` to `getSocialAuthLoginPath` for OAuth providers like Google, Facebook, Apple, and Discord.
- Improved login speed and reduced redundancy by streamlining the OAuth path logic.
- Removed outdated and redundant code related to individual OAuth provider handling.

### How to test?
1. Test the sign-in process using various OAuth providers such as Google, Facebook, Apple, and Discord.
2. Ensure the redirection and sign-in speed are improved.
3. Verify that the in-app wallet sign-in works seamlessly without any errors.

### Why make this change?
The changes were necessary to optimize and standardize the OAuth sign-in process, improving the overall user experience. The previous implementation had redundant code for individual providers, which was refactored to be more efficient and easier to maintain.

---

<!-- start pr-codex -->

---

## PR-Codex overview
This PR improves in-app wallet sign-in speed by updating authentication strategies and paths.

### Detailed summary
- Updated OAuth authentication strategy to `SocialAuthOption`
- Improved login path retrieval for social authentication providers
- Refactored Discord-specific authentication to generic OAuth approach

> The following files were skipped due to too many changes: `packages/thirdweb/src/wallets/in-app/native/auth/native-auth.ts`

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

<!-- end pr-codex -->
2024-07-22 20:58:26 +00:00
gregfromstl a9a3f0f423 fix(deploy): add missing version argument in computeDeploymentInfoFromContractId function (#3769)
Fix deterministic deploys with specified versions by adding the 'version' argument to the 'computeDeploymentInfoFromContractId' function.

---

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on fixing deterministic deploys with specified versions in the `compute-published-contract-deploy-info.ts` file under `thirdweb` package.

### Detailed summary
- Added `version` field to `computePublishedContractDeployInfo` function parameters.
- Utilizes the specified version for deterministic deployments.

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

<!-- end pr-codex -->
2024-07-22 17:34:29 +00:00
jnsdls 3de2dce384 [Feature] Add placeholder chain to provider setup and custom SDK context, make middleware method async (#3773)
<!-- start pr-codex -->

## PR-Codex overview
The focus of this PR is to enhance the app setup process by adding placeholder chains and improving dynamic routing.

### Detailed summary
- Added `PLACEHOLDER_CHAIN` object in `Billing.tsx` and `provider-setup.tsx`
- Updated context with placeholder chain if configured chains are empty
- Added dynamic routing logic in `middleware.ts` for chain IDs

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

<!-- end pr-codex -->
2024-07-22 15:28:44 +00:00
kien-ngo 4d392efc0c Hotfix: avoid page crash on loading :chainId/contractAddress (#3772)
<!-- start pr-codex -->

## PR-Codex overview
This PR updates a conditional check in the file `apps/dashboard/src/pages/[chain_id]/[...paths].tsx`.

### Detailed summary
- Updated conditional check for `configuredChain` to compare `getDashboardChainRpc` values for different chain IDs.

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

<!-- end pr-codex -->
2024-07-22 15:07:34 +00:00
kumaryash90 f082af0403 Proxy resolution with storage slot (#3687)
<!-- start pr-codex -->

## PR-Codex overview
This PR focuses on fixing proxy resolution in the `thirdweb` package. It includes updates to contract deployment and implementation extraction logic.

### Detailed summary
- Fixed proxy resolution in `resolveImplementation.ts`
- Added tests for extracting implementation address
- Updated proxy bytecode and constructor ABI for ERC1967 proxy
- Added `DUMMY_BYTECODE` for contract deployment

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

<!-- end pr-codex -->
2024-07-22 14:24:10 +00:00
jnsdls b07f9207a4 [Feature] Add Ecosystem Wallet Pricing Card component and integrate it across pages (#3770) 2024-07-22 10:52:50 +00:00
kien-ngo 9f555cab0d Dashboard: removal of @thirdweb-dev/chains (#3766)
## Problem solved

Short description of the bug fixed or feature added

## Changes made

- [ ] Public API changes: list the public API changes made if any
- [ ] Internal API changes: explain the internal logic changes

## How to test

- [ ] Automated tests: link to unit test file
- [ ] Manual tests: step by step instructions on how to test

## Contributor NFT

Paste in your wallet address below and we will airdrop you a special NFT when your pull request is merged.

```Address: ```

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to update chain definitions and RPC URLs, improve network configuration, and enhance contract component utilities.

### Detailed summary
- Updated chain definitions for various networks
- Adjusted RPC URLs in network configuration
- Enhanced contract component utilities with new features

> The following files were skipped due to too many changes: `packages/thirdweb/src/chains/chain-definitions/polygon-zkevm-testnet.ts`, `packages/thirdweb/src/chains/chain-definitions/scroll-sepolia-testnet.ts`, `packages/thirdweb/src/chains/chain-definitions/manta-pacific-testnet.ts`, `packages/thirdweb/src/chains/chain-definitions/scroll-alpha-testnet.ts`, `apps/dashboard/src/@3rdweb-sdk/react/hooks/useActiveChainId.tsx`, `apps/dashboard/src/lib/ens.ts`, `apps/dashboard/src/components/custom-contract/contract-header/contract-metadata.tsx`, `apps/dashboard/src/@3rdweb-sdk/react/hooks/useApi.ts`, `apps/dashboard/package.json`, `apps/dashboard/src/components/custom-contract/contract-header/metadata-header.tsx`, `apps/dashboard/src/constants/chains.ts`, `apps/dashboard/src/hooks/chains/configureChains.ts`, `apps/dashboard/src/lib/rpc.ts`, `apps/dashboard/src/pages/[chain_id]/[...paths].tsx`, `apps/dashboard/src/utils/tx-frame.ts`, `.changeset/beige-seas-design.md`, `apps/dashboard/src/utils/fetchChain.ts`, `apps/dashboard/src/components/settings/Account/Billing/CreditsItem.tsx`, `apps/dashboard/src/pages/publish/[...paths].tsx`, `apps/dashboard/src/@3rdweb-sdk/react/hooks/useFavoriteChains.ts`, `apps/dashboard/src/components/wallets/ConnectWalletPlayground/PreviewThirdwebProvider.tsx`, `apps/dashboard/src/lib/v5-adapter.ts`, `apps/dashboard/src/pages/profile/[profileAddress].tsx`, `apps/dashboard/src/@3rdweb-sdk/react/components/popularChains.ts`, `apps/dashboard/src/components/engine/overview/transactions-table.tsx`, `apps/dashboard/src/components/explore/contract-card/index.tsx`, `apps/dashboard/src/pages/api/revalidate/publish.ts`, `apps/dashboard/src/components/smart-wallets/AccountFactories/factory-contracts.tsx`, `apps/dashboard/src/components/smart-wallets/AccountFactories/index.tsx`, `apps/dashboard/src/components/contract-components/contract-publish-form/index.tsx`, `apps/dashboard/src/contexts/all-chains.tsx`, `apps/dashboard/src/components/app-layouts/provider-setup.tsx`, `apps/dashboard/src/components/shared/DeprecatedAlert.tsx`, `apps/dashboard/src/contract-ui/tabs/embed/components/embed-setup.tsx`, `apps/dashboard/src/constants/currencies.ts`, `packages/thirdweb/src/exports/chains.ts`, `apps/dashboard/src/contexts/configured-chains.tsx`, `apps/dashboard/src/components/contract-components/hooks.ts`, `pnpm-lock.yaml`, `apps/dashboard/src/lib/wallet/nfts/types.ts`

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

<!-- end pr-codex -->
2024-07-22 10:22:37 +00:00
kien-ngo 26d825bc4f Lens extensions (no Playground) (#3764)
<!-- start pr-codex -->

## PR-Codex overview
This PR adds extension support for the Lens Protocol, updates text in a component, and includes various changes related to Lens metadata handling.

### Detailed summary
- Added extension support for Lens Protocol
- Updated text in SponsorshipPolicies component
- Added functions in various Lens-related JSON files
- Modified test files to use `MAX_UINT256`
- Updated Lens profile schema and metadata attributes
- Added tests for Lens protocol functions and metadata retrieval

> The following files were skipped due to too many changes: `packages/thirdweb/src/extensions/lens/read/getHandleFromProfileId.test.ts`, `packages/thirdweb/src/extensions/lens/consts.ts`, `packages/thirdweb/src/extensions/lens/read/getHandleFromProfileId.ts`, `packages/thirdweb/src/extensions/lens/read/getProfileMetadata.ts`, `packages/thirdweb/src/extensions/lens/__generated__/FollowNFT/read/getFollowerCount.ts`, `packages/thirdweb/src/extensions/lens/__generated__/LensHandle/read/getHandleTokenURIContract.ts`, `packages/thirdweb/src/extensions/lens/read/getFullProfile.ts`, `packages/thirdweb/src/extensions/lens/__generated__/LensHub/read/nonces.ts`, `packages/thirdweb/src/extensions/lens/__generated__/LensHub/read/exists.ts`, `packages/thirdweb/src/extensions/lens/__generated__/TokenHandleRegistry/read/nonces.ts`, `packages/thirdweb/src/extensions/lens/__generated__/TokenHandleRegistry/read/resolve.ts`, `packages/thirdweb/src/extensions/lens/__generated__/LensHandle/read/getHandle.ts`, `packages/thirdweb/src/extensions/lens/__generated__/LensHandle/read/getTokenId.ts`, `packages/thirdweb/src/extensions/lens/__generated__/LensHandle/read/getLocalName.ts`, `packages/thirdweb/src/extensions/lens/__generated__/FollowNFT/read/isFollowing.ts`, `packages/thirdweb/src/extensions/lens/__generated__/LensHub/read/tokenDataOf.ts`, `packages/thirdweb/src/extensions/lens/__generated__/LensHub/read/mintTimestampOf.ts`, `packages/thirdweb/src/extensions/lens/__generated__/FollowNFT/read/mintTimestampOf.ts`, `packages/thirdweb/src/extensions/lens/__generated__/ModuleRegistry/read/getModuleTypes.ts`, `packages/thirdweb/src/extensions/lens/__generated__/TokenHandleRegistry/read/getDefaultHandle.ts`, `packages/thirdweb/src/extensions/lens/__generated__/FollowNFT/read/getFollowTokenId.ts`, `packages/thirdweb/src/extensions/lens/__generated__/LensHub/read/getContentURI.ts`, `packages/thirdweb/src/extensions/lens/__generated__/FollowNFT/read/getFollowTimestamp.ts`, `packages/thirdweb/src/extensions/lens/__generated__/ModuleRegistry/read/isModuleRegistered.ts`, `packages/thirdweb/src/extensions/lens/__generated__/FollowNFT/read/getFollowerProfileId.ts`, `packages/thirdweb/src/extensions/lens/__generated__/FollowNFT/read/getFollowData.ts`, `packages/thirdweb/src/extensions/lens/__generated__/LensHub/read/getProfile.ts`, `packages/thirdweb/src/extensions/lens/__generated__/LensHub/read/getProfileIdByHandleHash.ts`, `packages/thirdweb/src/extensions/lens/__generated__/ModuleRegistry/read/isErc20CurrencyRegistered.ts`, `packages/thirdweb/src/extensions/lens/__generated__/FollowNFT/read/getOriginalFollowTimestamp.ts`, `packages/thirdweb/src/extensions/lens/__generated__/ModuleRegistry/read/isModuleRegisteredAs.ts`, `packages/thirdweb/src/extensions/lens/__generated__/FollowNFT/read/getProfileIdAllowedToRecover.ts`, `packages/thirdweb/src/extensions/lens/__generated__/LensHub/read/getPublication.ts`, `packages/thirdweb/src/exports/extensions/lens.ts`

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

<!-- end pr-codex -->
2024-07-21 08:29:50 +00:00
kien-ngo 11b2ad05ad Remove @thirdweb-dev/sdk from dashboard (partially) (#3767)
<!-- start pr-codex -->

## PR-Codex overview
The focus of this PR is to expose `roleMap` and `getRoleHash` functions.

### Detailed summary
- Exposed `roleMap` and `getRoleHash` functions in `permissions.ts`
- Updated imports to use `thirdweb` instead of `@thirdweb-dev/sdk`
- Added `roleMap` import in `permissions` component
- Updated address resolution and validation in `airdrop-upload.tsx`

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

<!-- end pr-codex -->
2024-07-20 19:43:03 +00:00
kien-ngo a580e6a71e [Dashboard to v5] Remove ethers.constants, some ethers.utils, some other things (#3765)
<!-- start pr-codex -->

## PR-Codex overview
The focus of this PR is to refactor address-related functions and constants, consolidating them under `thirdweb` library.

### Detailed summary
- Refactored address-related functions and constants to use `thirdweb` library
- Updated imports and usage of `isAddress`, `ZERO_ADDRESS`, and `NATIVE_TOKEN_ADDRESS`
- Replaced `constants.AddressZero` with `ZERO_ADDRESS` where applicable

> The following files were skipped due to too many changes: `apps/dashboard/src/contract-ui/tabs/nfts/components/claim-tab.tsx`, `apps/dashboard/src/contract-ui/tabs/claim-conditions/components/claim-conditions-form/index.tsx`, `apps/dashboard/src/contract-ui/tabs/nfts/components/airdrop-upload.tsx`, `apps/dashboard/src/contract-ui/tabs/claim-conditions/components/snapshot-upload.tsx`, `apps/dashboard/src/contract-ui/tabs/split/page.tsx`, `apps/dashboard/src/contract-ui/tabs/permissions/components/permissions-editor.tsx`, `apps/dashboard/src/components/shared/CurrencySelector.tsx`, `apps/dashboard/src/contract-ui/tabs/permissions/components/contract-permission.tsx`, `apps/dashboard/src/@3rdweb-sdk/react/cache-keys.ts`

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

<!-- end pr-codex -->
2024-07-20 18:51:54 +00:00
kien-ngo 0148864ebc Playground Auth without Supabase example (#3757)
<!-- start pr-codex -->

## PR-Codex overview
The focus of this PR is to enhance authentication and authorization features using Thirdweb for the `playground-web` app.

### Detailed summary
- Updated `client.ts` to handle secret key for Thirdweb client
- Modified authentication logic in `auth-button.tsx` and `basic-auth.tsx`
- Added gated content feature in `gated-content.tsx`
- Updated page layout and content for authentication in `page.tsx`

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

<!-- end pr-codex -->
2024-07-20 01:40:38 +00:00
Jonas DanielsGitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>GitHub Action
9a29beb460 Version Packages (#3749)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: GitHub Action <[email protected]>
2024-07-20 13:32:24 +12:00
MananTank 6a94696c7e Fix Wallet switcher icon position in wallet details modal (#3762)
<!-- start pr-codex -->

## PR-Codex overview
This PR fixes the wallet switcher icon position in the wallet details modal.

### Detailed summary
- Adjusted the wallet switcher icon position in `Modal.tsx`
- Updated the `borderRadius` in `buttons.tsx`
- Added a new `ShuffleIconLucide` component in `ShuffleIconLucide.tsx`
- Replaced `ShuffleIcon` with `ShuffleIconLucide` in `Details.tsx`

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

<!-- end pr-codex -->
2024-07-19 22:52:06 +00:00
kumaryash90 d6b2c259d9 Register zksync contract on multichain registry after deployment (#3717)
<!-- start pr-codex -->

## PR-Codex overview
The focus of this PR is to enhance the deployment process of contracts by adding a gas override option and improving the registration process on the multichain registry for ZkSync contracts.

### Detailed summary
- Added `gasOverride` option for contract deployment
- Improved ZkSync contract registration process
- Removed unnecessary contract registration function
- Updated contract deployment handling for ZkSync
- Refactored contract deployment logic and metadata handling

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

<!-- end pr-codex -->
2024-07-19 22:35:39 +00:00
Manan TankandGitHub 742207c8fe Fix Get started Billing form edit button not working (#3759) 2024-07-19 21:53:07 +00:00
gregfromstl ec3405b307 feat(react-native): add discord login (#3716)
<!-- start pr-codex -->

## PR-Codex overview
This PR adds Discord login functionality to the React Native SDK, including new paths, UI changes, and authentication methods.

### Detailed summary
- Added Discord login feature to React Native SDK
- Updated UI components for Discord login
- Implemented Discord authentication methods
- Created new paths for Discord login
- Updated authentication middleware for Discord integration

> The following files were skipped due to too many changes: `packages/thirdweb/src/wallets/in-app/native/helpers/wallet/recoveryCode.ts`

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

<!-- end pr-codex -->
2024-07-19 21:19:31 +00:00
ElasticBottle 31ee4e53e2 feat(thirdweb): Add support for discord auth in in app wallet (#3678)
## Problem solved

Short description of the bug fixed or feature added

## Changes made

- [ ] Public API changes: list the public API changes made if any
- [ ] Internal API changes: explain the internal logic changes

## How to test

- [ ] Automated tests: link to unit test file
- [ ] Manual tests: step by step instructions on how to test

## Contributor NFT

Paste in your wallet address below and we will airdrop you a special NFT when your pull request is merged.

```Address: ```

<!-- start pr-codex -->

---

## PR-Codex overview
This PR adds Discord login option to thirdweb in-app and ecosystem wallets.

### Detailed summary
- Added Discord login option to in-app and ecosystem wallets
- Updated authentication constants and locales
- Implemented Discord login functionality
- Updated wallet images and social login components

> The following files were skipped due to too many changes: `packages/thirdweb/src/react/web/wallets/shared/ConnectWalletSocialOptions.tsx`, `packages/thirdweb/src/react/native/ui/icons/svgs.ts`, `packages/thirdweb/src/wallets/in-app/web/lib/auth/discord.ts`

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

<!-- end pr-codex -->
2024-07-19 21:19:27 +00:00
gregfromstl ec5ef50085 fix: correct typo in addSessionKey.ts file and update jsdocs with contract parameter (#3758) 2024-07-19 21:03:37 +00:00
gregfromstl 83cd9e5a8f fix(transaction): handle undefined predefinedGas value in estimate-gas and add test for 0 gas value (#3761)
### TL;DR

This pull request addresses a bug in the `estimateGas` function where a gas value of `0` is now respected instead of being overridden.

### What changed?

- Updated `estimateGas` function to properly handle and respect a gas value of `0`.
- Added a test case to ensure that a gas value of `0` does not throw an error and is correctly serialized.

### How to test?

- Run unit tests to ensure the new test case passes.

### Why make this change?

This change ensures that transactions explicitly set with a gas value of `0` are respected and not overridden, providing more accurate and expected behavior.

---
2024-07-19 20:41:08 +00:00
gregfromstl d8ea41dd4e fix(dashboard): replace Wrench icon with Pencil icon in partners table (#3760)
## Problem solved

Short description of the bug fixed or feature added

## Changes made

- [ ] Public API changes: list the public API changes made if any
- [ ] Internal API changes: explain the internal logic changes

## How to test

- [ ] Automated tests: link to unit test file
- [ ] Manual tests: step by step instructions on how to test

## Contributor NFT

Paste in your wallet address below and we will airdrop you a special NFT when your pull request is merged.

```Address: ```

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to update the icon used for editing partners in the partners table component.

### Detailed summary
- Updated icon for editing partners from `Wrench` to `Pencil` in `partners-table.tsx`

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

<!-- end pr-codex -->
2024-07-19 19:29:03 +00:00
870be083f7 fix(connect-ui): update Connect UI tabs styling with new design enhancements (#3746)
Co-authored-by: gregfromstl <[email protected]>
Co-authored-by: Manan Tank <[email protected]>
2024-07-19 19:18:28 +00:00
kien-ngo 56b34ce197 Allow to add extra call data to prepareContractCall (#3676)
<!-- start pr-codex -->

## PR-Codex overview
This PR enhances the `prepareContractCall` function in the `thirdweb` package to allow adding extra call data to transactions.

### Detailed summary
- Added support for extra call data in `prepareContractCall`
- Introduced internal functions to handle extra call data in transactions
- Updated tests to cover extra call data scenarios

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

<!-- end pr-codex -->
2024-07-19 17:38:36 +00:00
iuwqyir b7295f93c5 use workspace version for service-utils (#3756)
## Problem solved

Reverts back to workspace version for `service-utils` package

## Changes made

- [ ] Public API changes: list the public API changes made if any
- [ ] Internal API changes: explain the internal logic changes

## How to test

- [ ] Automated tests: link to unit test file
- [ ] Manual tests: step by step instructions on how to test

## Contributor NFT

Paste in your wallet address below and we will airdrop you a special NFT when your pull request is merged.

```Address: ```

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to update the dependency resolution for `@thirdweb-dev/service-utils` and `@thirdweb-dev/dynamic-contracts`.

### Detailed summary
- Updated `@thirdweb-dev/service-utils` dependency resolution to `workspace:*`
- Removed specific dependencies for `@thirdweb-dev/[email protected]`
- Updated snapshot for `@thirdweb-dev/[email protected]`

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

<!-- end pr-codex -->
2024-07-19 17:25:24 +00:00
jnsdls 38ce393078 [Feature] Add Rootstock banner and CTA images and update chain metadata (#3755) 2024-07-19 17:09:30 +00:00
gregfromstl fde7ad5e93 fix(dashboard): add update partner form and refactor domain validation (#3747)
### TL;DR

This PR introduces new functionalities and updates aimed at improving partner management within the ecosystem section of the dashboard.

### What changed?

1. **Partner Update Feature**: Added a new form and modal to enable the updating of partner details, including name, domains, bundle IDs, and permissions.
2. **Refactored Domain Validation**: Moved domain validation regex to a constants file for improved code maintainability.
3. **UI Enhancements**: Updated UI components to include an edit button for partner details in the partners' table.
4. **Code Cleanup**: Removed redundant code and improved component structure for better readability.

### How to test?

1. Navigate to the ecosystem section in the dashboard.
2. Select a partner and click the edit button to open the update modal.
3. Update the partner details and save changes. Ensure that the details are updated correctly in the database and UI.

### Why make this change?

This change aims to enhance the user experience by allowing easier management of ecosystem partners directly from the dashboard. It also improves code maintainability and readability by refactoring existing components and validation logic.

---

<!-- start pr-codex -->

---

## PR-Codex overview
This PR updates partner permission handling and refactors form validation in the ecosystem dashboard.

### Detailed summary
- Added `PartnerPermission` type and `isValidPermission` function
- Updated partner object permissions to use `PartnerPermission`
- Refactored form validation using `partnerFormSchema`
- Added `useUpdatePartner` hook for updating partners
- Updated UI components and modals for partner management

> The following files were skipped due to too many changes: `apps/dashboard/src/app/(dashboard)/dashboard/connect/ecosystem/[slug]/(active)/components/server/partners-table.tsx`, `apps/dashboard/src/app/(dashboard)/dashboard/connect/ecosystem/[slug]/(active)/components/client/update-partner-form.client.tsx`

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

<!-- end pr-codex -->
2024-07-19 16:38:07 +00:00
gregfromstl 713ff296fd fix(tests): update wait function test precision (#3754)
### TL;DR
Improve the precision of the wait function tests by changing the expectation from a simple greater-than-or-equal check to an absolute difference check within a margin of error of 10 milliseconds.

### What changed?
In `wait.test.ts` files located in the `thirdweb/src/react/core/utils/` and `thirdweb/src/utils/promise/` paths, the expectation `expect(elapsedTime).toBeGreaterThanOrEqual(waitTime)` was updated to `expect(Math.abs(elapsedTime - waitTime)).toBeLessThan(10)` to improve test accuracy by accounting for slight timing variations.

### How to test?
Run the test suites located in `thirdweb/src/react/core/utils/wait.test.ts` and `thirdweb/src/utils/promise/wait.test.ts` to ensure that they pass successfully with the updated precision checks.

### Why make this change?
The motivation behind this change is to enhance the reliability and precision of the wait function tests by accommodating minor variations in elapsed time, which can occur due to factors like system load and execution context.

---
2024-07-19 16:23:58 +00:00
iuwqyir af4acc4319 add chainsaw service description (#3745)
## Problem solved

Added chainsaw service description so it can be used for auth

## Contributor NFT

Paste in your wallet address below and we will airdrop you a special NFT when your pull request is merged.

```Address: ```

<!-- start pr-codex -->

---

## PR-Codex overview
This PR adds a new service called `chainsaw` to the service-utils package and updates dependencies and configurations related to it.

### Detailed summary
- Added `chainsaw` service definition in `service-utils`
- Updated dependencies and configurations for the `chainsaw` service
- Updated `service-utils` version to `0.4.36` in various files and lock files

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

<!-- end pr-codex -->
2024-07-19 15:56:20 +00:00
kien-ngo 091b6099e7 Update ancient8 banner (#3753)
## Problem solved

Short description of the bug fixed or feature added

## Changes made

- [ ] Public API changes: list the public API changes made if any
- [ ] Internal API changes: explain the internal logic changes

## How to test

- [ ] Automated tests: link to unit test file
- [ ] Manual tests: step by step instructions on how to test

## Contributor NFT

Paste in your wallet address below and we will airdrop you a special NFT when your pull request is merged.

```Address: ```

<!-- start pr-codex -->

---

## PR-Codex overview
This PR updates banner images and gradient styling in the dashboard for a better visual experience.

### Detailed summary
- Deleted `ancient8-banner.jpg` and updated to `ancient8-banner.png` for better quality.
- Changed gradient styling in the header for improved visual appeal.
- Updated imports of banner images in `utils.ts` to match file extensions.

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

<!-- end pr-codex -->
2024-07-19 15:04:09 +00:00
joaquim-verges aba1266431 fix(thirdweb): Handle minimum purchase amount errors in buy with crypto flow (#3751)
<!-- start pr-codex -->

## PR-Codex overview
This PR focuses on handling the minimum amount in the buy-to-crypto flow.

### Detailed summary
- Updated error handling messages for buy with fiat and crypto flows
- Added functions to set token amount and track editing status
- Improved error messages display for minimum purchase amount
- Implemented functionality to set the minimum amount in the UI

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

<!-- end pr-codex -->
2024-07-19 05:23:39 +00:00
Joaquim VergesandGitHub 24bcee24ea fix(RN): correct disconnect button color in light mode and other minor UI adjustments (#3748) 2024-07-19 14:52:02 +12:00
joaquim-verges c6741b42cd feat(pay): add async ERC20 value property to transaction options (#3661)
### TL;DR

This PR introduces support for ERC20 tokens in the transaction flow, allowing users to seamlessly interact with contracts that require ERC20 token payments.

### What changed?

1. Added ERC20 token handling in the `useSendTransaction` hook to check balance and prompt users to buy ERC20 if needed.
2. Integrated ERC20 token fields, such as `erc20Value`, into the transaction preparation and cost estimation processes.
3. Updated various contract-writing scripts to include `erc20Value` overrides where necessary.
4. Enhanced the UI in `TxModal` and `BuyScreen` to display and process ERC20 token transactions.
5. Added tests for ERC20 token transactions in the `drop721.test.ts` file.
6. Extended documentation and examples to include ERC20 token use cases in transaction flows.

### How to test?

1. Run the unit tests in the `drop721.test.ts` file to ensure ERC20 transactions are correctly processed.
2. Use the `useSendTransaction` hook in a sample component and attempt transactions with both native and ERC20 tokens.
3. Verify that the ERC20 token purchase prompt appears when balance is insufficient.

### Why make this change?

Adding ERC20 support enhances the flexibility and functionality of the transaction flow, making it easier for users to interact with a wider range of smart contracts that require different types of token payments.

---

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on handling ERC20 transaction values in Pay components.

### Detailed summary
- Added `tokenDecimals` in `types.ts`
- Modified `title` in `PayEmbed.tsx` and `transferBatch.ts`
- Added `overrides` in `transfer.ts`, `transferFrom.ts`, `approve.ts`
- Added `erc20Value` in various transaction files
- Updated `prepare-transaction.ts` with `erc20Value`
- Added `erc20Value` in generated files for different ERC20 transactions

> The following files were skipped due to too many changes: `packages/thirdweb/src/extensions/common/__generated__/IMulticall/write/multicall.ts`, `packages/thirdweb/src/extensions/erc20/__generated__/IMintableERC20/write/mintTo.ts`, `packages/thirdweb/src/extensions/erc721/__generated__/IBurnableERC721/write/burn.ts`, `packages/thirdweb/src/extensions/erc721/__generated__/IStaking721/write/withdraw.ts`, `packages/thirdweb/src/extensions/farcaster/__generated__/IBundler/write/register.ts`, `packages/thirdweb/src/extensions/airdrop/__generated__/Airdrop/write/airdropERC20.ts`, `packages/thirdweb/src/extensions/airdrop/__generated__/Airdrop/write/claimERC1155.ts`, `packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/write/addStake.ts`, `packages/thirdweb/src/extensions/erc721/__generated__/IDelayedReveal/write/reveal.ts`, `packages/thirdweb/src/extensions/erc721/__generated__/IERC721A/write/transferFrom.ts`, `packages/thirdweb/src/extensions/farcaster/__generated__/IKeyGateway/write/addFor.ts`, `packages/thirdweb/src/extensions/marketplace/__generated__/IMarketplace/write/buy.ts`, `packages/thirdweb/src/extensions/airdrop/__generated__/Airdrop/write/airdropERC721.ts`, `packages/thirdweb/src/extensions/airdrop/__generated__/Airdrop/write/setMerkleRoot.ts`, `packages/thirdweb/src/extensions/erc1155/__generated__/IBurnableERC1155/write/burn.ts`, `packages/thirdweb/src/extensions/erc1155/__generated__/IStaking1155/write/withdraw.ts`, `packages/thirdweb/src/extensions/erc20/__generated__/IBurnableERC20/write/burnFrom.ts`, `packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/write/depositTo.ts`, `packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/write/handleOps.ts`, `packages/thirdweb/src/extensions/erc721/__generated__/IClaimableERC721/write/claim.ts`, `packages/thirdweb/src/extensions/erc721/__generated__/IMintableERC721/write/mintTo.ts`, `packages/thirdweb/src/extensions/farcaster/__generated__/IIdGateway/write/register.ts`, `packages/thirdweb/src/extensions/farcaster/__generated__/IIdRegistry/write/recover.ts`, `packages/thirdweb/src/extensions/farcaster/__generated__/IKeyRegistry/write/remove.ts`, `packages/thirdweb/src/extensions/marketplace/__generated__/IOffers/write/makeOffer.ts`, `packages/thirdweb/src/extensions/airdrop/__generated__/Airdrop/write/airdropERC1155.ts`, `packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/write/withdrawTo.ts`, `packages/thirdweb/src/extensions/farcaster/__generated__/IIdRegistry/write/transfer.ts`, `packages/thirdweb/src/extensions/marketplace/__generated__/IMarketplace/write/offer.ts`, `packages/thirdweb/src/extensions/modular/__generated__/ModularCore/write/grantRoles.ts`, `packages/thirdweb/src/extensions/prebuilts/__generated__/DropERC20/write/initialize.ts`, `packages/thirdweb/src/extensions/uniswap/__generated__/ISwapRouter/write/exactInput.ts`, `packages/thirdweb/src/extensions/erc1155/__generated__/IClaimableERC1155/write/claim.ts`, `packages/thirdweb/src/extensions/erc1155/__generated__/IMintableERC1155/write/mintTo.ts`, `packages/thirdweb/src/extensions/erc4337/__generated__/IAccount/write/validateUserOp.ts`, `packages/thirdweb/src/extensions/erc721/__generated__/IDrop/write/setClaimConditions.ts`, `packages/thirdweb/src/extensions/erc721/__generated__/INFTMetadata/write/setTokenURI.ts`, `packages/thirdweb/src/extensions/farcaster/__generated__/IStorageRegistry/write/rent.ts`, `packages/thirdweb/src/extensions/marketplace/__generated__/IOffers/write/acceptOffer.ts`, `packages/thirdweb/src/extensions/marketplace/__generated__/IOffers/write/cancelOffer.ts`, `packages/thirdweb/src/extensions/modular/__generated__/ModularCore/write/revokeRoles.ts`, `packages/thirdweb/src/extensions/prebuilts/__generated__/DropERC721/write/initialize.ts`, `packages/thirdweb/src/extensions/prebuilts/__generated__/TokenERC20/write/initialize.ts`, `packages/thirdweb/src/extensions/uniswap/__generated__/IQuoter/write/quoteExactInput.ts`, `packages/thirdweb/src/extensions/uniswap/__generated__/ISwapRouter/write/exactOutput.ts`, `packages/thirdweb/src/extensions/erc1155/__generated__/INFTMetadata/write/setTokenURI.ts`, `packages/thirdweb/src/extensions/erc20/__generated__/IAirdropERC20/write/airdropERC20.ts`, `packages/thirdweb/src/extensions/erc721/__generated__/IERC721A/write/safeTransferFrom.ts`, `packages/thirdweb/src/extensions/farcaster/__generated__/IIdGateway/write/registerFor.ts`, `packages/thirdweb/src/extensions/farcaster/__generated__/IIdRegistry/write/recoverFor.ts`, `packages/thirdweb/src/extensions/farcaster/__generated__/IKeyRegistry/write/removeFor.ts`, `packages/thirdweb/src/extensions/multicall3/__generated__/IMulticall3/write/aggregate.ts`, `packages/thirdweb/src/extensions/prebuilts/__generated__/DropERC1155/write/initialize.ts`, `packages/thirdweb/src/extensions/prebuilts/__generated__/Marketplace/write/initialize.ts`, `packages/thirdweb/src/extensions/prebuilts/__generated__/TokenERC721/write/initialize.ts`, `packages/thirdweb/src/extensions/thirdweb/__generated__/IRulesEngine/write/deleteRule.ts`, `packages/thirdweb/src/extensions/uniswap/__generated__/IQuoter/write/quoteExactOutput.ts`, `packages/thirdweb/src/extensions/erc1155/__generated__/IERC1155/write/safeTransferFrom.ts`, `packages/thirdweb/src/extensions/erc1155/__generated__/IStaking1155/write/claimRewards.ts`, `packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/write/withdrawStake.ts`, `packages/thirdweb/src/extensions/erc721/__generated__/IERC721A/write/setApprovalForAll.ts`, `packages/thirdweb/src/extensions/farcaster/__generated__/IIdRegistry/write/transferFor.ts`, `packages/thirdweb/src/extensions/modular/__generated__/ModularCore/write/renounceRoles.ts`, `packages/thirdweb/src/extensions/multicall3/__generated__/IMulticall3/write/aggregate3.ts`, `packages/thirdweb/src/extensions/prebuilts/__generated__/TokenERC1155/write/initialize.ts`, `packages/thirdweb/src/extensions/airdrop/__generated__/Airdrop/write/airdropNativeToken.ts`, `packages/thirdweb/src/extensions/common/__generated__/IRoyaltyPayments/write/getRoyalty.ts`, `packages/thirdweb/src/extensions/erc1155/__generated__/IBurnableERC1155/write/burnBatch.ts`, `packages/thirdweb/src/extensions/erc1155/__generated__/IERC1155/write/setApprovalForAll.ts`, `packages/thirdweb/src/extensions/erc20/__generated__/IAirdropERC20Claimable/write/claim.ts`, `packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/write/incrementNonce.ts`, `packages/thirdweb/src/extensions/permissions/__generated__/IPermissions/write/grantRole.ts`, `packages/thirdweb/src/extensions/thirdweb/__generated__/ITWMultichainRegistry/write/add.ts`, `packages/thirdweb/src/extensions/uniswap/__generated__/IUniswapV3Factory/write/setOwner.ts`, `packages/thirdweb/src/extensions/erc20/__generated__/IDropERC20/write/setClaimConditions.ts`, `packages/thirdweb/src/extensions/erc721/__generated__/DropERC721/write/setMaxTotalSupply.ts`, `packages/thirdweb/src/extensions/erc721/__generated__/IAirdropERC721/write/airdropERC721.ts`, `packages/thirdweb/src/extensions/multicall3/__generated__/IMulticall3/write/tryAggregate.ts`, `packages/thirdweb/src/extensions/permissions/__generated__/IPermissions/write/revokeRole.ts`, `packages/thirdweb/src/extensions/erc1155/__generated__/IDrop1155/write/setClaimConditions.ts`, `packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/write/getSenderAddress.ts`, `packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/write/simulateHandleOp.ts`, `packages/thirdweb/src/extensions/erc721/__generated__/DropERC721/write/freezeBatchBaseURI.ts`, `packages/thirdweb/src/extensions/erc721/__generated__/DropERC721/write/updateBatchBaseURI.ts`, `packages/thirdweb/src/extensions/erc721/__generated__/IAirdropERC721Claimable/write/claim.ts`, `packages/thirdweb/src/extensions/erc721/__generated__/INFTStake/write/depositRewardTokens.ts`, `packages/thirdweb/src/extensions/farcaster/__generated__/IStorageRegistry/write/batchRent.ts`, `packages/thirdweb/src/extensions/marketplace/__generated__/IMarketplace/write/acceptOffer.ts`, `packages/thirdweb/src/extensions/modular/__generated__/ModularCore/write/installExtension.ts`, `packages/thirdweb/src/extensions/uniswap/__generated__/ISwapRouter/write/exactInputSingle.ts`, `packages/thirdweb/src/extensions/uniswap/__generated__/IUniswapV3Factory/write/createPool.ts`, `packages/thirdweb/src/extensions/common/__generated__/IRoyalty/write/setDefaultRoyaltyInfo.ts`, `packages/thirdweb/src/extensions/erc1155/__generated__/DropERC1155/write/setMaxTotalSupply.ts`, `packages/thirdweb/src/extensions/erc20/__generated__/ITokenStake/write/depositRewardTokens.ts`, `packages/thirdweb/src/extensions/erc4337/__generated__/IAccountFactory/write/createAccount.ts`, `packages/thirdweb/src/extensions/erc4337/__generated__/IAccountFactory/write/onSignerAdded.ts`, `packages/thirdweb/src/extensions/erc721/__generated__/INFTStake/write/withdrawRewardTokens.ts`, `packages/thirdweb/src/extensions/marketplace/__generated__/IMarketplace/write/closeAuction.ts`, `packages/thirdweb/src/extensions/modular/__generated__/IModularCore/write/installExtension.ts`, `packages/thirdweb/src/extensions/modular/__generated__/ModularCore/write/transferOwnership.ts`, `packages/thirdweb/src/extensions/permissions/__generated__/IPermissions/write/renounceRole.ts`, `packages/thirdweb/src/extensions/thirdweb/__generated__/ITWMultichainRegistry/write/remove.ts`, `packages/thirdweb/src/extensions/uniswap/__generated__/IQuoter/write/quoteExactInputSingle.ts`, `packages/thirdweb/src/extensions/uniswap/__generated__/ISwapRouter/write/exactOutputSingle.ts`, `packages/thirdweb/src/extensions/common/__generated__/IPlatformFee/write/setPlatformFeeInfo.ts`, `packages/thirdweb/src/extensions/common/__generated__/IRoyalty/write/setRoyaltyInfoForToken.ts`, `packages/thirdweb/src/extensions/erc1155/__generated__/DropERC1155/write/freezeBatchBaseURI.ts`, `packages/thirdweb/src/extensions/erc1155/__generated__/DropERC1155/write/updateBatchBaseURI.ts`, `packages/thirdweb/src/extensions/erc1155/__generated__/IAirdropERC1155/write/airdropERC1155.ts`, `packages/thirdweb/src/extensions/erc1155/__generated__/IAirdropERC1155Claimable/write/claim.ts`, `packages/thirdweb/src/extensions/erc1155/__generated__/IERC1155/write/safeBatchTransferFrom.ts`, `packages/thirdweb/src/extensions/erc20/__generated__/ITokenStake/write/withdrawRewardTokens.ts`, `packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/write/simulateValidation.ts`, `packages/thirdweb/src/extensions/marketplace/__generated__/IMarketplace/write/createListing.ts`, `packages/thirdweb/src/extensions/marketplace/__generated__/IMarketplace/write/updateListing.ts`, `packages/thirdweb/src/extensions/modular/__generated__/ModularCore/write/uninstallExtension.ts`, `packages/thirdweb/src/extensions/multicall3/__generated__/IMulticall3/write/aggregate3Value.ts`, `packages/thirdweb/src/extensions/prebuilts/__generated__/OpenEditionERC721/write/initialize.ts`, `packages/thirdweb/src/extensions/uniswap/__generated__/IQuoter/write/quoteExactOutputSingle.ts`, `packages/thirdweb/src/extensions/common/__generated__/IContractMetadata/write/setContractURI.ts`, `packages/thirdweb/src/extensions/erc4337/__generated__/IAccountFactory/write/onSignerRemoved.ts`, `packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/write/handleAggregatedOps.ts`, `packages/thirdweb/src/extensions/erc721/__generated__/IERC721Receiver/write/onERC721Received.ts`, `packages/thirdweb/src/extensions/marketplace/__generated__/IMarketplace/write/setContractURI.ts`, `packages/thirdweb/src/extensions/modular/__generated__/IModularCore/write/uninstallExtension.ts`, `packages/thirdweb/src/extensions/common/__generated__/IRoyaltyPayments/write/setRoyaltyEngine.ts`, `packages/thirdweb/src/extensions/erc721/__generated__/ISharedMetadata/write/setSharedMetadata.ts`, `packages/thirdweb/src/extensions/multicall3/__generated__/IMulticall3/write/blockAndAggregate.ts`, `packages/thirdweb/src/extensions/airdrop/__generated__/Airdrop/write/airdropERC20WithSignature.ts`, `packages/thirdweb/src/extensions/erc1155/__generated__/IEditionStake/write/depositRewardTokens.ts`, `packages/thirdweb/src/extensions/marketplace/__generated__/IDirectListings/write/cancelListing.ts`, `packages/thirdweb/src/extensions/marketplace/__generated__/IDirectListings/write/createListing.ts`, `packages/thirdweb/src/extensions/marketplace/__generated__/IDirectListings/write/updateListing.ts`, `packages/thirdweb/src/extensions/marketplace/__generated__/IEnglishAuctions/write/bidInAuction.ts`, `packages/thirdweb/src/extensions/thirdweb/__generated__/IRulesEngine/write/createRuleThreshold.ts`, `packages/thirdweb/src/extensions/thirdweb/__generated__/IThirdwebContract/write/setContractURI.ts`, `packages/thirdweb/src/extensions/uniswap/__generated__/IUniswapV3Factory/write/enableFeeAmount.ts`, `packages/thirdweb/src/extensions/airdrop/__generated__/Airdrop/write/airdropERC721WithSignature.ts`, `packages/thirdweb/src/extensions/erc1155/__generated__/IERC1155Receiver/write/onERC1155Received.ts`, `packages/thirdweb/src/extensions/erc1155/__generated__/IEditionStake/write/withdrawRewardTokens.ts`, `packages/thirdweb/src/extensions/erc4337/__generated__/IPaymaster/write/validatePaymasterUserOp.ts`, `packages/thirdweb/src/extensions/marketplace/__generated__/IDirectListings/write/buyFromListing.ts`, `packages/thirdweb/src/extensions/marketplace/__generated__/IEnglishAuctions/write/cancelAuction.ts`, `packages/thirdweb/src/extensions/marketplace/__generated__/IEnglishAuctions/write/createAuction.ts`, `packages/thirdweb/src/extensions/airdrop/__generated__/Airdrop/write/airdropERC1155WithSignature.ts`, `packages/thirdweb/src/extensions/common/__generated__/IPrimarySale/write/setPrimarySaleRecipient.ts`, `packages/thirdweb/src/extensions/erc20/__generated__/ISignatureMintERC20/write/mintWithSignature.ts`, `packages/thirdweb/src/extensions/farcaster/__generated__/IIdRegistry/write/changeRecoveryAddress.ts`, `packages/thirdweb/src/extensions/marketplace/__generated__/IMarketplace/write/setPlatformFeeInfo.ts`, `packages/thirdweb/src/extensions/multicall3/__generated__/IMulticall3/write/tryBlockAndAggregate.ts`, `packages/thirdweb/src/extensions/thirdweb/__generated__/IContractPublisher/write/publishContract.ts`, `packages/thirdweb/src/extensions/erc1155/__generated__/DropERC1155/write/setSaleRecipientForToken.ts`, `packages/thirdweb/src/extensions/marketplace/__generated__/IMarketplace/write/cancelDirectListing.ts`, `packages/thirdweb/src/extensions/permissions/__generated__/IPermissionsEnumerable/write/grantRole.ts`, `packages/thirdweb/src/extensions/thirdweb/__generated__/IRulesEngine/write/setRulesEngineOverride.ts`, `packages/thirdweb/src/extensions/erc721/__generated__/ISharedMetadataBatch/write/setSharedMetadata.ts`, `packages/thirdweb/src/extensions/erc721/__generated__/ISignatureMintERC721/write/mintWithSignature.ts`, `packages/thirdweb/src/extensions/modular/__generated__/ModularCore/write/completeOwnershipHandover.ts`, `packages/thirdweb/src/extensions/permissions/__generated__/IPermissionsEnumerable/write/revokeRole.ts`, `packages/thirdweb/src/extensions/thirdweb/__generated__/IContractPublisher/write/unpublishContract.ts`, `packages/thirdweb/src/extensions/erc1155/__generated__/IPackVRFDirect/write/openPackAndClaimRewards.ts`, `packages/thirdweb/src/extensions/farcaster/__generated__/IIdRegistry/write/changeRecoveryAddressFor.ts`, `packages/thirdweb/src/extensions/thirdweb/__generated__/IRulesEngine/write/createRuleMultiplicative.ts`, `packages/thirdweb/src/extensions/erc1155/__generated__/IERC1155Receiver/write/onERC1155BatchReceived.ts`, `packages/thirdweb/src/extensions/erc1155/__generated__/ISignatureMintERC1155/write/mintWithSignature.ts`, `packages/thirdweb/src/extensions/farcaster/__generated__/IIdRegistry/write/transferAndChangeRecovery.ts`, `packages/thirdweb/src/extensions/permissions/__generated__/IPermissionsEnumerable/write/renounceRole.ts`, `packages/thirdweb/src/extensions/erc721/__generated__/ISharedMetadataBatch/write/deleteSharedMetadata.ts`, `packages/thirdweb/src/extensions/marketplace/__generated__/IEnglishAuctions/write/collectAuctionPayout.ts`, `packages/thirdweb/src/extensions/marketplace/__generated__/IEnglishAuctions/write/collectAuctionTokens.ts`, `packages/thirdweb/src/extensions/farcaster/__generated__/IIdRegistry/write/transferAndChangeRecoveryFor.ts`, `packages/thirdweb/src/extensions/marketplace/__generated__/IDirectListings/write/approveBuyerForListing.ts`, `packages/thirdweb/src/extensions/thirdweb/__generated__/IContractPublisher/write/setPublisherProfileUri.ts`, `packages/thirdweb/src/extensions/erc4337/__generated__/IAccountPermissions/write/setPermissionsForSigner.ts`, `packages/thirdweb/src/extensions/common/__generated__/IClaimConditionsSinglePhase/write/setClaimConditions.ts`, `packages/thirdweb/src/extensions/marketplace/__generated__/IDirectListings/write/approveCurrencyForListing.ts`, `packages/thirdweb/src/extensions/thirdweb/__generated__/IContractFactory/write/deployProxyByImplementation.ts`, `packages/thirdweb/src/extensions/erc20/write/sigMint.ts`, `packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/main/useBuyTxStates.ts`, `packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/BuyTxHistory.tsx`, `packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/TxDetailsScreen.tsx`, `packages/thirdweb/src/react/web/ui/ConnectWallet/TransactionsScreen.tsx`, `packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/FiatDetailsScreen.tsx`, `packages/thirdweb/src/extensions/erc20/write/deposit.ts`, `packages/thirdweb/src/utils/extensions/drops/get-claim-params.ts`, `packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/PayTokenIcon.tsx`, `packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/BuyScreen.tsx`, `packages/thirdweb/src/extensions/erc20/write/getApprovalForTransaction.ts`, `apps/playground-web/src/components/pay/transaction-button.tsx`, `packages/thirdweb/src/extensions/erc721/drop721.test.ts`, `packages/thirdweb/src/react/core/hooks/transaction/useSendTransaction.ts`, `packages/thirdweb/src/react/web/hooks/transaction/useSendTransaction.tsx`

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

<!-- end pr-codex -->
2024-07-19 01:57:06 +00:00
Jonas DanielsGitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>GitHub Action
26ca958b55 Version Packages (#3722)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: GitHub Action <[email protected]>
2024-07-19 07:16:46 +12:00
AmineAfia 7098c8435b changed comeback tomorrow to give funds (#3744)
## Problem solved

Short description of the bug fixed or feature added

## Changes made

- [ ] come back tomorrow gives funds now

## How to test

- [ ] Automated tests: link to unit test file
- [ ] Manual tests: step by step instructions on how to test

## Contributor NFT

Paste in your wallet address below and we will airdrop you a special NFT when your pull request is merged.

```Address: ```

<!-- start pr-codex -->

---

## PR-Codex overview
This PR updates the SpinWheel component in the dashboard app to adjust the amount displayed based on the result and improve the success message.

### Detailed summary
- Updated the amount displayed based on the result in `SpinWheel.tsx`
- Improved success message with a more informative and positive message

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

<!-- end pr-codex -->
2024-07-18 18:29:44 +00:00
YashandGitHub c073ce59d1 Update XAI logo on homepage (#3743) 2024-07-18 20:28:46 +02:00
gregfromstl 4ae0bf72f5 chore: remove random logs (#3742) 2024-07-18 16:34:46 +00:00
AmineAfia 9b7f7938f2 added cache removal when faucet transfer fails (#3726)
## Problem solved

Users rate limited when faucet fails to transfer funds e.g. faucet empty

## Changes made

- [ ] Added the mechanism to remove users from the cache when the funding transfer fails (e.g. when the faucet is empty)

## How to test

- [ ] empty the faucet or make the transfer request fail

## Contributor NFT

Paste in your wallet address below and we will airdrop you a special NFT when your pull request is merged.

```Address: ```

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to add a new function `cacheDeleteKey` to delete a cache key and update its usage in the testnet faucet route.

### Detailed summary
- Added `cacheDeleteKey` function to delete a cache key in `lib/redis`
- Updated the testnet faucet route to use `cacheDeleteKey` for cache management

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

<!-- end pr-codex -->
2024-07-18 11:57:56 +00:00
Joaquim VergesandGitHub 8aa69f4129 fix(docs): tsdoc linting (#3739) 2024-07-18 20:29:17 +12:00
joaquim-verges 6cc3038298 fix(thirdweb): add optional 'from' in readContract method (#3735)
Fixes #3683

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to add an optional 'from' parameter in the `readContract()` function and update default max block wait times to 100 in various files.

### Detailed summary
- Added optional 'from' parameter in `readContract()`
- Updated default max block wait times to 10 in specific files
- Increased default max block wait times to 100 in other files

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

<!-- end pr-codex -->
2024-07-18 07:55:17 +00:00
Manan TankandGitHub db2cadfc4b Increased Transaction cost buffer for Pay Modal (#3730) 2024-07-18 07:54:10 +00:00
Joaquim VergesandGitHub 85f6cca8fc docs(thirdweb): Add examples and documentation tags for modular and utility functions (#3738) 2024-07-18 15:42:10 +12:00
80e6855a19 docs: fix fetchProofs jsdocs (#3736)
Co-authored-by: gregfromstl <[email protected]>
2024-07-18 14:54:00 +12:00
Farhan KhwajaandGitHub e02a18a4d8 Updates: Engine (#3737) 2024-07-18 07:15:46 +05:30
farhanW3 029a0ad9e8 Update: Engine Deletion Logic (#3734)
<!-- start pr-codex -->

## PR-Codex overview
This PR updates the condition for rendering a form in the `engine-instances-table.tsx` component based on the `instance` status.

### Detailed summary
- Changed the condition for rendering a form based on `instance.status`
- Form now appears for instances with status "paymentFailed" or "active" without `cloudDeployedAt`

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

<!-- end pr-codex -->
2024-07-18 01:09:18 +00:00
Joaquim VergesandGitHub f351054d34 fix(dashboard): Fix zksync deployments with inapp wallet (#3721) 2024-07-18 13:08:13 +12:00
gregfromstl 6bda057306 feat(connect-wallet): add transaction history page to connect modal UI (#3718)
This pull request introduces new features and modifications to the transaction history feature within the connect modal UI. Key changes include:

- Addition of a transaction history page accessible from the connect modal's main menu, allowing users to view and manage their transaction history more effectively.
- Refactoring of transaction-related components to enhance code maintainability and readability. Specifically, renaming components related to 'BuyTxHistory' to 'PayTxHistory' to better reflect their functionality.
- Updates to locale files to include new translations for added labels such as 'payTransactions' and 'walletTransactions'.
- Integration of new navigation options within the connect modal, enabling seamless switching between different transaction views, including 'Fiat Transactions' and 'Wallet Transactions'.
- Ensuring that the transaction history page supports multiple languages, with updated English, Spanish, Japanese, and Vietnamese locale files.
- Improvements to UI components to ensure consistent styling and user experience across the transaction history pages.

These enhancements aim to provide users with an improved interface for managing their transaction histories, thereby enhancing overall user experience.

---

<!-- start pr-codex -->

---

## PR-Codex overview
This PR adds a transaction history page to the connect modal UI.

### Detailed summary
- Added transaction history page to connect modal UI
- Renamed "pending-tx" to "transactions"
- Updated text and components related to transactions and fiat transactions
- Reorganized file structure for transaction-related screens and components

> The following files were skipped due to too many changes: `packages/thirdweb/src/react/web/ui/ConnectWallet/TransactionsScreen.tsx`, `packages/thirdweb/src/react/web/ui/ConnectWallet/screens/WalletTransactionHistory.tsx`, `packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/tx-history/BuyTxHistory.tsx`

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

<!-- end pr-codex -->
2024-07-18 00:25:12 +00:00
MananTank faaa426bbb Fix chain page crash when adding ref query param on dashboard (#3732)
<!-- start pr-codex -->

## PR-Codex overview
The focus of this PR is to refactor the handling of search parameters in the trending section of the dashboard.

### Detailed summary
- Updated the handling of search parameters in the trending section of the dashboard.
- Reorganized the code to use `searchParams` object for time range, page, and sort by.
- Refactored the `TrendingContractSection` and `TrendingTable` components to utilize `searchParams` object efficiently.

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

<!-- end pr-codex -->
2024-07-17 21:56:15 +00:00
0a5af48f70 Fix custom chain RPC not used if passed via chains prop (#3728)
Co-authored-by: MananTank <[email protected]>
2024-07-17 18:44:19 +00:00
joaquim-verges 0f9170caf1 feat(dashboard): add trending link in contracts section (#3720)
<!-- start pr-codex -->

## PR-Codex overview
This PR adds a new "Trending" section to the sidebar, updates the pagination component, and modifies search filters for gas usage. Additionally, it refactors the package.json file for thirdweb.

### Detailed summary
- Added "Trending" section to sidebar
- Updated pagination component
- Modified search filters for gas usage
- Refactored package.json for thirdweb

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

<!-- end pr-codex -->
2024-07-17 08:42:42 +00:00
joaquim-verges 05df89cb61 feat(smart): ERC20 paymaster support (#3719)
### TL;DR

Adds support for using an ERC20 paymaster in smart accounts. This includes functionality to check and approve ERC20 allowances as needed.

### What changed?

- Introduced support for ERC20 paymasters in smart accounts.
- Added logic to check and approve ERC20 allowances.
- Updated the `defaultTokens` list to include a new token for testing purposes.

### How to test?

1. Ensure that the smart account can interact with ERC20 paymasters.
2. Verify that the account approval for ERC20 paymasters works as expected.
3. Check that the default tokens list reflects the new token and can be utilized appropriately.

### Why make this change?

To enable smart accounts to use ERC20 tokens for paymaster functionalities, enhancing versatility and use-case scenarios for smart accounts.

---

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to add support for ERC20 paymaster for smart accounts.

### Detailed summary
- Added ERC20 paymaster support for smart accounts
- Implemented functions for approving ERC20 transactions
- Modified smart account creation to handle ERC20 paymasters

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

<!-- end pr-codex -->
2024-07-17 08:25:38 +00:00
joaquim-verges 8bc814aaf9 feat(pay): add metadata title support for pay screens (#3664)
<!-- start pr-codex -->

## PR-Codex overview
This PR updates various components across different files to allow for dynamic customization of titles in the UI screens.

### Detailed summary
- Added `title` prop to multiple components for dynamic title customization.
- Updated titles in UI screens to use the dynamic `title` prop.
- Enhanced flexibility for customizing display titles in the UI.

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

<!-- end pr-codex -->
2024-07-17 08:07:47 +00:00
Jonas DanielsGitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>GitHub Action
080903e3a9 Version Packages (#3675)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: GitHub Action <[email protected]>
2024-07-17 19:23:27 +12:00
Farhan KhwajaandGitHub c5b97407b0 updates: UserOp example + receipt retrieval function (#3712) 2024-07-16 22:32:35 -07:00
AmineAfia 39b329a56e Add Faucet to every Testnet chain page (#3660)
## Problem solved

Faucet for EVM every chain. When the faucet is empty we crowdfund faucet sponsors

## Changes made

- [ ] Added faucet UI
- [ ] Added faucet endpoint
- [ ] Added faucet eligibility endpoint

## How to test

- [ ] See video

https://github.com/user-attachments/assets/b4414d63-c4cf-44f9-8824-c7307ad34013

## Contributor NFT

Paste in your wallet address below and we will airdrop you a special NFT when your pull request is merged.

```Address: ```

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to implement a faucet feature for testnet chains, allowing users to claim testnet funds.

### Detailed summary
- Added "faucet" service type and functionality.
- Implemented faucet-related components and pages.
- Utilized Redis for caching faucet requests.
- Added necessary dependencies for faucet functionality.
- Updated chain metadata generation for faucet feature.

> The following files were skipped due to too many changes: `apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/faucet/components/SpinWheel.tsx`, `pnpm-lock.yaml`

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

<!-- end pr-codex -->
2024-07-16 22:29:18 +00:00
d4mr 910b115030 Engine Configuration: IP Allowlist (#3700)
Corresponding Engine PR: https://github.com/thirdweb-dev/engine/pull/564
<img width="773" alt="image" src="https://github.com/user-attachments/assets/a27098a6-4d6f-4cbb-a2aa-795f50d531ac">

<!-- start pr-codex -->

---

## PR-Codex overview
This PR introduces IP allowlisting feature to the engine configuration.

### Detailed summary
- Added `ipaddr.js` library for IP address validation
- Implemented IP allowlist configuration in the engine settings
- Created hooks for fetching and setting IP allowlist
- Added UI components for managing IP allowlist in the dashboard

> The following files were skipped due to too many changes: `pnpm-lock.yaml`

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

<!-- end pr-codex -->
2024-07-16 20:00:30 +00:00
jnsdls b85eabd991 [Fix] Update AddYourChainButton URL in ChainList page to new support form link (#3714) 2024-07-16 18:01:31 +00:00
jnsdls 7b96f417a1 [Fix] Use encodeURIComponent for URL paths in redirect and Link components (#3713) 2024-07-16 17:47:51 +00:00
Manan TankandGitHub a5573046f1 Fix adding a chain as favorite not working in dashboard (#3711) 2024-07-16 17:33:18 +00:00
0xFirekeeper cae0e280fa Unity 4.16.7 (#3710)
Sync chains too

<!-- start pr-codex -->

---

## PR-Codex overview
This PR updates various chain configurations with corrected URLs, symbols, and RPC endpoints. It also adds icons and red flags for better identification.

### Detailed summary
- Corrected URLs, symbols, and RPC endpoints for multiple chains
- Added icons for chain identification
- Updated red flags for specific chains

> The following files were skipped due to too many changes: `legacy_packages/chains/chains/1116.ts`, `legacy_packages/chains/chains/48900.ts`, `legacy_packages/chains/chains/65536.ts`, `legacy_packages/chains/chains/28122024.ts`, `legacy_packages/chains/chains/1115.ts`, `legacy_packages/chains/chains/44787.ts`, `legacy_packages/chains/chains/31.ts`, `legacy_packages/chains/chains/16350.ts`, `legacy_packages/chains/chains/179.ts`, `legacy_packages/chains/chains/852.ts`, `legacy_packages/chains/chains/123321.ts`, `legacy_packages/chains/chains/2702128.ts`, `legacy_packages/chains/chains/46.ts`, `legacy_packages/chains/chains/1648.ts`, `legacy_packages/chains/chains/10096.ts`, `legacy_packages/chains/chains/190.ts`, `legacy_packages/chains/chains/16481.ts`, `legacy_packages/chains/chains/1578.ts`, `legacy_packages/chains/chains/178.ts`, `legacy_packages/chains/chains/77677.ts`, `legacy_packages/chains/chains/1223.ts`, `legacy_packages/chains/chains/245022929.ts`, `legacy_packages/chains/chains/1570.ts`, `legacy_packages/chains/chains/7774.ts`, `legacy_packages/chains/chains/1398243.ts`, `legacy_packages/chains/chains/187.ts`, `legacy_packages/chains/chains/1313.ts`, `legacy_packages/chains/chains/9496.ts`, `legacy_packages/chains/chains/328527.ts`, `legacy_packages/chains/chains/327126.ts`, `legacy_packages/chains/chains/8869.ts`, `legacy_packages/chains/chains/12227331.ts`, `legacy_packages/chains/chains/29732.ts`, `legacy_packages/chains/chains/184.ts`, `legacy_packages/chains/chains/19191.ts`, `legacy_packages/chains/chains/20240603.ts`, `legacy_packages/chains/chains/10241024.ts`, `legacy_packages/chains/chains/199991.ts`, `legacy_packages/chains/chains/1811.ts`, `legacy_packages/chains/chains/486487.ts`, `legacy_packages/chains/chains/59902.ts`, `legacy_packages/chains/chains/42026.ts`, `legacy_packages/chains/chains/55614.ts`, `legacy_packages/chains/chains/6550.ts`, `legacy_packages/chains/chains/261.ts`, `legacy_packages/chains/chains/15430.ts`, `legacy_packages/chains/chains/65100003.ts`, `legacy_packages/chains/chains/8022.ts`, `legacy_packages/chains/chains/55239.ts`, `legacy_packages/chains/chains/5566.ts`, `legacy_packages/chains/chains/292003.ts`, `legacy_packages/chains/chains/65357.ts`, `legacy_packages/chains/chains/56667.ts`, `legacy_packages/chains/chains/87566.ts`, `legacy_packages/chains/chains/65010003.ts`, `legacy_packages/chains/chains/16680.ts`, `legacy_packages/chains/chains/22562.ts`, `legacy_packages/chains/chains/57056.ts`, `legacy_packages/chains/chains/62454.ts`, `legacy_packages/chains/chains/62587.ts`, `legacy_packages/chains/chains/75991.ts`, `legacy_packages/chains/chains/22721.ts`, `legacy_packages/chains/chains/26945.ts`, `legacy_packages/chains/chains/85677.ts`, `legacy_packages/chains/chains/9302.ts`, `legacy_packages/chains/chains/40875.ts`, `legacy_packages/chains/chains/420000.ts`, `legacy_packages/chains/chains/19077.ts`, `legacy_packages/chains/chains/3338.ts`, `legacy_packages/chains/chains/86602.ts`, `legacy_packages/chains/chains/86225.ts`, `legacy_packages/chains/chains/99083.ts`, `legacy_packages/chains/chains/24076.ts`, `legacy_packages/chains/chains/17071.ts`, `legacy_packages/chains/chains/8886.ts`, `legacy_packages/chains/chains/16180.ts`, `legacy_packages/chains/chains/4444444.ts`, `legacy_packages/chains/chains/9372.ts`, `legacy_packages/chains/chains/2311.ts`, `legacy_packages/chains/chains/1456.ts`, `legacy_packages/chains/chains/6806.ts`, `legacy_packages/chains/chains/1903648807.ts`, `legacy_packages/chains/chains/646.ts`, `legacy_packages/chains/chains/4457845.ts`, `legacy_packages/chains/chains/325000.ts`, `legacy_packages/chains/chains/175177.ts`, `legacy_packages/chains/chains/7001.ts`, `legacy_packages/chains/src/index.ts`

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

<!-- end pr-codex -->
2024-07-16 17:00:19 +00:00
joaquim-verges 8e1a24a60e feat(pay): add recipient address support to PayEmbed (#3662)
<!-- start pr-codex -->

## PR-Codex overview
This PR adds the recipient address feature to PayEmbed and refactors recipient address handling in various components.

### Detailed summary
- Added recipient address to PayEmbed for sending purchased tokens
- Refactored handling of recipient address in different screens and hooks
- Updated logic for onramp and swap processes based on recipient address

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

<!-- end pr-codex -->
2024-07-16 15:24:08 +00:00
Joaquim VergesandGitHub aadbd33e9d fix(thirdweb): make client and chain mandatory in useWalletBalance (#3706) 2024-07-16 20:19:18 +12:00
joaquim-verges 1a09f46f24 feat(RN): support auth in React Native (#3708) 2024-07-16 05:55:45 +00:00
gregfromstl f8f6790da7 fix(auth): resolve typed data signatures issue in in-app wallet (#3707)
### TL;DR

- Added domain data for typed data signatures.
- Updated hooks and utilities to use `account` instead of `signer`.

### What changed?

- Modified `useRegistry.ts`, `hooks.ts`, and `utils.ts` to replace `signer` with `account` for signing transactions.
- Updated `in-app-account.ts` to correctly handle domain data for typed data signatures.

### How to test?

1. Deploy a contract using the dashboard and ensure that `account` is used correctly instead of `signer`.
2. Validate that typed data signatures are correctly generated in the in-app wallet.

### Why make this change?

To improve the accuracy and reliability of in-app wallet typed data signatures by ensuring the correct handling of domain data and consistent use of `account` across the application.

---

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to fix in-app wallet typed data signatures and optimize contract-related functions.

### Detailed summary
- Fixed in-app wallet typed data signatures
- Updated contract-related functions for better optimization and clarity

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

<!-- end pr-codex -->
2024-07-16 05:38:11 +00:00
gregfromstl 73c74f11d4 feat(airdrop): add fetchProofsERC methods for ERC20, ERC721, and ERC1155 (#3709)
This update introduces new methods for fetching proofs for ERCXX tokens (specifically ERC20, ERC721, and ERC1155). The methods `fetchProofsERC20`, `fetchProofsERC721`, and `fetchProofsERC1155` have been added to the airdrop extension. These methods allow users to retrieve claim Merkle proofs for the specified address and tokens, ensuring that users in the allowlist can claim their airdrop. Additionally, example usage and detailed docstrings have been included to guide developers on how to implement these methods in their projects.

---

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to add `fetchProofsERCXX` methods for ERC721, ERC20, and ERC1155 airdrop contracts.

### Detailed summary
- Added `fetchProofsERC721`, `fetchProofsERC20`, and `fetchProofsERC1155` methods
- Updated `claimERC20` to use `fetchProofsERC20`
- Added detailed documentation for each method
- Renamed `fetchProofsrERC20` to `fetchProofsERC20`

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

<!-- end pr-codex -->
2024-07-16 05:27:46 +00:00
kien-ngo 3479117b28 Add Vietnamese locale (#3681)
<!-- start pr-codex -->

## PR-Codex overview
This PR adds Vietnamese locale support for the ConnectButton components and updates various language files for the ConnectWallet feature.

### Detailed summary
- Added Vietnamese locale for ConnectButton components
- Updated language files for ConnectWallet screens and wallets with Vietnamese translations

> The following files were skipped due to too many changes: `packages/thirdweb/src/react/web/wallets/local/locale/vi.ts`, `packages/thirdweb/src/react/web/wallets/shared/locale/vi.ts`, `packages/thirdweb/src/react/web/ui/ConnectWallet/locale/vi.ts`

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

<!-- end pr-codex -->
2024-07-16 03:38:43 +00:00
kien-ngo 34f6fd5fdd Add chainlist link to the contract page (#3705)
<!-- start pr-codex -->

## PR-Codex overview
The focus of this PR is to add a link to the `MetadataHeader` component that redirects to a specific chain page.

### Detailed summary
- Added `Link` import from "next/link"
- Applied `as={Link}` and `href={`/${chain.chainId}`}` to make the header clickable
- Set `cursor="pointer"` for better user interaction

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

<!-- end pr-codex -->
2024-07-16 00:57:30 +00:00
joaquim-verges baec85f6b4 fix(thirdweb): update TransactionError constructor to correctly set message property (#3704) 2024-07-16 00:44:17 +00:00
gregfromstl 88fa60d4ad fix(dashboard): domain validation for ecosystem partner domains (#3701)
### TL;DR
Updated the domain validation regex in the AddPartnerForm component to handle new wildcard subdomain cases and made minor formatting fixes.

### What changed?
- Updated the domain validation regex to handle new wildcard subdomain cases.
- Fixed minor formatting issues with array and string declarations.

### How to test?
1. Navigate to the Add Partner form in the dashboard.
2. Test the domain input field with the following cases to ensure proper validation:
   - general domains (e.g., example.com)
   - wildcard subdomains (e.g., *.example.com)
   - nested wildcard subdomains (e.g., *.*.example.com)

### Why make this change?
The changes were necessary to improve the domain validation mechanism by accommodating new wildcard subdomain cases, and to maintain code quality through consistent formatting.

---

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to update the `isDomainRegex` pattern in the `add-partner-form.client.tsx` file for improved domain validation.

### Detailed summary
- Updated the `isDomainRegex` pattern for domain validation with additional flexibility and accuracy.

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

<!-- end pr-codex -->
2024-07-15 22:40:41 +00:00
iuwqyir d780bff72f new fields for usage event schema (#3692)
## Problem solved

Adds 2 new optional fields to usage event schema:
* evmRequestParams
* providerIp

Allows a new possible source for the event - `rpcV2`

## Changes made

- [x] service-utils: Update usage tracker schema

## How to test

## Contributor NFT

Paste in your wallet address below and we will airdrop you a special NFT when your pull request is merged.

```Address: ```

<!-- start pr-codex -->

---

## PR-Codex overview
This PR updates the schema for the usage tracker event in the `service-utils` package to include new fields `evmRequestParams` and `providerIp`.

### Detailed summary
- Added `evmRequestParams` field to the usage event schema
- Added `providerIp` field to the usage event schema

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

<!-- end pr-codex -->
2024-07-15 22:17:53 +00:00
gregfromstl 062bcc79f9 fix(dashboard): update ecosystem wallet copy to include wallet count (#3702)
### TL;DR

Updated UI elements and feature list in the create page of the ecosystem section.

### What changed?

- Adjusted padding and positioning of elements for better alignment and appearance.
- Added a new feature item to the list: '30,000 active wallets included*'.
- Included a note regarding additional wallet costs ('$0.02 per additional wallet').

### How to test?

Navigate to the 'Create Ecosystem' page in the dashboard. Verify that the layout changes are correctly applied and the new feature/item is visible with the note on wallet costs.

### Why make this change?

These updates improve the clarity of information provided to users and enhance the overall user experience on the create page of the ecosystem section.

---

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to update the ecosystem creation page in the dashboard with additional wallet information.

### Detailed summary
- Added display of 30,000 active wallets included
- Added pricing information for additional wallets

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

<!-- end pr-codex -->
2024-07-15 22:12:27 +00:00
Manan TankandGitHub 817a778a17 Fix Network Selector only showing 1 search result (#3694) 2024-07-16 01:48:17 +05:30
jnsdls 5eddf27a48 [Feature] Update title in PRICING_SECTIONS for Monthly Active In-App Wallets (#3693) 2024-07-15 18:46:14 +00:00
81751d3e08 Fix "add custom network" button not closing details modal (#3690)
Signed-off-by: Jonas Daniels <[email protected]>
Co-authored-by: Jonas Daniels <[email protected]>
2024-07-15 18:25:59 +00:00
7e416c0f6b Add queryOptions for useWalletBalance hook (#3688)
Co-authored-by: MananTank <[email protected]>
2024-07-15 18:07:46 +00:00
MananTank 6ad65e234c Add type prop for TransactionButton (#3689)
<!-- start pr-codex -->

## PR-Codex overview
The focus of this PR is to add a `type` prop for the `TransactionButton` component in the `thirdweb` package.

### Detailed summary
- Added `type` prop for `TransactionButton`
- Updated `TransactionButton` component to include `type` attribute for button element

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

<!-- end pr-codex -->
2024-07-15 17:38:47 +00:00
Manan TankandGitHub d27f9ffdd1 Fix wrong isBrave check in dashboard (#3691) 2024-07-15 22:58:10 +05:30
Joaquim VergesandGitHub a3fb673e50 fix(thirdweb): handle universal links on ios for coinbase wallet connection (#3677) 2024-07-15 14:30:47 +12:00
kien-ngo aee7aef76f Export getClaimParams for thirdweb Drop contracts (#3685)
Initially this is for interacting with other frameworks like frog.fm
Might be useful elsewhere idk

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on exporting a new utils method `getClaimParams` for thirdweb Drop contracts.

### Detailed summary
- Added export for `getClaimParams` method in `utils/extensions/drops/get-claim-params.js`
- Exported type `GetClaimParamsOptions` for thirdweb Drop contracts

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

<!-- end pr-codex -->
2024-07-15 02:10:44 +00:00
kien-ngo b67519aecb Allow uploading .obj file (#3684)
<!-- start pr-codex -->

## PR-Codex overview
This PR enhances file input handling in components by adding support for `.obj` files alongside `.usdz` and `.glb` files.

### Detailed summary
- Updated `FileInput.tsx` to support `.obj` files for 3D models
- Updated `mint-form.tsx` to recognize `.gltf` files and `.obj` files for 3D models

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

<!-- end pr-codex -->
2024-07-14 21:30:21 +00:00
kien-ngo eabb2150a9 Add support for Zora1155 in ERC1155 > getOwned (#3659)
<!-- start pr-codex -->

## PR-Codex overview
The focus of this PR is to add support for Zora1155 in ERC1155 > getOwned.

### Detailed summary
- Added support for Zora1155 contract in ERC1155 > getOwned function
- Updated functions to handle Zora1155 contract methods
- Introduced new functions for Zora1155 contract interaction

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

<!-- end pr-codex -->
2024-07-12 21:09:23 +00:00
Joaquim VergesandGitHub 9f3fb7d1ee feat(smart): respect accountAddress override (#3673) 2024-07-13 05:59:47 +12:00
arcoraven 0d4852787f feat: Tools pages (#3665)
Adds new tools pages:
- Wei converter
- Hex converter
- Unix time converter
- Keccak256 converter

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to add new tools to the dashboard for converting between different formats like hex, decimal, Unix time, and Keccak-256 hashes.

### Detailed summary
- Added Hex Converter, Wei Converter, Unix Time Converter, and Keccak256 Converter tools
- Created components for each converter tool
- Implemented share functionality for each tool
- Added metadata for each tool
- Included tab navigation for easy access to tools

> The following files were skipped due to too many changes: `apps/dashboard/src/app/(dashboard)/tools/unixtime-converter/components/UnixTimeConverter.tsx`, `apps/dashboard/src/app/(dashboard)/tools/wei-converter/components/WeiConverter.tsx`

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

<!-- end pr-codex -->
2024-07-12 16:56:13 +00:00
Joaquim VergesandGitHub 4a1d1494ec feat(dashboard): add import for SortBy type to chain page (#3670) 2024-07-12 21:29:04 +12:00
Joaquim VergesandGitHub 0e555529d4 feat(dashboard): handle trending contracts in chain page (#3669) 2024-07-12 21:25:18 +12:00
Joaquim VergesandGitHub 21b72baf5b fix(dashboard): ensure scrolling sticks for pagination (#3668) 2024-07-12 20:35:20 +12:00
farhanW3 00fd82b08e Updates: Engine Demo (#3666)
<!-- start pr-codex -->

## PR-Codex overview
The focus of this PR is to enhance the dashboard engine functionality by adding a demo engine feature and improving user interactions.

### Detailed summary
- Added a demo engine URL environment variable
- Updated import engine instance button style
- Implemented try demo button functionality with analytics tracking
- Improved error handling for missing environment variables

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

<!-- end pr-codex -->
2024-07-12 07:54:16 +00:00
Joaquim VergesandGitHub 95397cd0f7 feat(dashboard): implement sorting feature in trending table (#3667) 2024-07-12 19:31:12 +12:00
Jonas DanielsGitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>GitHub Action
a629ae53f1 Version Packages (#3658)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: GitHub Action <[email protected]>
2024-07-12 08:23:22 +12:00
joaquim-verges 3d14162a69 fix(core): correct extension detection (#3657)
<!-- start pr-codex -->

## PR-Codex overview
This PR focuses on fixing extension contract detection and enhancing ownership function detection for ERC721 contracts.

### Detailed summary
- Fixed extension contract detection in `detectExtension.ts`
- Added ownership function detection in `getOwnedNFTs.test.ts`
- Updated imports for test clients and contract utils

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

<!-- end pr-codex -->
2024-07-11 19:32:30 +00:00
Jonas DanielsGitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
12f829f4f1 Version Packages (#3643)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-07-12 06:44:19 +12:00
77d7dd135f fix(thirdweb): resolve autoconnect issue for phone number sign-in on React Native (#3656)
Co-authored-by: joaquim-verges <[email protected]>
2024-07-12 06:27:34 +12:00
Manan TankandGitHub 9dd7b4de79 Ensure account address is checksum encoded (#3655) 2024-07-11 23:25:26 +05:30
jnsdls 44eb1bdd51 [Refactor] Clean up create-ticket.action.ts to streamline form data handling (#3654)
### TL;DR
Updated the createTicketAction function to ensure that only specific fields (attachments and json) are retained in formData during ticket creation.

### What changed?
- Introduced a constant KEEP_FIELDS to specify fields that should be retained in formData.
- Added the content field to formData before deleting non-essential fields.
- Removed specific deletion of extraInfo_Problem_Area key.

### How to test?
1. Trigger the createTicketAction function in support component.
2. Verify if only attachments and json fields are present in the formData when a ticket is created.

### Why make this change?
To ensure that only necessary data is sent when creating a ticket, optimizing the data payload and avoiding potential issues with extraneous fields.

---
2024-07-11 15:41:28 +00:00
jnsdls 727467b41a [Feature] Add Mantle banner and update ChainPageLayout for visual consistency (#3653)
This PR enhances the ChainPageLayout by adding support for background images for different chains and integrating Mantle chain-specific assets. Key updates include:
- Addition of the `mantle-banner.jpeg` and `mantle-cta.jpeg` images.
- Updates to `add-chain-to-wallet.tsx` and `layout.tsx` to support dynamic background and text color adjustments based on the presence of a background image.
- Modification of the `chainMetaRecord` to include metadata for the Mantle chain (chain ID 5000).

 ### TL;DR
Enhanced the ChainPageLayout component by adding support for chain-specific background images and integrating Mantle assets.

 ### What changed?
- New chain-specific background image support
- Integration with Mantle assets
- Updates to relevant components to handle background and text adjustments dynamically.

 ### How to test?
1. Go to the ChainPageLayout for any chain that has a background image (e.g., Mantle).
2. Verify that the background image is displayed correctly.
3. Check that text color and other UI elements adjust appropriately based on the background image.
4. Ensure that Mantle-specific content is displayed correctly.

 ### Why make this change?
This enhancement provides a more visually engaging and chain-specific user experience. The integration with Mantle also helps in showcasing specific chains more effectively.

---
2024-07-11 15:20:26 +00:00
joaquim-verges 9bbbba44f2 refactor(search): use trending contract data in search (#3652)
<!-- start pr-codex -->

## PR-Codex overview
This PR updates time range handling and contract fetching in the trending feature.

### Detailed summary
- Updated time range handling in `TimeRangeSwitcher`
- Moved `TimeRange` type to `lib/search`
- Refactored contract fetching logic to `fetchTopContracts`
- Added new types and functions related to trending contracts
- Updated imports and removed redundant code in `trending-table`

> The following files were skipped due to too many changes: `apps/dashboard/src/app/trending/components/trending-table.tsx`, `apps/dashboard/src/components/cmd-k-search/index.tsx`

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

<!-- end pr-codex -->
2024-07-11 08:44:56 +00:00
jnsdls 17f5b5ab52 [Feature] Add background image and update login page UI (#3651) 2024-07-11 07:11:25 +00:00
jnsdls 0bbf157a31 [Refactor] Update ChainPageLayout and ChainCTA components for visual consistency and add ancient8 banner asset (#3650) 2024-07-11 07:01:24 +00:00
joaquim-verges f402f6d1c2 trending contracts (#3641)
<!-- start pr-codex -->

## PR-Codex overview
The focus of this PR is to enhance the dashboard UI and functionality.

### Detailed summary
- Updated UI components like `Spinner` and `Toggle`
- Improved styling and color schemes
- Added new pages and components for trending contracts
- Refactored search functionality
- Integrated thirdweb client for chain icons

> The following files were skipped due to too many changes: `apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/page.tsx`, `apps/dashboard/src/@/components/ui/table.tsx`, `apps/dashboard/src/app/trending/components/icons.tsx`, `apps/dashboard/src/app/trending/components/trending-table.tsx`, `pnpm-lock.yaml`

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

<!-- end pr-codex -->
2024-07-11 04:19:17 +00:00
jnsdls 4661731561 [Feature] Add /support path to the list of logged in only paths (#3649) 2024-07-11 03:08:05 +00:00
jnsdls 509c584e7a [Refactor] Update environment variable usage and integrate Radix Dialog component (#3648)
This refactor replaces the usage of individual Unthread environment variables with a single `UNTHREAD_API_KEY`. Additionally, components and forms related to support tickets have been updated to streamline the support request flow. The Chakra UI components have been replaced with Radix UI components for consistency. Unused components have been removed and some components were slightly enhanced for development simplicity.

---

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to refactor code in the dashboard app, update dependencies, and improve UI components.

### Detailed summary
- Removed support-related components and pages
- Updated layout and styling in various dashboard components
- Added new products and product-related functions
- Updated dependencies in `package.json` and `pnpm-lock.yaml`
- Refactored form inputs and layouts in support forms

> The following files were skipped due to too many changes: `apps/dashboard/src/components/help/contact-forms/engine/index.tsx`, `apps/dashboard/src/components/help/contact-forms/connect/AffectedAreaInput.tsx`, `apps/dashboard/src/components/help/contact-forms/shared/SupportForm_SelectInput.tsx`, `apps/dashboard/src/components/help/contact-forms/contracts/index.tsx`, `apps/dashboard/src/components/help/contact-forms/connect/index.tsx`, `apps/dashboard/src/@/components/ui/dialog.tsx`, `apps/dashboard/src/app/(dashboard)/support/components/create-ticket.client.tsx`, `apps/dashboard/src/app/(dashboard)/support/components/create-ticket.action.ts`, `apps/dashboard/src/components/help/contact-forms/shared/SupportForm_AttachmentUploader.tsx`, `apps/dashboard/src/app/(dashboard)/support/page.tsx`

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

<!-- end pr-codex -->
2024-07-10 16:00:39 -07:00
Manan TankandGitHub 979a2b8147 Fix zero token amount formatting (#3646) 2024-07-10 21:29:41 +05:30
kien-ngo f239d09eae MediaRenderer: only render video poster if it's an image (#3642)
<!-- start pr-codex -->

## PR-Codex overview
This PR focuses on updating the `MediaRenderer` component to only render the video poster if it's an image.

### Detailed summary
- Updated `MediaRenderer` to conditionally render video poster based on MIME type
- Improved handling of poster rendering for better compatibility

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

<!-- end pr-codex -->
2024-07-10 03:44:29 +00:00
Jonas DanielsGitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>GitHub Action
133eae1384 Version Packages (#3635)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: GitHub Action <[email protected]>
2024-07-10 09:01:31 +12:00
jnsdls 6370b7cc90 [Refactor] Remove NeedSomeHelp component and its references (#3640)
### TL;DR
This PR removes the `ContextAIBotButton` and `NeedSomeHelp` components from the dashboard source code.

### What changed?
- Deleted `context-ai-button.tsx` and `need-some-help.tsx` files from the help folder.
- Updated `support.tsx` to remove the `NeedSomeHelp` component.

### How to test?
1. Navigate to the support page in the dashboard.
2. Ensure that the `NeedSomeHelp` section is no longer displayed.
3. Check that there are no console errors related to the missing components.

### Why make this change?
These components are no longer needed as part of the dashboard's help system and are being removed to simplify the codebase and reduce unnecessary dependencies.

---

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to remove unused help components and restructure the Support page layout.

### Detailed summary
- Deleted `NeedSomeHelp` and `ContextAiButton` components
- Removed unnecessary import statements
- Updated the layout of the Support page to exclude `NeedSomeHelp` component

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

<!-- end pr-codex -->
2024-07-09 18:34:41 +00:00
jnsdls f91a024cc5 [Refactor] Update THIRDWEB_API_HOST integration in ensure-login flow (#3638)
<!-- start pr-codex -->

## PR-Codex overview
The focus of this PR is to update authentication endpoints and improve error handling in the codebase.

### Detailed summary
- Updated logout endpoint in `General.tsx`
- Changed user authentication endpoint to `/v1/account/me`
- Removed `decodeJWT` function import
- Added `THIRDWEB_API_HOST` environment variable
- Improved error handling in `GET` function in `route.ts`

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

<!-- end pr-codex -->
2024-07-09 18:34:36 +00:00
joaquim-verges cebf6d4e89 fix(sdk): enforce legacy transactions on Vanar mainnet (#3639) 2024-07-09 18:15:43 +00:00
jnsdls 17701b69f0 [Feature] Add conditional page refresh on specific routes and integrate PayUI component (#3607)
<!-- start pr-codex -->

## PR-Codex overview
This PR updates components related to Pay analytics and configuration.

### Detailed summary
- Updated `usePayPurchases`, `usePayVolume`, `usePayNewCustomers`, and `usePayCustomers` hooks
- Refactored `PayUI` component in `dashboard/connect/pay/components/pay-ui.client.tsx`
- Added `getApiKeys` function in `dashboard/connect/pay/page.tsx`

> The following files were skipped due to too many changes: `apps/dashboard/src/app/(dashboard)/dashboard/connect/pay/page.tsx`

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

<!-- end pr-codex -->
2024-07-09 17:56:10 +00:00
gregfromstl e4d9963f2d chore(dashboard): remove nft checkout from api page (#3636)
<!-- start pr-codex -->

## PR-Codex overview
This PR removes the `checkout` service from `services.ts` and adjusts the `pay` service properties.

### Detailed summary
- Removed `checkout` service
- Adjusted properties of `pay` service

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

<!-- end pr-codex -->
2024-07-09 17:43:28 +00:00
joaquim-verges 02fff7d9e8 fix(thirdweb): loosen react native peer dep version restriction (#3637) 2024-07-09 17:36:29 +00:00
Manan TankandGitHub 4d24208099 Fix smart wallet connection not updating connection manager properly (#3634) 2024-07-09 21:34:52 +05:30
Jonas DanielsGitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
f8016071e2 Version Packages (#3612)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-07-09 19:34:41 +12:00
Joaquim VergesandGitHub 636fe40779 fix(storage): correct directory handling for mobile file uploads (#3633) 2024-07-09 19:21:00 +12:00
jnsdls a02d1111e0 [Refactor] Remove unused useConfirmEmbeddedWallet hook and clean up onboarding flow (#3632)
<!-- start pr-codex -->

## PR-Codex overview
The focus of this PR is to refactor authentication and onboarding flows, removing unused code and optimizing user creation and confirmation processes.

### Detailed summary
- Added user creation logic if user does not exist
- Removed `useConfirmEmbeddedWallet` hook
- Refactored onboarding flow and removed unused code
- Optimized handling of account confirmation and email verification

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

<!-- end pr-codex -->
2024-07-09 05:08:24 +00:00
jnsdls 9b2591cc21 [Feature] Add CustomPayEmbed component to pay page for chain integration (#3629)
<!-- start pr-codex -->

## PR-Codex overview
The focus of this PR is to add a custom payment embed component for a specific chain in the dashboard.

### Detailed summary
- Added `CustomPayEmbed` component in `pay-embed.client.tsx`
- Utilized `thirdwebClient` and `defineChain` for payment functionality
- Integrated theme handling and payment options for a specific chain

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

<!-- end pr-codex -->
2024-07-09 00:02:48 +00:00
jnsdls 3f0291def5 [Feature] Enhance login flow with loading spinner and redirect button (#3631) 2024-07-08 23:55:59 +00:00
MananTank 41b9a53e35 Fix search in Network selector (#3630)
<!-- start pr-codex -->

## PR-Codex overview
The focus of this PR is to fix the search functionality in the Network Selector screen by optimizing chain queries and improving user experience.

### Detailed summary
- Added `useChainsQuery` and `useChainQuery` functions for chain data retrieval
- Improved search functionality by optimizing chain queries and handling loading states
- Updated dependencies and imports for better code organization

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

<!-- end pr-codex -->
2024-07-08 22:35:37 +00:00
jnsdls 73105cc4ff [Feature] Extend useEcosystem hook and update Layout and Ecosystem components (#3604)
<!-- start pr-codex -->

## PR-Codex overview
The focus of this PR is to refactor ecosystem creation and management components in the dashboard.

### Detailed summary
- Refactored ecosystem creation components
- Updated ecosystem status handling
- Improved ecosystem selection functionality
- Reorganized ecosystem layout components

> The following files were skipped due to too many changes: `apps/dashboard/src/app/(dashboard)/dashboard/connect/ecosystem/[slug]/(active)/components/client/ecosystem-header.client.tsx`

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

<!-- end pr-codex -->
2024-07-08 22:05:45 +00:00
Joaquim VergesandGitHub 95c9d3d924 chore(sdk): export smart wallet and bundler utilities (#3622) 2024-07-09 08:34:53 +12:00
gregfromstl 325416ea19 feat(chain): add Blast chain definition and export (#3619)
### TL;DR

Added a new chain definition for the 'Blast' chain.

### What changed?

- Added a new file `blast.ts` in `chain-definitions`
- Defined the Blast chain with ID 81457, name 'Blast', and native currency 'Ether'.
- Added Blastscan as the block explorer with corresponding URL and API URL.
- Updated `chains.ts` to export the `blast` chain.

### How to test?

1. Verify that the `blast.ts` file exists in the `chain-definitions` directory.
2. Check that the chain ID, name, and native currency are correctly defined.
3. Ensure the block explorer details are accurate.
4. Confirm that `chains.ts` exports the `blast` chain.

### Why make this change?

This change adds support for the Blast chain, which may be required for upcoming features or integrations. Including it ensures that the system can recognize and interact with the Blast blockchain.

---

<!-- start pr-codex -->

---

## PR-Codex overview
This PR adds the `blast` chain preset to `thirdweb` package.

### Detailed summary
- Added `blast` chain definition in `blast.ts`
- Exported `blast` in `chains.ts` for use in `thirdweb` package

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

<!-- end pr-codex -->
2024-07-08 19:41:36 +00:00
gregfromstl 444ac06b10 fix(dashboard): update partner ID description in ecosystem partners section (#3620)
<!-- start pr-codex -->

## PR-Codex overview
The focus of this PR is to enhance the user guidance in the ecosystem-partners-section by adding a reminder to generate at least one partner ID for use in the app.

### Detailed summary
- Added a reminder to generate at least one partner ID for app usage.

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

<!-- end pr-codex -->
2024-07-08 19:27:42 +00:00
Manan TankandGitHub 5470dd9cf8 Pay UI improvements - Token amount rounding (#3621) 2024-07-09 00:38:42 +05:30
Jonas DanielsandGitHub 9b67df7d11 [Fix] Enhance error logging in login flow (#3617) 2024-07-08 15:32:23 +00:00
jnsdls 21aaec802f [Refactor] Improve MediaRenderer component and update token components (#3602)
<!-- start pr-codex -->

## PR-Codex overview
This PR enhances ERC20 functionality and token details display.

### Detailed summary
- Added `transferBatch()` extension to `erc20.ts`
- Updated `TokenDetails` component to include `chainId`
- Improved ERC20 contract handling in `useTxNotifications`
- Updated `TokenBurnButton` and `TokenAirdropButton` components to use V5 contract handling

> The following files were skipped due to too many changes: `apps/dashboard/src/contract-ui/tabs/tokens/components/airdrop-button.tsx`, `apps/dashboard/src/contract-ui/tabs/tokens/components/transfer-button.tsx`, `apps/dashboard/src/contract-ui/tabs/tokens/components/supply.tsx`, `apps/dashboard/src/contract-ui/tabs/tokens/components/airdrop-form.tsx`, `apps/dashboard/src/contract-ui/tabs/tokens/components/transfer-form.tsx`, `apps/dashboard/src/contract-ui/tabs/tokens/components/burn-form.tsx`

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

<!-- end pr-codex -->
2024-07-08 08:26:40 +00:00
Jonas DanielsandGitHub 230a49be7b [Fix] Add support for legacy TW_AUTH_TOKEN in useLoggedInUser hook (#3616) 2024-07-08 01:25:11 -07:00
Jonas DanielsandGitHub 36b6ef3e68 [Refactor] Update environment variable usage for THIRDWEB_API_HOST in login flow (#3615) 2024-07-08 00:47:41 -07:00
jnsdls 342d74efff api proxy (#3603)
<!-- start pr-codex -->

## PR-Codex overview
This PR focuses on enhancing JWT utils, updating API host paths, and optimizing user authentication handling.

### Detailed summary
- Export JWT utils, fix naming of `decodeJWT`
- Update API host paths to use relative paths
- Optimize user authentication handling in various components

> The following files were skipped due to too many changes: `apps/dashboard/src/app/(dashboard)/dashboard/connect/ecosystem/[slug]/(active)/hooks/use-delete-partner.ts`, `apps/dashboard/src/components/app-layouts/app.tsx`, `apps/dashboard/src/components/buttons/TransactionButton.tsx`, `apps/dashboard/src/pages/dashboard/settings/notifications.tsx`, `apps/dashboard/src/components/engine/overview/transaction-timeline.tsx`, `apps/dashboard/src/pages/dashboard/settings/devices.tsx`, `apps/dashboard/src/app/(dashboard)/dashboard/connect/ecosystem/[slug]/(active)/hooks/use-add-partner.ts`, `apps/dashboard/src/app/(dashboard)/dashboard/connect/ecosystem/[slug]/(active)/hooks/use-update-ecosystem.ts`, `apps/dashboard/src/app/(dashboard)/dashboard/connect/pay/page.tsx`, `apps/dashboard/src/pages/dashboard/engine/index.tsx`, `apps/dashboard/src/pages/dashboard/settings/billing.tsx`, `apps/dashboard/src/components/engine/engine-instances-table.tsx`, `apps/dashboard/src/pages/dashboard/settings/usage.tsx`, `apps/dashboard/src/pages/dashboard/settings/gas-credits.tsx`, `apps/dashboard/src/pages/dashboard/settings/api-keys/index.tsx`, `apps/dashboard/src/pages/api/server-proxy/api/[...paths].tsx`, `apps/dashboard/src/pages/dashboard/connect/analytics.tsx`, `apps/dashboard/src/components/storage/your-files.tsx`, `apps/dashboard/src/pages/api/server-proxy/pay/[...paths].tsx`, `apps/dashboard/src/components/engine/engine-list.tsx`, `apps/dashboard/src/components/pay/PayAnalytics/hooks/usePayVolume.ts`, `apps/dashboard/src/components/pay/PayAnalytics/hooks/usePayNewCustomers.ts`, `apps/dashboard/src/components/pay/PayAnalytics/hooks/usePayPurchases.ts`, `apps/dashboard/src/pages/dashboard/connect/in-app-wallets.tsx`, `apps/dashboard/src/middleware.ts`, `apps/dashboard/src/components/pay/PayAnalytics/hooks/usePayCustomers.ts`, `apps/dashboard/src/pages/dashboard/connect/account-abstraction.tsx`, `apps/dashboard/src/app/login/page.tsx`, `apps/dashboard/src/app/components/ThirdwebMiniLogo.tsx`, `apps/dashboard/src/app/api/auth/ensure-login/route.ts`, `apps/dashboard/src/app/login/auth-actions.ts`, `apps/dashboard/src/components/buttons/MismatchButton.tsx`, `apps/dashboard/src/@3rdweb-sdk/react/hooks/useLoggedInUser.ts`, `apps/dashboard/src/@3rdweb-sdk/react/components/connect-wallet/index.tsx`, `apps/dashboard/src/@3rdweb-sdk/react/hooks/useApi.ts`, `apps/dashboard/src/@3rdweb-sdk/react/hooks/useEngine.ts`

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

<!-- end pr-codex -->
2024-07-08 06:17:38 +00:00
gregfromstl d253bad72f feature(ts): adds verifyTypedData and verifyHash (#3613) 2024-07-08 04:18:01 +00:00
gregfromstl f6ff5a78fc feat(connect-modal): Integrate NFT support into connect modal (#3585)
This PR introduces the ability to add NFTs to the connect modal in the thirdweb package. By using the `supportedNFTs` configuration, users can customize which NFTs are shown in the 'View Funds' section within the details modal. This update includes modifications to several TypeScript files to support the new functionality, adjustments in the UI components to handle NFT displays, and updates to hooks and utility functions to fetch and display owned NFTs.

---

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to add support for NFTs in the connect modal and customize the NFTs shown in the "View Funds" screen.

### Detailed summary
- Added support for NFTs in the connect modal with `supportedNFTs`
- Customized NFTs shown in the "View Funds" screen with `supportedNFTs`
- Updated components and types to handle NFTs
- Added NFT customization examples in documentation

> The following files were skipped due to too many changes: `packages/thirdweb/src/react/web/ui/ConnectWallet/screens/ViewFunds.tsx`, `packages/thirdweb/src/react/web/ui/ConnectWallet/Details.tsx`, `packages/thirdweb/src/react/web/ui/ConnectWallet/screens/ViewNFTs.tsx`

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

<!-- end pr-codex -->
2024-07-05 06:06:20 +00:00
MananTank f103a902f3 Fix TransactionButton callbacks not called when sending tx from pay modal (#3611)
<!-- start pr-codex -->

## PR-Codex overview
This PR focuses on fixing Transaction Button callbacks not being called when a transaction is executed in the Pay Modal.

### Detailed summary
- Added `rejectTx` parameter with reason in `useSendTransaction.ts`
- Added `resolveTx` parameter in `useSendTransaction.ts`
- Updated `useSendTransaction` in `useSendTransaction.tsx` to handle `rejectTx` and `resolveTx`
- Added `onTxSent` callback in `TxModal` and `ExecutingTxScreen` to handle transaction data

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

<!-- end pr-codex -->
2024-07-05 05:19:20 +00:00
Jonas DanielsGitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>GitHub Action
0191e8dbad Version Packages (#3610)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: GitHub Action <[email protected]>
2024-07-05 16:48:57 +12:00
Manan TankandGitHub 2ab8b3ca78 reset selection data on wallet button click (no custom selection UI) (#3608) 2024-07-05 03:24:00 +00:00
gregfromstl 9faa8fc112 feat(auth): add ERC-6492 utilities and verification compatibility (#3609) 2024-07-05 01:46:21 +00:00
gregfromstl 34b9bbe77f fix(wallet): ensure disconnect events are emitted (#3597)
Introducing a patch in the `thirdweb` library to address wallet disconnect events. The main changes involve making the `onDisconnect` function asynchronous and ensuring that it correctly emits disconnect events. Affected files include `coinbaseWebSDK.ts` and `index.ts` in the `thirdweb/src/wallets` directory.

---

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on fixing wallet disconnect events not being emitted in the `thirdweb` package.

### Detailed summary
- Added `async` keyword to `onDisconnect` function in `injected/index.ts` and `coinbaseWebSDK.ts`
- Replaced `disconnect` with `onDisconnect` in `onConnect` functions in both files

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

<!-- end pr-codex -->
2024-07-05 01:30:32 +00:00
Jonas DanielsGitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
4b72c1174c Version Packages (#3606)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-07-04 21:39:31 +12:00
Joaquim VergesandGitHub c261921e55 fix(ui): resolve inapp wallet layout reset issue (#3605) 2024-07-04 21:27:00 +12:00
jnsdls 84e4d60752 [Fix] Remove outdated @ts-expect-error comments and update class usage (#3601) 2024-07-04 04:58:52 +00:00
Jonas DanielsGitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>GitHub Action
b34ac5f524 Version Packages (#3586)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: GitHub Action <[email protected]>
2024-07-04 16:10:22 +12:00
gregfromstl 059063f95f fix(dashboard): update and add tooltips in ecosystem form component (#3596) 2024-07-04 03:53:15 +00:00
Manan TankandGitHub e22b308fa7 Add Pay/Receive wallet Selector in Pay UI, Wallet switcher in Details Modal (#3591) 2024-07-04 03:28:04 +00:00
joaquim-verges e598f46422 fix(sdk): enforce legacy transactions on Vanguard chain (#3600) 2024-07-04 03:00:19 +00:00
jnsdls d2de83da66 [Refactor] Replace useApiAuthToken with useAccessToken (#3592)
<!-- start pr-codex -->

## PR-Codex overview
This PR enhances the `siwe_auth` functionality for better user authentication and access control.

### Detailed summary
- Renamed `ConnectWallet` component to `ConnectButton`
- Updated `useExtensionContractInfo` to use `useActiveAccount`
- Replaced `useApiAuthToken` with `useAccessToken` in multiple files
- Improved `useSiweAuth` with additional features and mutations
- Updated components to use `useAccessToken` for authentication
- Refactored `useLoggedInUser` to fetch user data efficiently

> The following files were skipped due to too many changes: `apps/dashboard/src/@3rdweb-sdk/react/hooks/useApi.ts`, `apps/dashboard/src/@3rdweb-sdk/react/components/connect-wallet/index.tsx`, `apps/dashboard/src/@3rdweb-sdk/react/hooks/useEngine.ts`

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

<!-- end pr-codex -->
2024-07-04 02:16:03 +00:00
joaquim-verges eac126bb14 fix(react-native): respect modal title and theme colors (#3599) 2024-07-04 01:45:44 +00:00
Joaquim VergesandGitHub e0f4e5a233 fix(ui): correct error handling in SendFundsForm component (#3593) 2024-07-04 12:52:39 +12:00
Manan TankandGitHub e5cccb9d70 Fix Send TX UI (#3598) 2024-07-04 12:51:24 +12:00
gregfromstl a6ed6e66da fix(dashboard): ecosystem images (#3594)
<!-- start pr-codex -->

## PR-Codex overview
This PR adds the `sizes`, `alt`, `fill`, and `unoptimized` attributes to the image in `ecosystem-header.client.tsx`.

### Detailed summary
- Added `sizes="100px"` attribute to the image
- Added `alt={ecosystem.name}` attribute
- Added `fill` attribute
- Added `unoptimized` attribute

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

<!-- end pr-codex -->
2024-07-03 22:25:23 +00:00
jnsdls 106c01356c [Fix] Update awaitTransaction and alignedTx nonce handling (#3590)
FIXES: DASH-58

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on fixing the `ethers5` adapter's `populateTransaction` method for `sendTransaction`.

### Detailed summary
- Updated `populateTransaction` method in `ethers5.ts` to fix `sendTransaction` functionality
- Adjusted `nonce` default value from -1 to 0 for better handling

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

<!-- end pr-codex -->
2024-07-03 19:37:09 +00:00
kumaryash90 687328aae9 Blockscout v2 contract verification (#3576)
## Problem solved

Short description of the bug fixed or feature added

## Changes made

- [ ] Public API changes: list the public API changes made if any
- [ ] Internal API changes: explain the internal logic changes

## How to test

- [ ] Automated tests: link to unit test file
- [ ] Manual tests: step by step instructions on how to test

## Contributor NFT

Paste in your wallet address below and we will airdrop you a special NFT when your pull request is merged.

```Address: ```

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on adding support for Blockscout v2 contract verification.

### Detailed summary
- Added `ExplorerType` enum for different explorer types
- Modified contract verifier to handle Blockscout v2 verification
- Updated verification functions to support different explorer types

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

<!-- end pr-codex -->
2024-07-03 18:18:53 +00:00
gregfromstl 073359698e fix(hooks): update useLoggedInUser to include address validation (#3589) 2024-07-03 17:36:38 +00:00
gregfromstl ca54aa71c2 fix(dashboard): update to use new THIRDWEB_API_HOST in dashboard ecosystem components (#3588)
### TL;DR

Replaced `process.env.NEXT_PUBLIC_THIRDWEB_API_HOST` with `THIRDWEB_API_HOST` constant for ecosystem wallet-related fetch calls.

### What changed?

1. Updated import statements to bring in the `THIRDWEB_API_HOST` constant.
2. Replaced instances of `${process.env.NEXT_PUBLIC_THIRDWEB_API_HOST}` with `${THIRDWEB_API_HOST}` in ecosystem wallet-related fetch calls.
3. Updated links in the main ecosystem page for better navigation.

### How to test?

1. Ensure all ecosystem wallet functionality (fetching list, creating, etc.) still works without errors.
2. Verify that the navigation links on the main ecosystem page point to the correct URLs.

### Why make this change?

To replace the use of environment variables with constants for better code maintainability and readability.

---
2024-07-03 16:44:25 +00:00
Kien NgoandGitHub ff6d15491e Hotfix: Update support form to use Connect v5 (#3587) 2024-07-03 15:18:59 +00:00
Joaquim VergesandGitHub 229561e1a7 feat(react-native): animated connect loading states (#3583) 2024-07-03 20:51:54 +12:00
Jonas DanielsGitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>GitHub Action
e739d550e9 Version Packages (#3578)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: GitHub Action <[email protected]>
2024-07-03 17:45:37 +12:00
gregfromstl 4353229a55 docs(ts): fix ecosystem wallet jsdocs (#3580)
## Problem solved

Short description of the bug fixed or feature added

## Changes made

- [ ] Public API changes: list the public API changes made if any
- [ ] Internal API changes: explain the internal logic changes

## How to test

- [ ] Automated tests: link to unit test file
- [ ] Manual tests: step by step instructions on how to test

## Contributor NFT

Paste in your wallet address below and we will airdrop you a special NFT when your pull request is merged.

```Address: ```

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to update the ecosystem wallet integration by replacing the `integratorId` parameter with `partnerId`.

### Detailed summary
- Replaced `integratorId` parameter with `partnerId` for connecting to a restricted ecosystem wallet with designated partner ID.
- Updated the code comments to reflect the change in parameter name.

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

<!-- end pr-codex -->
2024-07-03 02:14:50 +00:00
joaquim-verges 9651b96b96 feat: expose waitForUserOpReceipt helper function (#3582) 2024-07-03 02:09:23 +00:00
joaquim-verges 3c1734f639 fix: unit price conversion for ERC20 claimTo (#3581) 2024-07-03 00:43:53 +00:00
jnsdls 49ae575211 refactor: ConnectWallet v5 in dashboard (#3397)
### TL;DR

Rewrite `useAddress` function with `useActiveAccount` function across various components to streamline account state handling. Replace `useChainId` with `useActiveWalletChain` to manage chain IDs more accurately. Update various other functions to align with the `thirdweb/react` package changes.

### What changed?

1. Replaced `useAddress` with `useActiveAccount` in multiple components.
2. Replaced `useChainId` with `useActiveWalletChain` in multiple components.
3. Updated hook imports and usages to align with the `thirdweb/react` package updates.
4. Revisited and updated certain functionalities, including wallet connections, contract interactions, and UI updates for better efficiency.

### How to test?

1. Check if the `useActiveAccount` function accurately reflects the current active account state across different components.
2. Verify the `useActiveWalletChain` function is managing and reflecting the chain ID appropriately.
3. Test various functionalities including wallet connections and contract interactions to ensure they are working as expected after the hook changes.

### Why make this change?

To streamline account and chain state handling, leveraging the latest hooks from the `thirdweb/react` package for better modernity and efficiency in code maintenance and functionality.

---

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on improving loading performance for chains and updating to useActiveAccount instead of useAddress.

### Detailed summary
- Improved loading performance for chains
- Replaced `useAddress` with `useActiveAccount` in multiple components
- Updated `fetchAuthToken` function to remove promises from the map when done

> The following files were skipped due to too many changes: `apps/dashboard/src/pages/dashboard/settings/billing.tsx`, `apps/dashboard/src/contract-ui/tabs/tokens/components/burn-button.tsx`, `apps/dashboard/src/contract-ui/tabs/proposals/page.tsx`, `apps/dashboard/src/core-ui/nft-drawer/useNftDrawerTabs.tsx`, `apps/dashboard/src/contract-ui/tabs/tokens/components/transfer-button.tsx`, `apps/dashboard/src/contract-ui/tabs/tokens/components/burn-form.tsx`, `apps/dashboard/src/contract-ui/tabs/claim-conditions/components/claim-conditions-form/index.tsx`, `apps/dashboard/src/contract-ui/tabs/settings/components/royalties.tsx`, `packages/thirdweb/src/react/web/ui/components/ChainName.tsx`, `apps/dashboard/src/contract-ui/components/solidity-inputs/address-input.tsx`, `apps/dashboard/src/components/engine/contract-subscription/contract-subscriptions-table.tsx`, `apps/dashboard/src/contract-ui/tabs/listings/components/listing-drawer.tsx`, `apps/dashboard/src/contract-ui/tabs/tokens/components/airdrop-button.tsx`, `apps/dashboard/src/pages/api/moralis/balances.ts`, `apps/dashboard/src/contract-ui/tabs/tokens/components/mint-form.tsx`, `apps/dashboard/src/contract-ui/tabs/tokens/components/airdrop-form.tsx`, `apps/dashboard/src/components/contract-components/contract-deploy-form/index.tsx`, `apps/dashboard/src/contract-ui/tabs/shared-components/listing-drawer.tsx`, `apps/dashboard/src/contract-ui/tabs/settings/components/primary-sale.tsx`, `apps/dashboard/src/contract-ui/tabs/account-permissions/components/account-signer.tsx`, `apps/dashboard/src/pages/profile/[profileAddress].tsx`, `apps/dashboard/src/contract-ui/tabs/nfts/components/claim-form.tsx`, `apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/layout.tsx`, `apps/dashboard/src/components/onboarding/Steps.tsx`, `apps/dashboard/src/contract-ui/tabs/shared-components/list-button.tsx`, `apps/dashboard/src/contract-ui/components/primary-dashboard-button.tsx`, `packages/thirdweb/src/react/native/ui/components/ChainIcon.tsx`, `apps/dashboard/src/@3rdweb-sdk/react/hooks/useEngine.ts`, `apps/dashboard/src/contract-ui/tabs/nfts/components/mint-supply-tab.tsx`, `apps/dashboard/src/contract-ui/tabs/split/page.tsx`, `apps/dashboard/src/contract-ui/tabs/nfts/components/airdrop-tab.tsx`, `packages/thirdweb/src/react/web/ui/components/TokenIcon.tsx`, `apps/dashboard/src/contract-ui/tabs/nfts/components/claim-tab.tsx`, `packages/thirdweb/src/react/web/ui/components/token/TokenSymbol.tsx`, `apps/dashboard/src/pages/dashboard/contracts/deploy.tsx`, `apps/dashboard/src/components/contract-components/published-contract/index.tsx`, `apps/dashboard/src/contract-ui/tabs/english-auctions/components/table.tsx`, `apps/dashboard/src/pages/dashboard/contracts/publish.tsx`, `apps/dashboard/src/components/contract-components/contract-publish-form/index.tsx`, `apps/dashboard/src/app/(dashboard)/providers.tsx`, `apps/dashboard/src/components/engine/engine-instances-table.tsx`, `packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/swap/BuyTokenInput.tsx`, `packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/tx-history/TokenInfoRow.tsx`, `apps/dashboard/src/contract-ui/tabs/direct-listings/components/table.tsx`, `apps/dashboard/src/components/contract-tabs/code/ContractCode.tsx`, `apps/dashboard/src/components/cmd-k-search/index.tsx`, `apps/dashboard/src/contract-ui/tabs/nfts/components/mint-form.tsx`, `packages/thirdweb/src/react/native/ui/connect/SendScreen.tsx`, `apps/dashboard/src/contract-ui/tabs/settings/components/metadata.tsx`, `packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/swap/ConfirmationScreen.tsx`, `apps/dashboard/src/contract-ui/tabs/code/components/code-overview.tsx`, `apps/dashboard/src/@3rdweb-sdk/react/hooks/useRegistry.ts`, `apps/dashboard/src/contract-ui/tabs/settings/components/platform-fees.tsx`, `packages/thirdweb/src/chains/utils.ts`, `packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/tx-history/BuyTxHistory.tsx`, `packages/thirdweb/src/react/native/ui/connect/ConnectedModal.tsx`, `apps/dashboard/src/pages/dashboard/index.tsx`, `packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/swap/PayWithCrypto.tsx`, `packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatTxDetailsTable.tsx`, `apps/dashboard/src/contract-ui/tabs/overview/components/MarketplaceDetails.tsx`, `apps/dashboard/src/components/engine/overview/backend-wallets-table.tsx`, `packages/thirdweb/src/react/web/ui/ConnectWallet/screens/TokenSelector.tsx`, `apps/dashboard/src/@3rdweb-sdk/react/hooks/useVote.ts`, `packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/BuyScreen.tsx`, `apps/dashboard/src/components/ipfs-upload/dropzone.tsx`, `apps/dashboard/src/components/app-layouts/app.tsx`, `apps/dashboard/src/components/contract-components/import-contract/modal.tsx`, `apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/components/client/add-chain-to-wallet.tsx`, `apps/dashboard/src/components/wallets/PosthogIdentifier.tsx`, `apps/dashboard/src/@3rdweb-sdk/react/hooks/useContractRoles.ts`, `apps/dashboard/src/components/onboarding/index.tsx`, `packages/thirdweb/src/react/web/ui/ConnectWallet/Details.tsx`, `apps/dashboard/src/@3rdweb-sdk/react/hooks/useLoggedInUser.ts`, `apps/dashboard/src/components/selects/CustomChainRenderer.tsx`, `apps/dashboard/src/pages/cli/login.tsx`, `packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/tx-history/SwapDetailsScreen.tsx`, `packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatSteps.tsx`, `apps/dashboard/src/components/app-layouts/providers.tsx`, `apps/dashboard/src/components/buttons/TransactionButton.tsx`, `apps/dashboard/src/components/contract-components/hooks.ts`, `packages/thirdweb/src/react/core/hooks/others/useChainQuery.ts`, `apps/dashboard/src/components/buttons/MismatchButton.tsx`, `apps/dashboard/src/components/selects/NetworkSelectorButton.tsx`, `apps/dashboard/src/components/app-layouts/provider-setup.tsx`, `apps/dashboard/src/@3rdweb-sdk/react/components/connect-wallet/index.tsx`, `packages/thirdweb/src/react/web/ui/ConnectWallet/NetworkSelector.tsx`

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

<!-- end pr-codex -->
2024-07-02 21:57:22 +00:00
jnsdls f5b8afef5c [Fix] Remove IPFS replacement hack in ChainIcon component (#3579)
no longer needed
2024-07-02 21:44:10 +00:00
gregfromstl 4786c2da72 feature(dashboard): ecosystem wallets (#3537)
<!-- start pr-codex -->

## PR-Codex overview
This PR introduces new error classes, updates routing, adds UI components, and refactors styles in the dashboard app.

### Detailed summary
- Added `FetchError` class for errors in API fetch requests
- Updated routing for ecosystem permissions
- Added new UI components for alerts, dropdown menus, and tabs
- Refactored global CSS styles for colors and backgrounds
- Updated ecosystem and partner types
- Refactored layout and input components
- Added hooks for fetching partners and ecosystem status
- Added pages for payment failure and ecosystem creation status
- Updated user authentication hook for better handling of connection status

> The following files were skipped due to too many changes: `apps/dashboard/src/@3rdweb-sdk/react/hooks/useLoggedInUser.ts`, `apps/dashboard/src/app/(dashboard)/dashboard/connect/ecosystem/[slug]/(active)/hooks/use-ecosystem.ts`, `apps/dashboard/src/app/(dashboard)/dashboard/connect/ecosystem/hooks/use-ecosystem-list.ts`, `apps/dashboard/src/app/components/Header/DashboardHeader.tsx`, `apps/dashboard/src/app/(dashboard)/dashboard/connect/ecosystem/[slug]/(active)/layout.tsx`, `apps/dashboard/src/app/(dashboard)/dashboard/components/sidebar/sidebar.client.tsx`, `apps/dashboard/src/@/components/ui/form.tsx`, `apps/dashboard/src/@/components/ui/ConfirmationDialog.tsx`, `apps/dashboard/src/app/components/DashboardFooter.tsx`, `apps/dashboard/src/app/(dashboard)/dashboard/connect/ecosystem/[slug]/(active)/hooks/use-delete-partner.ts`, `apps/dashboard/src/@/components/ui/image-upload.tsx`, `apps/dashboard/src/app/(dashboard)/dashboard/connect/ecosystem/[slug]/(active)/hooks/use-update-ecosystem.ts`, `apps/dashboard/src/app/(dashboard)/dashboard/connect/ecosystem/create/page.tsx`, `apps/dashboard/src/app/(dashboard)/(chain)/chainlist/components/server/chainlist-card.tsx`, `apps/dashboard/src/app/(dashboard)/dashboard/connect/ecosystem/create/hooks/use-create-ecosystem.ts`, `apps/dashboard/src/@/components/ui/radio-group.tsx`, `apps/dashboard/src/app/(dashboard)/dashboard/connect/ecosystem/[slug]/(active)/hooks/use-add-partner.ts`, `apps/dashboard/src/app/(dashboard)/(chain)/chainlist/components/client/filters.tsx`, `apps/dashboard/src/app/(dashboard)/dashboard/connect/ecosystem/[slug]/(active)/components/client/integration-permissions-toggle.client.tsx`, `apps/dashboard/src/app/(dashboard)/dashboard/connect/ecosystem/[slug]/(active)/components/client/ecosystem-header.client.tsx`, `apps/dashboard/src/app/(dashboard)/dashboard/connect/ecosystem/page.tsx`, `apps/dashboard/src/app/(dashboard)/dashboard/connect/ecosystem/[slug]/(active)/components/server/partners-table.tsx`, `apps/dashboard/src/@/components/ui/alert-dialog.tsx`, `apps/dashboard/src/app/(dashboard)/dashboard/connect/ecosystem/create/components/client/create-ecosystem-form.client.tsx`, `apps/dashboard/src/app/(dashboard)/dashboard/connect/ecosystem/[slug]/(active)/components/client/add-partner-form.client.tsx`, `apps/dashboard/src/@/components/ui/dropdown-menu.tsx`, `pnpm-lock.yaml`

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

<!-- end pr-codex -->
2024-07-02 21:17:53 +00:00
gregfromstl 6b919e1385 feature(react): show ecosystem wallet branding regardless of modal size (#3577)
<!-- start pr-codex -->

## PR-Codex overview
This PR focuses on displaying ecosystem wallet branding in a wide modal layout.

### Detailed summary
- Display ecosystem wallet branding in wide modal layout
- Updated `EcosystemWalletFormUI.tsx` to show wallet header in all layouts

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

<!-- end pr-codex -->
2024-07-02 20:58:52 +00:00
Jonas DanielsandGitHub 2b5ee62b2b Version Packages (#3571) 2024-07-02 11:37:11 -07:00
Manan TankandGitHub 59531310d9 Reset selection data on wallet selection (#3575) 2024-07-02 15:58:00 +00:00
joaquim-verges 9516259245 fix(react-native): ensure onClose is called on successful wallet connection in ConnectModal (#3573) 2024-07-02 15:13:22 +00:00
MananTank f526d733d0 Fix inApp wallet connection screen on compact modal (#3574)
<!-- start pr-codex -->

## PR-Codex overview
This PR focuses on fixing issues related to the inApp wallet connection flow in the Compact size Connect UI.

### Detailed summary
- Fixed broken inApp wallet connection flow
- Added missing back button in inApp wallet connection flow
- Updated handling of going back to main screen in wallet UI components

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

<!-- end pr-codex -->
2024-07-02 15:07:24 +00:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
931cca3a7e build(deps): bump viem from 2.16.4 to 2.16.5 (#3567)
Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-01 22:49:57 -07:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
20d4c90b54 build(deps-dev): bump @swc/core from 1.6.5 to 1.6.6 (#3566)
Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-01 22:49:47 -07:00
edwardysun e5f772dd5c Support localhost in Pay domains (#3569)
## Problem solved

Use "http://" if localhost domain used for thirdweb Pay

<!-- start pr-codex -->

---

## PR-Codex overview
This PR adds support for using localhost as a domain override option for the Pay service.

### Detailed summary
- Added support for localhost as a domain override option for the Pay service in `definitions.ts`
- Updated all endpoint URLs to use the `getPayBaseUrl()` function instead of directly fetching the domain from `getThirdwebDomains().pay`

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

<!-- end pr-codex -->
2024-07-02 05:13:20 +00:00
jnsdls 373ce19286 fix lockfile (#3572) 2024-07-02 04:49:24 +00:00
joaquim-verges 1a2e056329 feat(react native): add Skeleton loading state across components (#3570) 2024-07-02 03:58:23 +00:00
joaquim-verges 0077d38c65 feat: Connect components in React Native [part 1] (#3246)
<!-- start pr-codex -->

## PR-Codex overview
This PR focuses on refactoring, updating dependencies, and improving code organization.

### Detailed summary
- Updated dependencies and file paths
- Refactored wallet-related functions
- Added default wallets for various chains
- Updated UI components and design system configurations

> The following files were skipped due to too many changes: `packages/thirdweb/src/react/web/wallets/shared/OTPLoginUI.tsx`, `packages/thirdweb/src/react/web/ui/ConnectWallet/WalletSelector.tsx`, `packages/thirdweb/src/react/web/wallets/shared/SocialLogin.tsx`, `packages/thirdweb/src/react/native/ui/components/TokenIcon.tsx`, `packages/thirdweb/src/react/web/wallets/shared/PassKeyLogin.tsx`, `packages/thirdweb/src/react/web/ui/PayEmbed.tsx`, `packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatSteps.tsx`, `packages/thirdweb/src/react/web/ui/ConnectWallet/Modal/SmartWalletConnectUI.tsx`, `packages/thirdweb/src/react/web/ui/ConnectWallet/screens/TokenSelector.tsx`, `packages/thirdweb/src/react/web/ui/ConnectWallet/screens/ViewFunds.tsx`, `packages/thirdweb/src/react/web/ui/ConnectWallet/screens/SignatureScreen.tsx`, `packages/thirdweb/src/react/web/ui/components/WalletImage.tsx`, `packages/thirdweb/src/react/web/ui/ConnectWallet/Modal/AnyWalletConnectUI.tsx`, `packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/swap/PayWithCrypto.tsx`, `packages/thirdweb/src/react/native/ui/connect/ErrorView.tsx`, `packages/thirdweb/src/react/web/hooks/transaction/useSendTransaction.tsx`, `packages/thirdweb/src/react/native/ui/connect/SuccessView.tsx`, `packages/react-native-adapter/README.md`, `packages/thirdweb/src/react/native/ui/components/text.tsx`, `packages/thirdweb/src/react/native/ui/components/ChainIcon.tsx`, `packages/thirdweb/src/react/web/ui/ConnectWallet/ConnectButton.tsx`, `packages/thirdweb/src/wallets/manager/index.ts`, `packages/thirdweb/src/react/web/wallets/shared/ConnectWalletSocialOptions.tsx`, `packages/thirdweb/src/react/native/ui/components/Address.tsx`, `packages/thirdweb/src/react/web/hooks/wallets/useAutoConnect.ts`, `packages/thirdweb/src/react/native/ui/components/RNImage.tsx`, `packages/thirdweb/src/exports/react.native.ts`, `packages/thirdweb/src/react/web/ui/ConnectWallet/ConnectButtonProps.ts`, `packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/BuyScreen.tsx`, `packages/thirdweb/src/react/native/ui/components/Header.tsx`, `packages/thirdweb/src/react/web/ui/ConnectWallet/defaultTokens.ts`, `packages/thirdweb/src/react/native/ui/connect/ReceiveScreen.tsx`, `packages/thirdweb/src/react/native/ui/components/button.tsx`, `packages/thirdweb/src/exports/react.ts`, `packages/thirdweb/src/react/native/ui/components/WalletImage.tsx`, `packages/thirdweb/src/react/native/ui/connect/ConnectedButton.tsx`, `packages/thirdweb/src/react/core/hooks/wallets/useSendToken.ts`, `packages/thirdweb/src/react/web/ui/ConnectWallet/screens/SendFunds.tsx`, `packages/thirdweb/src/react/native/ui/components/input.tsx`, `packages/thirdweb/src/react/core/utils/wallet.ts`, `packages/thirdweb/src/react/web/ui/components/ChainIcon.tsx`, `packages/thirdweb/src/react/native/ui/connect/ExternalWalletsList.tsx`, `packages/thirdweb/package.json`, `packages/thirdweb/src/react/native/ui/connect/TokenListScreen.tsx`, `packages/thirdweb/src/react/native/ui/connect/ConnectButton.tsx`, `packages/thirdweb/src/react/native/ui/connect/SendScreen.tsx`, `packages/thirdweb/src/react/web/ui/ConnectWallet/Details.tsx`, `packages/thirdweb/src/react/native/ui/connect/ConnectModal.tsx`, `packages/thirdweb/src/react/native/ui/connect/InAppWalletUI.tsx`, `packages/thirdweb/src/react/core/hooks/connection/ConnectEmbedProps.ts`, `packages/thirdweb/src/react/native/ui/connect/ConnectedModal.tsx`, `packages/thirdweb/src/react/web/ui/ConnectWallet/Modal/ConnectEmbed.tsx`, `packages/thirdweb/src/react/web/ui/ConnectWallet/icons/dataUris.ts`, `packages/thirdweb/src/react/native/ui/icons/svgs.ts`, `pnpm-lock.yaml`

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

<!-- end pr-codex -->
2024-07-02 02:01:48 +00:00
Jonas DanielsGitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>GitHub Action
53aa8674b4 Version Packages (#3555)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: GitHub Action <[email protected]>
2024-07-02 13:59:25 +12:00
gregfromstl 98a9e226fa fix(ts): import of coinbase sdk in vite (#3562)
### TL;DR

Corrected the import handling for CoinbaseWalletSDK in the coinbaseWebSDK.ts file.

### What changed?

The import statement for CoinbaseWalletSDK was modified to handle cases where the import does not return a default function directly.

### How to test?

- Verify the Coinbase wallet integration in the application.
- Ensure that different environments (e.g., development, production) can import and utilize the CoinbaseWalletSDK without errors.

### Why make this change?

This change ensures that the CoinbaseWalletSDK import is handled correctly, thereby preventing potential import errors that could occur in various environments.

---

<!-- start pr-codex -->

---

## PR-Codex overview
This PR fixes coinbase wallet connections on Vite by addressing import errors related to `CoinbaseWalletSDK`.

### Detailed summary
- Fixed import error for `CoinbaseWalletSDK` on Vite
- Added workaround for Vite dev import issues
- Ensured proper initialization of `CoinbaseWalletSDK` to connect coinbase wallet

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

<!-- end pr-codex -->
2024-07-01 22:05:33 +00:00
kien-ngo a1d6a3c93e Add announcement for Onchain Olympics (#3568)
<!-- start pr-codex -->

## PR-Codex overview
The focus of this PR is to update the AnnouncementBanner component with a new link and label for the Onchain Olympics event, along with revised text content.

### Detailed summary
- Updated link `href` to "https://onchainolympics.com"
- Updated `label` to "onchain-olympics"
- Revised text content to promote the Onchain Olympics event and NFT minting.

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

<!-- end pr-codex -->
2024-07-01 21:42:49 +00:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
6c0edcd673 build(deps): bump @radix-ui/react-focus-scope from 1.0.4 to 1.1.0 (#3564)
Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-01 14:41:54 -07:00
kien-ngo 3bee20d545 Fix playground docs link (#3561)
<!-- start pr-codex -->

## PR-Codex overview
This PR updates the link in the sign-in page to direct users to the new "overview" section instead of the main sign-in page.

### Detailed summary
- Updated the link `href` in the sign-in page to navigate to the "overview" section instead of the main sign-in page.

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

<!-- end pr-codex -->
2024-07-01 15:30:00 +00:00
Joaquim VergesandGitHub 6e24b3f0f5 fix: add missing sendTransaction import in multiple files to ensure proper transaction handling (#3559) 2024-07-01 20:35:52 +12:00
gregfromstl 54c1789330 fix(utils): correct filter condition for recommended wallets (#3558)
## Problem solved

Recommended wallets were being compared for object equality when sorting, which caused confusion when using inline `createWallet` to set the recommended wallets. This PR updates sorting to compare the recommended wallets by ID (installed providers already work this way)
2024-07-01 01:33:08 +00:00
jnsdls cbb0bc2835 [Fix] Update package dependencies and improve import paths (#3554)
This pull request updates package.json dependencies to specific versions across multiple packages, moving from using caret (^) to specific version numbers for consistency and to prevent unwanted updates. Additionally, it includes changes to various TypeScript files, primarily adding the ESLint directive `@typescript-eslint/no-unused-vars` to suppress warnings for unused variables.

---

<!-- start pr-codex -->

---

## PR-Codex overview
This PR updates dependencies, adds styled components, and disables eslint for unused vars in various React components.

### Detailed summary
- Updated dependencies in multiple package.json files
- Added styled components for DialogContent, Overlay, DropContainer, QRPlaceholder, and more
- Disabled eslint for unused vars in React components
- Updated next.config.mjs in playground-web
- Updated pnpm-workspace.yaml
- Added eslint and styled components in wallets package.json
- Updated dependencies in wallet-ui package.json

> The following files were skipped due to too many changes: `apps/playground-web/src/components/blockchain-api/write-contract-extension.tsx`, `legacy_packages/react/src/wallet/ConnectWallet/NetworkSelector.tsx`, `apps/playground-web/package.json`, `legacy_packages/react/package.json`, `apps/playground-web/src/components/blockchain-api/write-contract-raw.tsx`, `package.json`, `apps/dashboard/package.json`, `pnpm-lock.yaml`

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

<!-- end pr-codex -->
2024-06-30 00:06:16 +00:00
gregfromstlandgregfromstl 80b9cd967c chore(tests): update tests to use sendAndConfirmTransaction method (#3548)
This pull request updates the function names and constants used in the deploy-modular-core.test.ts file. Specific changes include:

- Replacing `ADDRESS_ZERO` with `ZERO_ADDRESS` to align with existing codebase conventions.
- Changing `sendTransaction` to `sendAndConfirmTransaction` to include transaction confirmation within the test cases.

### TL;DR

Updated function names and constants in the deploy-modular-core.test.ts for better alignment with the codebase.

### What changed?

- Replaced `ADDRESS_ZERO` with `ZERO_ADDRESS`.
- Replaced `sendTransaction` with `sendAndConfirmTransaction`.

### How to test?

Run the updated tests in deploy-modular-core.test.ts to ensure all changes work as expected.

### Why make this change?

These changes improve the code readability and follow naming conventions already established in the codebase. By including transaction confirmation, the tests are more robust and reliable.

---
2024-06-28 20:49:55 -07:00
Jonas DanielsandGitHub cddd0ca302 Version Packages (#3530) 2024-06-28 19:57:12 -07:00
Jonas Daniels 8bfba81d2e Create poor-dragons-eat.md
Signed-off-by: Jonas Daniels <[email protected]>
2024-06-28 19:28:46 -07:00
Jonas Daniels 9250ac5b44 Update packages/thirdweb/src/chains/chain-definitions/linea-sepolia.ts
Signed-off-by: Jonas Daniels <[email protected]>
2024-06-28 19:28:46 -07:00
maciekzygmuntandJonas Daniels 5f7e9545ce add exports 2024-06-28 19:28:46 -07:00
Maciej ZygmuntandJonas Daniels 439976b7a6 add linea chain configs 2024-06-28 19:28:46 -07:00
jnsdls b6ab038802 Update Dependencies (#3551)
<!-- start pr-codex -->

## PR-Codex overview
This PR updates various dependencies across different packages to their latest versions.

### Detailed summary
- Updated `webpack` to `5.92.1`
- Updated `@types/node` to `20.14.9`
- Updated `@microsoft/api-documenter` to `^7.25.4`
- Updated `abitype` to `1.0.5`
- Updated `@babel/preset-react` to `^7.24.7`
- Updated `eslint-config-turbo` to `2.0.6`
- Updated `@typescript-eslint/eslint-plugin` to `7.14.1`
- Updated `viem` to `2.16.4`
- Updated various other dependencies across packages

> The following files were skipped due to too many changes: `apps/dashboard/package.json`, `packages/thirdweb/package.json`, `pnpm-lock.yaml`

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

<!-- end pr-codex -->
2024-06-29 02:14:34 +00:00
gregfromstl 31775dc1dc feature(ts): unpin files from ipfs (#3552)
<!-- start pr-codex -->

## PR-Codex overview
This PR adds a new `unpin` function to `thirdweb` package for unpinning files from IPFS.

### Detailed summary
- Added `unpin` function to unpin files from IPFS in `thirdweb` package
- Defined `UnpinOptions` type for specifying client and CID
- Implemented unpin logic with error handling and authorization check

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

<!-- end pr-codex -->
2024-06-29 01:34:02 +00:00
jnsdls 32d1838d6a [Chore] Update Foundry version to nightly-c4a984fbf2c48b793c8cd53af84f56009dd1070c in CI workflow (#3553) 2024-06-29 01:13:24 +00:00
jnsdls 049a91a52a [Chore] Bump turbo from 2.0.5 to 2.0.6 (#3550) 2024-06-29 00:01:38 +00:00
gregfromstl 31d8b830f2 chore(wallet-ui): initialize project (#3477)
<!-- start pr-codex -->

## PR-Codex overview
This PR focuses on adding Thirdweb Wallet UI to the project, configuring Next.js, Tailwind CSS, and PostCSS, setting up Biome, and defining TypeScript settings.

### Detailed summary
- Added Thirdweb Wallet UI
- Configured Next.js, Tailwind CSS, and PostCSS
- Set up Biome configuration
- Defined TypeScript settings for Wallet UI
- Added global CSS styles for the app
- Updated dependencies and scripts in package.json

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

<!-- end pr-codex -->
2024-06-28 23:42:02 +00:00
MananTank be9118a04f [dashboard] Add copy button for chain id (#3538)
<!-- start pr-codex -->

## PR-Codex overview
The focus of this PR is to add a `CopyTextButton` component with copy functionality and icon positioning to enable copying text in various components.

### Detailed summary
- Added `CopyTextButton` component for copying text with icon positioning
- Implemented `CopyTextButton` in multiple files for copying chain IDs and addresses
- Updated components to include the new `CopyTextButton` for better user experience

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

<!-- end pr-codex -->
2024-06-28 23:24:24 +00:00
jnsdls 3ffad1a5a6 [Fix] Update import paths in engine-explorer and _app.tsx for better modularity (#3547)
### TL;DR

Corrected stylesheet imports for `swagger-ui.css` in the Engine Explorer component and added the Toaster component import in the _app.tsx.

### What changed?

- Added missing `swagger-ui.css` import in `engine-explorer.tsx`
- Removed duplicate `swagger-ui.css` import from `_app.tsx`
- Ensured Toaster component import in `_app.tsx`

### How to test?

- Verify UI for the Engine Explorer relies on the correct styles
- Ensure the Toaster component renders correctly without issues

### Why make this change?

To ensure the correct CSS styles are applied and to improve the maintainability of the import statements.

---

<!-- start pr-codex -->

---

## PR-Codex overview
This PR adds `swagger-ui.css` to `engine-explorer.tsx` and removes it from `_app.tsx`.

### Detailed summary
- Added `swagger-ui.css` import to `engine-explorer.tsx`
- Removed `swagger-ui.css` import from `_app.tsx`

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

<!-- end pr-codex -->
2024-06-28 23:06:04 +00:00
jnsdls 37d9373cf2 [Feature] Update dependencies and add new form and toaster components (#3546)
### TL;DR

This PR introduces new form components and integrates Sonner for toast notifications, along with various enhancements and fixes.

### What changed?

- Added new form components (`Form`, `FormField`, `FormLabel`, etc.) to the `ui` directory.
- Integrated `sonner` for toast notifications, adding a `Toaster` component.
- Migrated `pay.tsx` to the App Router and refactored its structure.
- Updated `DashboardHeader` and `DashboardLayout` for consistent spacing and padding.
- Refactored existing API key components and updated styles for better alignment and responsiveness.
- Fixed layout issues in `PayConfig` and other related components.

### How to test?

1. Navigate to the Dashboard and ensure the form components are rendering correctly.
2. Interact with forms and verify validation and error messages display as expected.
3. Trigger actions that would show toast notifications and ensure they are styled and positioned correctly.
4. Check the `PayConfig` and API key management sections for any UI regressions or inconsistencies.

### Why make this change?

- To enhance the user experience with improved form components and toast notifications.
- To maintain consistency in layout and design across the Dashboard.
- To address layout and spacing issues reported in the Pay section and other related components.

---

<!-- start pr-codex -->

---

## PR-Codex overview
This PR updates the layout, components, and dependencies in the dashboard app.

### Detailed summary
- Updated layout styles in `layout.tsx` and `DashboardHeader.tsx`
- Added `Toaster` component in `layout.tsx`
- Updated `sonner` package to version `1.5.0`
- Refactored components in `ConnectWalletPrompt.tsx` and `NoApiKeys.tsx`
- Implemented a new `Toaster` component in `sonner.tsx`
- Added new components and refactored UI in `Menu.tsx` and `ApiKeys/NoApiKeys.tsx`
- Updated page structure in `connect/pay.tsx`

> The following files were skipped due to too many changes: `apps/dashboard/src/@/components/ui/form.tsx`, `apps/dashboard/src/components/pay/PayConfig.tsx`

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

<!-- end pr-codex -->
2024-06-28 23:06:02 +00:00
gregfromstl 27daf22010 fix(ts): prepare incoming walletconnect transactions (#3541)
Adding thirdwebClient to createWalletConnectClient and fulfillRequest functions to ensure proper transaction execution through WalletConnect. This update includes a refactor of handleSendTransactionRequest to utilize the new client and various other related changes for consistency.

---

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on fixing in-app wallet transaction execution via WalletConnect by introducing `thirdwebClient` and updating related functions.

### Detailed summary
- Introduced `thirdwebClient` to handle WalletConnect transactions
- Updated functions to include `thirdwebClient` parameter
- Added tests using `TEST_CLIENT` for `thirdwebClient` integration

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

<!-- end pr-codex -->
2024-06-28 22:46:53 +00:00
gregfromstl 7e242602e9 fix(wallet): handle errors when connecting with open access ecosystem (#3545)
<!-- start pr-codex -->

## PR-Codex overview
This PR focuses on fixing errors related to connecting with an open access ecosystem by updating permissions logic in the `in-app-account.ts` file.

### Detailed summary
- Updated permissions logic to include partnerId check for ecosystem connectivity.

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

<!-- end pr-codex -->
2024-06-28 22:18:35 +00:00
gregfromstl 85f2f6d2bd fix(ts): properly disconnect wallet connect (#3539)
<!-- start pr-codex -->

## PR-Codex overview
This PR focuses on fixing WalletConnect client disconnections and improving error handling.

### Detailed summary
- Added a delay in testing for WalletConnect client disconnections
- Updated the `onDisconnect` function in `WalletConnectReceiverScreen.tsx` to handle loading state and query invalidation
- Improved error handling in `wallet-connect/receiver/index.ts` by catching errors during disconnect
- Added a function to remove sessions in `disconnectWalletConnectSession`
- Updated `disconnectWalletConnectSession` to handle errors gracefully

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

<!-- end pr-codex -->
2024-06-28 21:50:37 +00:00
gregfromstl 6704fa8870 fix(mint): add ability to override transaction properties in mintTo functions (#3543)
This pull request introduces a minor update to the thirdweb library, specifically adding the feature to override transaction properties in the `mintTo` functions for ERC1155, ERC20, and ERC721 tokens. Additionally, it refines the ENS avatar resolution tests by removing an offchain record test that relies on a secret key, improving overall test reliability.

---
2024-06-28 21:02:33 +00:00
jnsdls d2c1038845 [Feature] Add new Dashboard sidebar components and ecosystem wallets link (#3531)
<!-- start pr-codex -->

## PR-Codex overview
This PR updates the dashboard layout and styling, adds Ecosystem Wallet features, and refactors navigation components.

### Detailed summary
- Added "Ecosystem Wallets" section to dashboard sidebar
- Updated button styles in UI components
- Implemented Ecosystem Wallet page with alerts and buttons
- Refactored navigation components for better usability

> The following files were skipped due to too many changes: `apps/dashboard/src/app/(dashboard)/dashboard/components/sidebar/sidebar.client.tsx`

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

<!-- end pr-codex -->
2024-06-28 20:20:14 +00:00
gregfromstl 517ecff0b2 fix(sepolia): rename Sepolia native currency symbol to ETH (#3542) 2024-06-28 20:15:10 +00:00
gregfromstl cf2d1b8df3 feat(utils): add shortenHex function to utils for shortening hexadecimal strings (#3534) 2024-06-28 00:35:21 +00:00
gregfromstl e4b6391cb3 fix(transaction): export StoredTransaction type from transaction-store.js (#3533)
### TL;DR

This pull request modifies the `transaction-store.ts` module by exporting the type `StoredTransaction`, making it available for external use.

### What changed?

- The type `StoredTransaction` was exported from `transaction-store.ts`
- Updated the export statement for `StoredTransaction` in `transaction.ts`

### How to test?

1. Ensure that the module `transaction-store.ts` exports the type `StoredTransaction`.
2. Verify that importing `StoredTransaction` from the module works correctly in another file.

### Why make this change?

This change was made to facilitate the external utilization of the `StoredTransaction` type.

---

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to add a `StoredTransaction` type to the `thirdweb` package.

### Detailed summary
- Added `StoredTransaction` type to `transaction-store.ts`
- Exported `StoredTransaction` type in `transaction.ts`

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

<!-- end pr-codex -->
2024-06-28 00:29:52 +00:00
arcoraven 07ec487320 fix: bigint crash on tooltip (#3532)
## Problem solved

Fix error: "Do not know how to serialize bigint" by casting bigint to number when used as a string.

<!-- start pr-codex -->

---

## PR-Codex overview
This PR updates the README file to provide instructions for starting a local dev server and modifies a query key in a TypeScript file for improved functionality.

### Detailed summary
- Updated README.md to include instructions for starting a local dev server
- Modified query key in contract-subscriptions-table.tsx for better functionality

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

<!-- end pr-codex -->
2024-06-27 22:29:12 +00:00
gregfromstl 18c3d3be9f fix(react): remove problematic console errors (#3529)
These console.error logs don't represent an actual error state, and trigger error monitoring services for users
2024-06-27 19:06:27 +00:00
4078 changed files with 189893 additions and 56553 deletions
+2
View File
@@ -19,6 +19,8 @@
"runtimes-node-module",
"playground-web",
"thirdweb-dashboard",
"wallet-ui",
"portal",
"@thirdweb-dev/auth",
"@thirdweb-dev/chains",
"@thirdweb-dev/cli",
+37 -34
View File
@@ -1,53 +1,56 @@
# Order is important; the last matching pattern takes the most precedence.
# Platform team owns everything by default
# default ownership group
- @jnsdls @joaquim-verges @MananTank @gregfromstl
# legacy packages
legacy_packages/auth/ @jnsdls
legacy_packages/chains/ @jnsdls
legacy_packages/cli/ @jnsdls
legacy_packages/contracts-js/ @jnsdls
legacy_packages/crypto/ @jnsdls
legacy_packages/generated-abis/ @jnsdls
legacy_packages/merkletree/ @jnsdls
legacy_packages/pay/ @jnsdls
legacy_packages/payments/ @jnsdls
legacy_packages/react/ @MananTank @jnsdls
legacy_packages/react-core/ @MananTank @jnsdls
legacy_packages/react-native/ @jnsdls
legacy_packages/react-native-compat/ @jnsdls
legacy_packages/auth/ @jnsdls @joaquim-verges
legacy_packages/chains/ @jnsdls @joaquim-verges
legacy_packages/cli/ @jnsdls @joaquim-verges
legacy_packages/contracts-js/ @jnsdls @joaquim-verges
legacy_packages/crypto/ @jnsdls @joaquim-verges
legacy_packages/generated-abis/ @jnsdls @joaquim-verges
legacy_packages/merkletree/ @jnsdls @joaquim-verges
legacy_packages/pay/ @jnsdls @joaquim-verges
legacy_packages/payments/ @jnsdls @joaquim-verges
legacy_packages/react/ @MananTank @jnsdls @joaquim-verges
legacy_packages/react-core/ @MananTank @jnsdls @joaquim-verges
legacy_packages/react-native/ @jnsdls @joaquim-verges
legacy_packages/react-native-compat/ @jnsdls @joaquim-verges
legacy_packages/sdk/ @joaquim-verges @jnsdls
legacy_packages/storage/ @jnsdls
legacy_packages/wallets/ @MananTank @jnsdls
legacy_packages/storage/ @jnsdls @joaquim-verges
legacy_packages/wallets/ @MananTank @jnsdls @joaquim-verges
# legacy e2e
legacy_e2e/ @jnsdls
# packages
packages/thirdweb/ @joaquim-verges @gregfromstl @jnsdls
## specific thirdweb pieces
packages/thirdweb/src/react/ @joaquim-verges @gregfromstl @MananTank @jnsdls
packages/thirdweb/src/reactive/ @joaquim-verges @gregfromstl @MananTank @jnsdls
packages/thirdweb/src/gas/ @joaquim-verges @jnsdls
packages/thirdweb/src/pay/ @joaquim-verges @gregfromstl @MananTank @jnsdls
packages/typedoc-gen/ @MananTank @jnsdls @joaquim-verges
packages/service-utils/ @arcoraven @jnsdls @joaquim-verges
packages/eslint-config-thirdweb/ @jnsdls @joaquim-verges
packages/tw-tsconfig/ @jnsdls @joaquim-verges
packages/unity-js-bridge/ @joaquim-verges @0xFirekeeper @jnsdls
packages/thirdweb/src/react/ @MananTank
packages/thirdweb/src/reactive/ @MananTank
packages/thirdweb/src/gas/ @joaquim-verges
packages/thirdweb/src/pay/ @MananTank @IDubuque
packages/typedoc-gen/ @MananTank
# owned by phil for now
packages/service-utils/ @arcoraven
packages/eslint-config-thirdweb/ @jnsdls
packages/tw-tsconfig/ @jnsdls
packages/unity-js-bridge/ @joaquim-verges @0xFirekeeper
# apps
apps/ @jnsdls @joaquim-verges
apps/dashboard/ @jnsdls @MananTank @joaquim-verges
apps/playground-web/ @joaquim-verges @gregfromstl @jnsdls @joaquim-verges
apps/wallet-ui/ @gregfromstl @jnsdls @joaquim-verges @MananTank
apps/portal/ @gregfromstl @jnsdls @joaquim-verges @MananTank
# .github folder + .changeset + turbo config is owned by jonas for now
scripts/ @jnsdls @joaquim-verges
.github/ @jnsdls @joaquim-verges
.changeset/config.json @jnsdls @joaquim-verges
turbo.json @jnsdls @joaquim-verges
.vscode/ @jnsdls @joaquim-verges
scripts/ @jnsdls
.github/ @jnsdls
.changeset/config.json @jnsdls
turbo.json @jnsdls
+15
View File
@@ -77,6 +77,21 @@ Many of the tests use forked versions of live chains like mainnet. We fork these
If you need to use accounts in your tests, use the predefined accounts in `test/src/test-wallets.ts`. These are the default anvil accounts that are pre-funded on the local test forks.
##### Mocking Network Calls
If your test depends on a downstream network call, you must mock the call using `msw`. You can use one of the existing mocks in `test/src/mocks` or create your own. Once you've created a mock request, setup the server and add all your mocks like so:
```ts
import { setupServer } from "msw/node";
import { downloadMock, uploadMock } from "../../../test/src/mocks/storage.js";
const server = setupServer(uploadMock("HASH"), downloadMock({ name: "Test NFT" }));
beforeAll(() => server.listen());
afterEach(() => server.resetHandlers());
afterAll(() => server.close());
```
#### Linting
We use a linter to maintain best practices across projects. Once your changes are complete (or periodically while making changes), run the linter with the following command from the repo root:
+3
View File
@@ -11,3 +11,6 @@ legacy_packages:
packages:
- changed-files:
- any-glob-to-any-file: "packages/**/*"
portal:
- changed-files:
- any-glob-to-any-file: "apps/portal/**/*"
-15
View File
@@ -2,18 +2,3 @@
Short description of the bug fixed or feature added
## Changes made
- [ ] Public API changes: list the public API changes made if any
- [ ] Internal API changes: explain the internal logic changes
## How to test
- [ ] Automated tests: link to unit test file
- [ ] Manual tests: step by step instructions on how to test
## Contributor NFT
Paste in your wallet address below and we will airdrop you a special NFT when your pull request is merged.
```Address: ```
+23 -26
View File
@@ -19,7 +19,21 @@ env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
jobs:
optimize_ci:
runs-on: ubuntu-latest
outputs:
skip: ${{ steps.check_skip.outputs.skip }}
steps:
- name: Optimize CI
id: check_skip
uses: withgraphite/graphite-ci-action@main
with:
graphite_token: ${{ secrets.GRAPHITE_OMTIMIZE_TOKEN }}
build:
needs: optimize_ci
if: needs.optimize_ci.outputs.skip == 'false'
runs-on: ubuntu-latest
name: Build Packages
steps:
@@ -33,6 +47,8 @@ jobs:
run: pnpm build:packages
lint:
needs: optimize_ci
if: needs.optimize_ci.outputs.skip == 'false'
timeout-minutes: 15
name: Lint Packages
runs-on: ubuntu-latest
@@ -51,6 +67,8 @@ jobs:
- run: pnpm lint
test:
needs: optimize_ci
if: needs.optimize_ci.outputs.skip == 'false'
timeout-minutes: 15
name: Unit Tests
runs-on: ubuntu-latest
@@ -65,6 +83,7 @@ jobs:
uses: foundry-rs/foundry-toolchain@v1
with:
cache: false
version: nightly-c4a984fbf2c48b793c8cd53af84f56009dd1070c
- run: pnpm test
@@ -76,6 +95,8 @@ jobs:
verbose: true
e2e:
needs: optimize_ci
if: needs.optimize_ci.outputs.skip == 'false'
timeout-minutes: 15
name: E2E Tests
runs-on: ubuntu-latest
@@ -141,35 +162,11 @@ jobs:
echo "Bundling failed"
exit 1
fi
benchmark:
# cannot run benchmarks on merge group
if: github.event_name != 'merge_group'
timeout-minutes: 15
name: "Benchmarks"
runs-on: ubuntu-latest
steps:
- name: Check out the code
uses: actions/checkout@v4
- name: Setup & Install
uses: ./.github/composite-actions/install
- name: Set up foundry
uses: foundry-rs/foundry-toolchain@v1
with:
cache: false
- name: Run benchmarks
uses: CodSpeedHQ/action@v2
with:
token: ${{ secrets.CODSPEED_TOKEN }}
run: "pnpm bench"
size:
needs: optimize_ci
# only run on pull requests
if: github.event_name == 'pull_request'
if: github.event_name == 'pull_request' && needs.optimize_ci.outputs.skip == 'false'
timeout-minutes: 15
name: "Size"
runs-on: ubuntu-latest
+19
View File
@@ -27,7 +27,20 @@ env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
jobs:
optimize_ci:
runs-on: ubuntu-latest
outputs:
skip: ${{ steps.check_skip.outputs.skip }}
steps:
- name: Optimize CI
id: check_skip
uses: withgraphite/graphite-ci-action@main
with:
graphite_token: ${{ secrets.GRAPHITE_OMTIMIZE_TOKEN }}
build:
needs: optimize_ci
if: needs.optimize_ci.outputs.skip == 'false'
runs-on: ubuntu-latest
name: Build Packages
steps:
@@ -41,6 +54,8 @@ jobs:
run: pnpm build:legacy_packages
lint:
needs: optimize_ci
if: needs.optimize_ci.outputs.skip == 'false'
timeout-minutes: 15
name: Lint Packages
runs-on: ubuntu-latest
@@ -54,6 +69,8 @@ jobs:
- run: pnpm lint:legacy
test:
needs: optimize_ci
if: needs.optimize_ci.outputs.skip == 'false'
timeout-minutes: 15
name: Unit Tests
runs-on: ubuntu-latest
@@ -74,6 +91,8 @@ jobs:
verbose: true
e2e:
needs: optimize_ci
if: needs.optimize_ci.outputs.skip == 'false'
timeout-minutes: 15
name: E2E Tests
runs-on: ubuntu-latest
-75
View File
@@ -1,75 +0,0 @@
# On the Version Packages branch
# Generate and Commit the Typedoc JSON files and the Snippets JSON files
name: Commit Release Artifacts
on:
push:
branches:
- changeset-release/main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
# cancel any previous runs if they were started before this one
cancel-in-progress: true
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
TW_SECRET_KEY: ${{ secrets.TW_SECRET_KEY }}
jobs:
release-artifacts:
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- name: Checkout branch
uses: actions/checkout@v4
# bun setup is required, because pnpm typdoc will run pnpm build and some packages uses bun for build
- name: Setup bun
uses: oven-sh/setup-bun@v1
with:
bun-version: 1.0.35
- name: Install
uses: ./.github/composite-actions/install
- name: Build
run: pnpm build
- name: Typedoc
run: pnpm typedoc
- name: Generate Docs
run: |
cd legacy_packages/sdk
pnpm generate-docs
cd ../react-core
pnpm generate-docs
cd ../react
pnpm generate-docs
cd ../..
- name: Generate Snippets
run: pnpm generate-snippets
- name: Commit changes
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git status
git add legacy_packages/react/typedoc/documentation.json.gz
git add legacy_packages/react-core/typedoc/documentation.json.gz
git add legacy_packages/react-native/typedoc/documentation.json.gz
git add legacy_packages/sdk/typedoc/documentation.json.gz
git add legacy_packages/storage/typedoc/documentation.json.gz
git add legacy_packages/wallets/typedoc/documentation.json.gz
git add packages/thirdweb/typedoc/documentation.json.gz
git add snippets/feature_snippets_react.json
git add snippets/feature_snippets_sdk.json
git add snippets/snippets.json
git commit -m "Commit Release Artifacts [skip ci]"
git push
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+9 -2
View File
@@ -14,7 +14,7 @@ public/dist
.idea/
.yalc/
yalc.lock
build/
./build/
playwright-report/
.env/
@@ -25,4 +25,11 @@ legacy_packages/cli/artifacts/
codecov
# Remove sitemap files (generated at build time)
sitemap*.xml
sitemap*.xml
# typedoc
legacy_packages/*/typedoc/*
packages/*/typedoc/*
*storybook.log
storybook-static
+3
View File
@@ -18,5 +18,8 @@
},
"[json]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[markdown]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
}
+12 -5
View File
@@ -40,6 +40,9 @@ NEXT_PUBLIC_STRIPE_KEY=
NEXT_PUBLIC_STRIPE_PAYMENT_METHOD_CFG_ID=
# Needed for contract analytics / blockchain data information
CHAINSAW_API_KEY=
#
# Private (server)
#
@@ -82,8 +85,12 @@ NEXT_TELEMETRY_DISABLED=1
NEXT_PUBLIC_TRENCH_2_API_ENDPOINT=""
# Unthread variables - only required for submitting the support form in /support
NEXT_PUBLIC_UNTHREAD_TRIAGE_CHANNEL_ID=""
NEXT_PUBLIC_UNTHREAD_EMAIL_INBOX_ID=""
NEXT_PUBLIC_UNTHREAD_FREE_TIER_ID=""
NEXT_PUBLIC_UNTHREAD_GROWTH_TIER_ID=""
NEXT_PUBLIC_UNTHREAD_PRO_TIER_ID=""
UNTHREAD_API_KEY=""
UNTHREAD_TRIAGE_CHANNEL_ID=""
UNTHREAD_EMAIL_INBOX_ID=""
UNTHREAD_FREE_TIER_ID=""
UNTHREAD_GROWTH_TIER_ID=""
UNTHREAD_PRO_TIER_ID=""
# Demo Engine
NEXT_PUBLIC_DEMO_ENGINE_URL=""
+22
View File
@@ -5,6 +5,7 @@ module.exports = {
"plugin:import/typescript",
"plugin:@next/next/recommended",
"plugin:promise/recommended",
"plugin:storybook/recommended"
],
rules: {
"react-compiler/react-compiler": "error",
@@ -15,6 +16,21 @@ module.exports = {
message:
'Are you *sure* you need to use "useEffect" here? If you loading any async function prefer using "useQuery".',
},
{
selector: "CallExpression[callee.name='defineChain']",
message:
"Use useV5DashboardChain instead if you are using it inside a component",
},
{
selector: "CallExpression[callee.name='defineDashboardChain']",
message:
"Use useV5DashboardChain instead if you are using it inside a component",
},
{
selector: "CallExpression[callee.name='mapV4ChainToV5Chain']",
message:
"Use useV5DashboardChain instead if you are using it inside a component",
},
],
"no-restricted-imports": [
"error",
@@ -65,6 +81,12 @@ module.exports = {
message:
"Import from `@chakra-ui/react` instead of `@chakra-ui/menu`.",
},
{
name: "next/navigation",
importNames: ["useRouter"],
message:
'Use `import { useDashboardRouter } from "@/lib/DashboardRouter";` instead',
},
],
},
],
+31
View File
@@ -0,0 +1,31 @@
import { dirname, join } from "node:path";
import type { StorybookConfig } from "@storybook/nextjs";
/**
* This function is used to resolve the absolute path of a package.
* It is needed in projects that use Yarn PnP or are set up within a monorepo.
*/
function getAbsolutePath(value: string): string {
return dirname(require.resolve(join(value, "package.json")));
}
const config: StorybookConfig = {
stories: ["../src/**/*.stories.tsx"],
addons: [
getAbsolutePath("@storybook/addon-onboarding"),
getAbsolutePath("@storybook/addon-links"),
getAbsolutePath("@storybook/addon-essentials"),
getAbsolutePath("@chromatic-com/storybook"),
getAbsolutePath("@storybook/addon-interactions"),
],
framework: {
name: getAbsolutePath("@storybook/nextjs"),
options: {},
},
refs: {
"@chakra-ui/react": {
disable: true,
},
},
staticDirs: ["../public"],
};
export default config;
+46
View File
@@ -0,0 +1,46 @@
import type { Preview } from "@storybook/react";
import "@/styles/globals.css";
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
import { Inter as interFont } from "next/font/google";
// biome-ignore lint/correctness/noUnusedImports: <explanation>
import React, { useEffect } from "react";
import { cn } from "../src/@/lib/utils";
// Note: Wrapping the Stoy with AppRouterProviders makes the storybook server time SUPER SLOW
// so let's just not have it there - all stories should be independent from context anyway and just rely on props
const queryClient = new QueryClient();
const fontSans = interFont({
subsets: ["latin"],
variable: "--font-sans",
});
const preview: Preview = {
parameters: {
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/i,
},
},
},
decorators: [
(Story) => {
useEffect(() => {
document.body.className = cn(
"font-sans antialiased",
fontSans.variable,
);
});
return (
<QueryClientProvider client={queryClient}>
<Story />
</QueryClientProvider>
);
},
],
};
export default preview;
+4 -11
View File
@@ -2,20 +2,13 @@
This repo contains the full source for all of thirdweb.com and the thirdweb dashboard.
## Building
## Starting a local dev server
### Install dependencies
We use `pnpm`.
Run from the root folder (thirdweb-dev/js):
```sh
pnpm install
```
### Starting local dev server.
```sh
pnpm dev
cd <path/to/thirdweb-dev/js>
pnpm dashboard
```
### Building for production
+2 -2
View File
@@ -5,8 +5,8 @@ const ContentSecurityPolicy = `
img-src * data: blob:;
media-src * data: blob:;
object-src 'none';
style-src 'self' 'unsafe-inline';
font-src 'self';
style-src 'self' 'unsafe-inline' https://vercel.live;
font-src 'self' https://vercel.live https://assets.vercel.com;
frame-src * data:;
script-src 'self' 'unsafe-eval' 'unsafe-inline' 'wasm-unsafe-eval' 'inline-speculation-rules' *.thirdweb.com *.thirdweb-dev.com vercel.live js.stripe.com pg.paper.xyz portal.usecontext.io;
connect-src * data: blob:;
+48 -39
View File
@@ -18,44 +18,46 @@
"build:analyze": "ANALYZE=true pnpm run build",
"knip": "knip",
"playwright": "playwright test",
"update-checkly": "npx checkly deploy"
"update-checkly": "npx checkly deploy",
"storybook": "storybook dev -p 6006",
"build-storybook": "storybook build"
},
"dependencies": {
"@chakra-ui/react": "^2.8.2",
"@chakra-ui/styled-system": "^2.9.2",
"@chakra-ui/theme-tools": "^2.1.2",
"@coinbase/onchainkit": "^0.14.2",
"@emotion/react": "^11.11.4",
"@emotion/react": "11.11.4",
"@emotion/styled": "11.11.5",
"@hookform/resolvers": "^3.6.0",
"@hookform/resolvers": "^3.9.0",
"@n8tb1t/use-scroll-position": "^2.0.3",
"@radix-ui/react-alert-dialog": "^1.1.1",
"@radix-ui/react-aspect-ratio": "^1.0.3",
"@radix-ui/react-checkbox": "^1.1.0",
"@radix-ui/react-checkbox": "^1.1.1",
"@radix-ui/react-dialog": "1.1.1",
"@radix-ui/react-dropdown-menu": "^2.1.1",
"@radix-ui/react-label": "^2.1.0",
"@radix-ui/react-popover": "^1.1.0",
"@radix-ui/react-popover": "^1.1.1",
"@radix-ui/react-radio-group": "^1.2.0",
"@radix-ui/react-select": "^2.0.0",
"@radix-ui/react-select": "^2.1.1",
"@radix-ui/react-separator": "^1.1.0",
"@radix-ui/react-slot": "^1.1.0",
"@radix-ui/react-toast": "^1.2.1",
"@radix-ui/react-tooltip": "^1.1.0",
"@radix-ui/react-switch": "^1.1.0",
"@radix-ui/react-toggle": "^1.1.0",
"@radix-ui/react-toggle-group": "^1.1.0",
"@radix-ui/react-tooltip": "1.1.2",
"@react-icons/all-files": "^4.1.0",
"@sentry/nextjs": "^8.8.0",
"@stripe/react-stripe-js": "^2.7.1",
"@sentry/nextjs": "^8.26.0",
"@stripe/react-stripe-js": "^2.7.3",
"@stripe/stripe-js": "^3.5.0",
"@tanstack/query-async-storage-persister": "^4.36.1",
"@tanstack/react-query": "^4.36.1",
"@tanstack/react-query-persist-client": "^4.36.1",
"@tanstack/react-table": "^8.17.3",
"@thirdweb-dev/chains": "workspace:*",
"@thirdweb-dev/react": "workspace:*",
"@thirdweb-dev/react-core": "workspace:*",
"@thirdweb-dev/sdk": "workspace:*",
"@thirdweb-dev/service-utils": "workspace:*",
"@thirdweb-dev/storage": "workspace:*",
"@thirdweb-dev/wallets": "workspace:*",
"@vercel/og": "^0.6.2",
"abitype": "1.0.4",
"abitype": "1.0.5",
"chakra-react-select": "^4.7.6",
"class-variance-authority": "^0.7.0",
"clsx": "^2.1.1",
@@ -64,12 +66,13 @@
"date-fns": "^3.6.0",
"ethers": "^5.7.2",
"flat": "^6.0.1",
"framer-motion": "^11.2.11",
"fuse.js": "^7.0.0",
"idb-keyval": "^6.2.1",
"framer-motion": "^11.2.12",
"fuse.js": "7.0.0",
"ioredis": "^5.4.1",
"ipaddr.js": "^2.2.0",
"lottie-react": "^2.4.0",
"lucide-react": "^0.395.0",
"next": "14.2.4",
"lucide-react": "^0.399.0",
"next": "14.2.5",
"next-plausible": "^3.12.0",
"next-seo": "^6.5.0",
"next-themes": "^0.3.0",
@@ -78,7 +81,6 @@
"pluralize": "^8.0.0",
"posthog-js": "1.128.3",
"posthog-js-opensource": "npm:[email protected]",
"prettier": "^3.3.2",
"prism-react-renderer": "^2.3.1",
"prismjs": "^1.29.0",
"qrcode": "^1.5.3",
@@ -98,23 +100,34 @@
"recharts": "^2.12.7",
"remark-gfm": "^4.0.0",
"server-only": "^0.0.1",
"sonner": "^1.5.0",
"spdx-correct": "^3.2.0",
"swagger-ui-react": "^5.17.14",
"tailwind-merge": "^2.3.0",
"tailwind-merge": "^2.5.2",
"tailwindcss-animate": "^1.0.7",
"thirdweb": "workspace:*",
"tiny-invariant": "^1.3.3",
"use-debounce": "^10.0.1",
"vaul": "^0.9.1",
"zksync-ethers": "5.9.0",
"zod": "^3.23.8"
"zod": "3.23.8"
},
"devDependencies": {
"@chakra-ui/cli": "^2.4.1",
"@chromatic-com/storybook": "^1.5.0",
"@next/bundle-analyzer": "^14.2.4",
"@next/eslint-plugin-next": "^14.2.4",
"@playwright/test": "^1.44.1",
"@playwright/test": "1.44.1",
"@storybook/addon-essentials": "^8.2.9",
"@storybook/addon-interactions": "^8.2.9",
"@storybook/addon-links": "^8.2.9",
"@storybook/addon-onboarding": "^8.2.9",
"@storybook/blocks": "^8.2.9",
"@storybook/nextjs": "^8.2.9",
"@storybook/react": "^8.2.9",
"@storybook/test": "^8.2.9",
"@types/color": "^3.0.6",
"@types/node": "^20.14.6",
"@types/node": "20.14.9",
"@types/papaparse": "^5.3.14",
"@types/pluralize": "^0.0.33",
"@types/qrcode": "^1.5.5",
@@ -123,26 +136,22 @@
"@types/react-table": "^7.7.20",
"@types/spdx-correct": "^3.1.3",
"@types/swagger-ui-react": "^4.18.3",
"@typescript-eslint/eslint-plugin": "^7.13.1",
"@typescript-eslint/parser": "^7.14.1",
"@typescript-eslint/eslint-plugin": "7.14.1",
"@typescript-eslint/parser": "7.14.1",
"autoprefixer": "^10.4.19",
"checkly": "^4.6.3",
"dotenv": "^16.4.5",
"eslint": "^8.57.0",
"checkly": "^4.7.0",
"eslint": "8.57.0",
"eslint-config-biome": "^1.7.3",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-inclusive-language": "^2.2.1",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-promise": "^6.2.0",
"eslint-plugin-react": "^7.34.3",
"eslint-plugin-react-compiler": "0.0.0-experimental-51a85ea-20240601",
"eslint-plugin-react-hooks": "^4.6.2",
"knip": "^5.22.0",
"eslint-plugin-storybook": "^0.8.0",
"knip": "^5.23.1",
"next-sitemap": "^4.2.3",
"next-unused": "^0.0.6",
"tailwindcss": "^3.4.4",
"typescript": "5.5.2"
"storybook": "^8.2.9",
"tailwindcss": "^3.4.10",
"typescript": "5.5.4"
},
"next-unused": {
"alias": {},
@@ -0,0 +1,30 @@
{
"applinks": {
"apps": ["XYHGSFAMHX.com.thirdweb.demo"],
"details": [
{
"appIDs": ["XYHGSFAMHX.com.thirdweb.demo"],
"components": [
{
"#": "no_universal_links",
"exclude": true,
"comment": "Matches any URL with a fragment that equals no_universal_links and instructs the system not to open it as a universal link."
},
{
"/": "/mobile-wallet-protocol",
"comment": "Matches any URL with a path that starts with /mobile-wallet-protocol for coinbase wallet mobile redirects."
},
{
"/": "/dashboard/*",
"exclude": true,
"comment": "no universal link for dashboard"
}
]
}
]
},
"webcredentials": {
"apps": ["XYHGSFAMHX.com.thirdweb.demo"]
},
"appclips": {}
}
@@ -0,0 +1,15 @@
[
{
"relation": [
"delegate_permission/common.handle_all_urls",
"delegate_permission/common.get_login_creds"
],
"target": {
"namespace": "android_app",
"package_name": "com.thirdweb.demo",
"sha256_cert_fingerprints": [
"40:EB:0D:96:57:F3:D8:1F:BA:87:B8:E4:26:E0:3A:DB:C8:35:96:A8:A2:B2:55:F0:B1:64:F1:39:F8:6F:7E:EB"
]
}
}
]
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

@@ -0,0 +1,17 @@
<svg width="1073" height="504" viewBox="0 0 1073 504" fill="none" xmlns="http://www.w3.org/2000/svg">
<mask id="mask0_48_35063" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="0" y="0" width="1351" height="840">
<path d="M1350.46 0H0V840H1350.46V0Z" fill="white"/>
</mask>
<g mask="url(#mask0_48_35063)">
<path d="M4.77995 70.7069L4.77697 70.6996C-9.16164 36.4867 16.1683 1 51.6663 1H279.112C300.663 1 318.394 13.6646 325.999 32.6791L506.922 484.987L506.929 485.004L506.937 485.022C511.986 496.381 512.002 510.315 506.922 523.013L393.199 807.321L393.197 807.328L393.194 807.335C376.734 850.383 315.901 850.456 298.132 807.318C298.131 807.316 298.13 807.314 298.129 807.312L4.77995 70.7069ZM842.195 70.7069L842.192 70.6996C828.253 36.4867 853.583 1 889.081 1H1116.53C1138.08 1 1155.81 13.6646 1163.41 32.6791L1344.34 484.987L1344.34 485.004L1344.35 485.022C1349.4 496.381 1349.42 510.315 1344.34 523.013L1230.61 807.321L1230.61 807.328L1230.61 807.335C1214.15 850.382 1153.32 850.456 1135.55 807.32C1135.55 807.317 1135.55 807.314 1135.54 807.312L842.195 70.7069ZM444.192 69.4575C444.191 69.4542 444.19 69.451 444.189 69.4477C432.783 36.4753 456.887 1 492.355 1H691.37C712.903 1 731.93 14.9382 739.544 33.9578C739.546 33.9623 739.548 33.9669 739.549 33.9714L904.945 486.224C904.946 486.228 904.948 486.233 904.949 486.238C908.751 497.653 908.752 509.053 904.95 520.469C904.948 520.474 904.946 520.479 904.945 520.484L805.448 791.836C788.971 836.198 725.585 836.198 709.108 791.836L444.192 69.4575Z" stroke="url(#paint0_linear_48_35063)" stroke-width="2"/>
</g>
<defs>
<linearGradient id="paint0_linear_48_35063" x1="-91.767" y1="269.743" x2="811.065" y2="1296.62" gradientUnits="userSpaceOnUse">
<stop stop-color="#F213A4"/>
<stop offset="0.1517" stop-color="#E011A7"/>
<stop offset="0.4554" stop-color="#B20DAF"/>
<stop offset="0.8789" stop-color="#6806BB"/>
<stop offset="1" stop-color="#5204BF"/>
</linearGradient>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 839 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 779 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 248 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 704 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 833 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 339 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 728 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 646 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

+28 -9
View File
@@ -119,11 +119,6 @@ function redirects() {
destination: "/template/erc721",
permanent: false,
},
{
source: "/abuse",
destination: "https://forms.gle/v9UJtHbVw8fXypcd7",
permanent: false,
},
{
source: "/create-api-key",
destination: "/dashboard/settings/api-keys",
@@ -136,12 +131,17 @@ function redirects() {
},
{
source: "/dashboard/connect",
destination: "/dashboard/connect/playground",
destination: "/dashboard/connect/in-app-wallets",
permanent: false,
},
{
source: "/dashboard/connect/playground",
destination: "https://playground.thirdweb.com/connect/sign-in/button",
permanent: false,
},
{
source: "/dashboard/wallet",
destination: "/dashboard/connect/playground",
destination: "https://playground.thirdweb.com/connect/sign-in/button",
permanent: false,
},
{
@@ -166,7 +166,7 @@ function redirects() {
},
{
source: "/dashboard/wallets",
destination: "/dashboard/connect/playground",
destination: "https://playground.thirdweb.com/connect/sign-in/button",
permanent: false,
},
{
@@ -186,7 +186,7 @@ function redirects() {
},
{
source: "/dashboard/wallets/connect",
destination: "/dashboard/connect/playground",
destination: "https://playground.thirdweb.com/connect/sign-in/button",
permanent: false,
},
{
@@ -270,6 +270,25 @@ function redirects() {
destination: "/in-app-wallets",
permanent: false,
},
{
source: "/dashboard/connect/ecosystem/:slug((?!create$)[^/]+)",
destination: "/dashboard/connect/ecosystem/:slug/permissions",
permanent: false,
},
// temporarily redirect cli login to support page
{
source: "/cli/login",
destination:
"https://support.thirdweb.com/troubleshooting-errors/7Y1BqKNvtLdBv5fZkRZZB3/issue-linking-device-on-the-authorization-page-via-thirdweb-cli/cn9LRA3ax7XCP6uxwRYdvx",
permanent: false,
},
// temporary redirect gas -> explore page
{
source: "/gas",
destination: "/explore",
permanent: false,
},
];
}
+73
View File
@@ -0,0 +1,73 @@
import "server-only";
import { COOKIE_ACTIVE_ACCOUNT, COOKIE_PREFIX_TOKEN } from "@/constants/cookie";
import { cookies } from "next/headers";
const THIRDWEB_API_HOST =
process.env.NEXT_PUBLIC_THIRDWEB_API_HOST || "https://api.thirdweb.com";
export type Project = {
id: string;
name: string;
createdAt: Date;
updatedAt: Date;
deletedAt: Date | null;
bannedAt: Date | null;
domains: string[];
bundleIds: string[];
redirectUrls: string[];
lastAccessedAt: Date | null;
slug: string;
teamId: string;
publishableKey: string;
// image: string; // TODO
};
export async function getProjects(teamSlug: string) {
const cookiesManager = cookies();
const activeAccount = cookiesManager.get(COOKIE_ACTIVE_ACCOUNT)?.value;
const token = activeAccount
? cookiesManager.get(COOKIE_PREFIX_TOKEN + activeAccount)?.value
: null;
if (!token) {
return [];
}
const teamsRes = await fetch(
`${THIRDWEB_API_HOST}/v1/teams/${teamSlug}/projects`,
{
headers: {
Authorization: `Bearer ${token}`,
},
},
);
if (teamsRes.ok) {
return (await teamsRes.json())?.result as Project[];
}
return [];
}
export async function getProject(teamSlug: string, projectSlug: string) {
const cookiesManager = cookies();
const activeAccount = cookiesManager.get(COOKIE_ACTIVE_ACCOUNT)?.value;
const token = activeAccount
? cookiesManager.get(COOKIE_PREFIX_TOKEN + activeAccount)?.value
: null;
if (!token) {
return null;
}
const teamsRes = await fetch(
`${THIRDWEB_API_HOST}/v1/teams/${teamSlug}/projects/${projectSlug}`,
{
headers: {
Authorization: `Bearer ${token}`,
},
},
);
if (teamsRes.ok) {
return (await teamsRes.json())?.result as Project;
}
return null;
}
+53
View File
@@ -0,0 +1,53 @@
import "server-only";
import { COOKIE_ACTIVE_ACCOUNT, COOKIE_PREFIX_TOKEN } from "@/constants/cookie";
import { cookies } from "next/headers";
const THIRDWEB_API_HOST =
process.env.NEXT_PUBLIC_THIRDWEB_API_HOST || "https://api.thirdweb.com";
const TeamAccountRole = {
OWNER: "OWNER",
MEMBER: "MEMBER",
} as const;
export type TeamAccountRole =
(typeof TeamAccountRole)[keyof typeof TeamAccountRole];
export type TeamMember = {
account: {
name: string;
email: string | null;
};
} & {
deletedAt: Date | null;
accountId: string;
teamId: string;
createdAt: Date;
updatedAt: Date;
role: TeamAccountRole;
};
export async function getMembers(teamSlug: string) {
const cookiesManager = cookies();
const activeAccount = cookiesManager.get(COOKIE_ACTIVE_ACCOUNT)?.value;
const token = activeAccount
? cookiesManager.get(COOKIE_PREFIX_TOKEN + activeAccount)?.value
: null;
if (!token) {
return [];
}
const teamsRes = await fetch(
`${THIRDWEB_API_HOST}/v1/teams/${teamSlug}/members`,
{
headers: {
Authorization: `Bearer ${token}`,
},
},
);
if (teamsRes.ok) {
return (await teamsRes.json())?.result as TeamMember[];
}
return [];
}
+58
View File
@@ -0,0 +1,58 @@
import "server-only";
import { COOKIE_ACTIVE_ACCOUNT, COOKIE_PREFIX_TOKEN } from "@/constants/cookie";
import { cookies } from "next/headers";
const THIRDWEB_API_HOST =
process.env.NEXT_PUBLIC_THIRDWEB_API_HOST || "https://api.thirdweb.com";
export type Team = {
name: string;
slug: string;
// image: string; // -> TODO
billingPlan: "pro" | "growth" | "free";
billingStatus: "validPayment" | (string & {}); // what's the other value?
};
export async function getTeamBySlug(slug: string) {
const cookiesManager = cookies();
const activeAccount = cookiesManager.get(COOKIE_ACTIVE_ACCOUNT)?.value;
const token = activeAccount
? cookiesManager.get(COOKIE_PREFIX_TOKEN + activeAccount)?.value
: null;
if (!token) {
return null;
}
const teamRes = await fetch(`${THIRDWEB_API_HOST}/v1/teams/${slug}`, {
headers: {
Authorization: `Bearer ${token}`,
},
});
if (teamRes.ok) {
return (await teamRes.json())?.result as Team;
}
return null;
}
export async function getTeams() {
const cookiesManager = cookies();
const activeAccount = cookiesManager.get(COOKIE_ACTIVE_ACCOUNT)?.value;
const token = activeAccount
? cookiesManager.get(COOKIE_PREFIX_TOKEN + activeAccount)?.value
: null;
if (!token) {
return [];
}
const teamsRes = await fetch(`${THIRDWEB_API_HOST}/v1/teams`, {
headers: {
Authorization: `Bearer ${token}`,
},
});
if (teamsRes.ok) {
return (await teamsRes.json())?.result as Team[];
}
return [];
}
@@ -0,0 +1,45 @@
"use client";
import { Button } from "@/components/ui/button";
import { Dialog, DialogContent, DialogTrigger } from "@/components/ui/dialog";
import { useState } from "react";
import { NavLink } from "../ui/NavLink";
export function MobileSidebar(props: {
links?: { href: string; label: React.ReactNode }[];
footer?: React.ReactNode;
trigger: React.ReactNode;
}) {
const [isOpen, setIsOpen] = useState(false);
return (
<Dialog open={isOpen} onOpenChange={setIsOpen}>
<DialogTrigger asChild>{props.trigger}</DialogTrigger>
<DialogContent
className="p-4 rounded-t-xl rounded-b-none"
dialogCloseClassName="hidden"
onClick={(e) => {
if (e.target instanceof HTMLAnchorElement) {
setIsOpen(false);
}
}}
>
<div className="flex flex-col gap-2">
{props.links?.map((link) => {
return (
<Button size="sm" variant="ghost" asChild key={link.href}>
<NavLink
href={link.href}
className="!text-left justify-start flex gap-2 h-auto py-3"
activeClassName="bg-accent"
>
{link.label}
</NavLink>
</Button>
);
})}
</div>
{props.footer}
</DialogContent>
</Dialog>
);
}
@@ -0,0 +1,33 @@
import type React from "react";
import { cn } from "../../lib/utils";
import { NavLink } from "../ui/NavLink";
export type SidebarContentProps = {
header?: React.ReactNode;
links: { href: string; label: React.ReactNode }[];
className?: string;
};
export function Sidebar(props: SidebarContentProps) {
return (
<aside
className={cn("w-[240px] flex-shrink-0 hidden lg:block", props.className)}
>
<div className="sticky top-0 pt-8">
{props.header}
<div className="flex flex-col border-l-2 border-border">
{props.links?.map((link) => (
<NavLink
key={link.href}
href={link.href}
className="text-sm py-1.5 pl-4 text-muted-foreground hover:text-foreground border-l-2 ml-[-2px] border-transparent hover:border-foreground transition-colors"
activeClassName="text-foreground border-link-foreground"
>
{link.label}
</NavLink>
))}
</div>
</div>
</aside>
);
}
@@ -0,0 +1,142 @@
import { Button } from "@/components/ui/button";
import { cn } from "@/lib/utils";
import { ThirdwebMiniLogo } from "app/components/ThirdwebMiniLogo";
import Link from "next/link";
import {
SiDiscord,
SiGithub,
SiInstagram,
SiLinkedin,
SiReddit,
SiTiktok,
SiX,
SiYoutube,
} from "react-icons/si";
type AppFooterProps = {
className?: string;
};
export function AppFooter(props: AppFooterProps) {
return (
<footer
className={cn(
"bg-background border-t border-border py-6 md:py-8 w-full",
props.className,
)}
>
<div className="container flex flex-col gap-4 md:gap-6">
{/* top row */}
<div className="flex flex-col md:flex-row gap-4 md:justify-between md:items-center">
<div className="flex flex-row gap-3 items-center">
<ThirdwebMiniLogo className="h-7" />
<p className="text-sm text-secondary-foreground">© 2024 thirdweb</p>
</div>
<div className="flex flex-row gap-3">
<Button size="icon" variant="ghost" asChild className="size-9">
<Link href="https://github.com/thirdweb-dev" target="_blank">
<SiGithub className="text-secondary-foreground size-5" />
</Link>
</Button>
<Button size="icon" variant="ghost" asChild className="size-9">
<Link href="https://www.tiktok.com/@thirdweb" target="_blank">
<SiTiktok className="text-secondary-foreground size-5" />
</Link>
</Button>
<Button size="icon" variant="ghost" asChild className="size-9">
<Link href="https://www.instagram.com/thirdweb/" target="_blank">
<SiInstagram className="text-secondary-foreground size-5" />
</Link>
</Button>
<Button size="icon" variant="ghost" asChild className="size-9">
<Link
href="hhttps://www.linkedin.com/company/third-web/"
target="_blank"
>
<SiLinkedin className="text-secondary-foreground size-5" />
</Link>
</Button>
<Button size="icon" variant="ghost" asChild className="size-9">
<Link href="https://www.youtube.com/@thirdweb_" target="_blank">
<SiYoutube className="text-secondary-foreground size-5" />
</Link>
</Button>
<Button size="icon" variant="ghost" asChild className="size-9">
<Link href="https://discord.gg/thirdweb" target="_blank">
<SiDiscord className="text-secondary-foreground size-5" />
</Link>
</Button>
<Button size="icon" variant="ghost" asChild className="size-9">
<Link href="https://www.reddit.com/r/thirdweb/" target="_blank">
<SiReddit className="text-secondary-foreground size-5" />
</Link>
</Button>
<Button size="icon" variant="ghost" asChild className="size-9">
<Link href="https://x.com/thirdweb" target="_blank">
<SiX className="text-secondary-foreground size-5" />
</Link>
</Button>
</div>
</div>
{/* bottom row */}
<div className="grid grid-rows-5 grid-cols-2 grid-flow-col gap-2 md:flex md:flex-row md:justify-between">
<Link
className="py-[6px] px-[10px] text-secondary-foreground text-sm hover:underline"
href="/"
>
Home
</Link>
<Link
className="py-[6px] px-[10px] text-secondary-foreground text-sm hover:underline"
href="https://blog.thirdweb.com"
target="_blank"
>
Blog
</Link>
<Link
className="py-[6px] px-[10px] text-secondary-foreground text-sm hover:underline"
href="https://portal.thirdweb.com/changelog"
target="_blank"
>
Changelog
</Link>
<Link
className="py-[6px] px-[10px] text-secondary-foreground text-sm hover:underline"
href="https://feedback.thirdweb.com/"
target="_blank"
>
Feedback
</Link>
<Link
className="py-[6px] px-[10px] text-secondary-foreground text-sm hover:underline"
href="https://thirdweb.com/privacy"
target="_blank"
>
Privacy Policy
</Link>
<Link
className="py-[6px] px-[10px] text-secondary-foreground text-sm hover:underline"
href="https://thirdweb.com/tos"
target="_blank"
>
Terms of Service
</Link>
<Link
className="py-[6px] px-[10px] text-secondary-foreground text-sm hover:underline"
href="https://thirdweb.com/gas"
target="_blank"
>
Gas Estimator
</Link>
<Link
className="py-[6px] px-[10px] text-secondary-foreground text-sm hover:underline"
href="https://thirdweb.com/chainlist"
target="_blank"
>
Chain List
</Link>
</div>
</div>
</footer>
);
}
@@ -0,0 +1,109 @@
"use client";
import { Area, AreaChart, CartesianGrid, XAxis } from "recharts";
import {
Card,
CardContent,
CardDescription,
CardHeader,
CardTitle,
} from "@/components/ui/card";
import {
type ChartConfig,
ChartContainer,
ChartLegend,
ChartLegendContent,
ChartTooltip,
ChartTooltipContent,
} from "@/components/ui/chart";
import { useMemo } from "react";
export type ThirdwebAreaChartProps<TConfig extends ChartConfig> = {
// metadata
title: string;
description?: string;
// chart config
config: TConfig;
data: Array<Record<keyof TConfig, number> & { time: number | string | Date }>;
showLegend?: boolean;
// chart className
chartClassName?: string;
};
export function ThirdwebAreaChart<TConfig extends ChartConfig>(
props: ThirdwebAreaChartProps<TConfig>,
) {
const configKeys = useMemo(() => Object.keys(props.config), [props.config]);
return (
<Card>
<CardHeader>
<CardTitle>{props.title}</CardTitle>
{props.description && (
<CardDescription>{props.description}</CardDescription>
)}
</CardHeader>
<CardContent>
<ChartContainer config={props.config} className={props.chartClassName}>
<AreaChart
accessibilityLayer
data={props.data}
margin={{
left: 12,
right: 12,
}}
>
<CartesianGrid vertical={false} />
<XAxis
dataKey="time"
tickLine={false}
axisLine={false}
tickMargin={8}
tickFormatter={(value) => new Date(value).toLocaleDateString()}
/>
<ChartTooltip cursor={false} content={<ChartTooltipContent />} />
<defs>
{configKeys.map((key) => (
<linearGradient
key={key}
id={`fill_${key}`}
x1="0"
y1="0"
x2="0"
y2="1"
>
<stop
offset="5%"
stopColor={`var(--color-${key})`}
stopOpacity={0.8}
/>
<stop
offset="95%"
stopColor={`var(--color-${key})`}
stopOpacity={0.1}
/>
</linearGradient>
))}
</defs>
{configKeys.map((key) => (
<Area
key={key}
dataKey={key}
type="natural"
fill={`url(#fill_${key})`}
fillOpacity={0.4}
stroke={`var(--color-${key})`}
stackId="a"
/>
))}
{props.showLegend && (
<ChartLegend content={<ChartLegendContent />} />
)}
</AreaChart>
</ChartContainer>
</CardContent>
</Card>
);
}
@@ -0,0 +1,91 @@
"use client";
import { Bar, BarChart, CartesianGrid, XAxis } from "recharts";
import {
Card,
CardContent,
CardDescription,
CardHeader,
CardTitle,
} from "@/components/ui/card";
import {
type ChartConfig,
ChartContainer,
ChartLegend,
ChartLegendContent,
ChartTooltip,
ChartTooltipContent,
} from "@/components/ui/chart";
import { useMemo } from "react";
export type ThirdwebBarChartProps<TConfig extends ChartConfig> = {
// metadata
title: string;
description?: string;
// chart config
config: TConfig;
data: Array<Record<keyof TConfig, number> & { time: number | string | Date }>;
showLegend?: boolean;
variant?: "stacked" | "grouped";
// chart className
chartClassName?: string;
};
export function ThirdwebBarChart<TConfig extends ChartConfig>(
props: ThirdwebBarChartProps<TConfig>,
) {
const configKeys = useMemo(() => Object.keys(props.config), [props.config]);
// if there are more than 4 keys then we should stack them by default
const variant =
props.variant || configKeys.length > 4 ? "stacked" : "grouped";
return (
<Card>
<CardHeader>
<CardTitle>{props.title}</CardTitle>
{props.description && (
<CardDescription>{props.description}</CardDescription>
)}
</CardHeader>
<CardContent>
<ChartContainer config={props.config} className={props.chartClassName}>
<BarChart accessibilityLayer data={props.data}>
<CartesianGrid vertical={false} />
<XAxis
dataKey="time"
tickLine={false}
axisLine={false}
tickMargin={10}
tickFormatter={(value) => new Date(value).toLocaleDateString()}
/>
<ChartTooltip content={<ChartTooltipContent hideLabel />} />
{props.showLegend && (
<ChartLegend content={<ChartLegendContent />} />
)}
{configKeys.map((key, idx) => (
<Bar
key={key}
dataKey={key}
// if stacked then they should all be the same stackId
// if grouped then they should all be unique stackId (so the key works great)
stackId={variant === "stacked" ? "a" : key}
fill={`var(--color-${key})`}
// if stacked then we need to figure out the radius based on the index in the array
// if grouped then we can just use the same radius for all
radius={
variant === "stacked"
? idx === 0
? [0, 0, 4, 4]
: idx === configKeys.length - 1
? [4, 4, 0, 0]
: [0, 0, 0, 0]
: [4, 4, 4, 4]
}
/>
))}
</BarChart>
</ChartContainer>
</CardContent>
</Card>
);
}
@@ -1,31 +1,30 @@
"use client";
import { Button } from "@/components/ui/button";
import { ClientOnly } from "components/ClientOnly/ClientOnly";
import { Moon, Sun } from "lucide-react";
import { useTheme } from "next-themes";
import * as React from "react";
import { ClientOnly } from "../../components/ClientOnly/ClientOnly";
import { Skeleton } from "./ui/skeleton";
export function ColorModeToggle() {
const { setTheme, theme } = useTheme();
return (
<Button
variant="ghost"
size="icon"
onClick={() => {
setTheme(theme === "dark" ? "light" : "dark");
}}
aria-label="Toggle theme"
>
<ClientOnly ssr={<Skeleton className="size-6 bg-accent border" />}>
<ClientOnly ssr={<Skeleton className="size-10 bg-accent border" />}>
<Button
variant="ghost"
size="icon"
onClick={() => {
setTheme(theme === "dark" ? "light" : "dark");
}}
aria-label="Toggle theme"
>
{theme === "light" ? (
<Sun strokeWidth={1} className="size-6" />
) : (
<Moon strokeWidth={1} className="size-6" />
)}
</ClientOnly>
</Button>
</Button>
</ClientOnly>
);
}
@@ -1,9 +1,18 @@
"use client";
import { ThemeProvider as NextThemesProvider } from "next-themes";
import { ThemeProvider as NextThemesProvider, useTheme } from "next-themes";
import type { ThemeProviderProps } from "next-themes/dist/types";
import * as React from "react";
import { useEffect } from "react";
export function ThemeProvider({ children, ...props }: ThemeProviderProps) {
return <NextThemesProvider {...props}>{children}</NextThemesProvider>;
}
export function useForceDarkTheme() {
const { setTheme } = useTheme();
// eslint-disable-next-line no-restricted-syntax
useEffect(() => {
setTheme("dark");
}, [setTheme]);
}
@@ -0,0 +1,46 @@
import { Highlight } from "prism-react-renderer";
import { cn } from "../../lib/utils";
import { CopyButton } from "./CopyButton";
import { Card } from "./card";
interface CodeBlockProps {
code: string;
language?: string;
className?: string;
canCopy?: boolean;
}
export const CodeBlock = ({
code,
language = "sh",
canCopy = true,
}: CodeBlockProps) => {
return (
<Highlight code={code} language={language}>
{({ className, tokens, getLineProps, getTokenProps }) => (
<Card className={className}>
{canCopy && (
<CopyButton text={code} className="float-right p-2 m-2" />
)}
<div
className={cn(
"block font-mono text-sm whitespace-pre-wrap p-4 overflow-auto",
className,
)}
>
{tokens.map((line, i) => (
// biome-ignore lint/suspicious/noArrayIndexKey: index IS the key here
<div {...getLineProps({ line, key: i })} key={i}>
{line.map((token, key) => (
// biome-ignore lint/suspicious/noArrayIndexKey: index IS the key here
<span {...getTokenProps({ token, key })} key={key} />
))}
</div>
))}
</div>
</Card>
)}
</Highlight>
);
};
@@ -0,0 +1,64 @@
import {
AlertDialog,
AlertDialogAction,
AlertDialogCancel,
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
AlertDialogHeader,
AlertDialogTitle,
AlertDialogTrigger,
} from "@/components/ui/alert-dialog";
import type { buttonVariants } from "@/components/ui/button";
import { cn } from "@/lib/utils";
import type { VariantProps } from "class-variance-authority";
import type React from "react";
export interface ConfirmationDialogProps
extends VariantProps<typeof buttonVariants> {
title?: React.ReactNode;
description?: React.ReactNode;
onSubmit?: () => void;
open?: boolean;
onOpenChange?: (open: boolean) => void;
children?: React.ReactNode;
className?: string;
}
export function ConfirmationDialog({
title,
description,
onSubmit,
open,
onOpenChange,
children,
variant = "primary",
className,
}: ConfirmationDialogProps) {
return (
<AlertDialog open={open} onOpenChange={onOpenChange}>
<AlertDialogTrigger asChild>{children}</AlertDialogTrigger>
<AlertDialogContent className={cn("w-[90vw] sm:w-auto", className)}>
<AlertDialogHeader className="w-full sm:w-auto">
<AlertDialogTitle>{title}</AlertDialogTitle>
<AlertDialogDescription>{description}</AlertDialogDescription>
</AlertDialogHeader>
<AlertDialogFooter className="w-full sm:w-auto">
<AlertDialogCancel>Cancel</AlertDialogCancel>
<AlertDialogAction
variant={variant}
type="submit"
onClick={() => {
onSubmit?.();
onOpenChange?.(false);
}}
>
Continue
</AlertDialogAction>
</AlertDialogFooter>
</AlertDialogContent>
</AlertDialog>
);
}
@@ -1,10 +1,7 @@
"use client";
import { CheckIcon, CopyIcon } from "lucide-react";
import { useState } from "react";
import { cn } from "../../lib/utils";
import { Button } from "./button";
import { ToolTipLabel } from "./tooltip";
import { cn } from "@/lib/utils";
import { CopyTextButton } from "./CopyTextButton";
export function CopyAddressButton(props: {
address: string;
@@ -17,36 +14,18 @@ export function CopyAddressButton(props: {
| "outline"
| "secondary"
| "ghost";
copyIconPosition: "left" | "right";
}) {
const [isCopied, setIsCopied] = useState(false);
const shortenedAddress = `${props.address.slice(0, 6)}...${props.address.slice(0, 4)}`;
return (
<ToolTipLabel label="Copy address">
<Button
variant={props.variant || "outline"}
aria-label="Copy"
className={cn(
"h-auto w-auto px-2.5 py-1.5 flex gap-2 text-xs rounded-lg font-mono text-foreground",
props.className,
)}
onClick={() => {
navigator.clipboard.writeText(props.address);
setIsCopied(true);
setTimeout(() => setIsCopied(false), 1000);
}}
>
{isCopied ? (
<CheckIcon
className={cn("size-3 text-green-500", props.iconClassName)}
/>
) : (
<CopyIcon
className={cn("size-3 text-muted-foreground", props.iconClassName)}
/>
)}
{shortenedAddress}
</Button>
</ToolTipLabel>
<CopyTextButton
textToCopy={props.address}
textToShow={shortenedAddress}
tooltip="Copy Address"
className={cn("font-mono text-sm", props.className)}
variant={props.variant}
copyIconPosition={props.copyIconPosition}
/>
);
}
@@ -1,8 +1,8 @@
"use client";
import { cn } from "@/lib/utils";
import { CheckIcon, CopyIcon } from "lucide-react";
import { useState } from "react";
import { cn } from "../../lib/utils";
import { Button } from "./button";
import { ToolTipLabel } from "./tooltip";
@@ -0,0 +1,67 @@
"use client";
import { cn } from "@/lib/utils";
import { CheckIcon, CopyIcon } from "lucide-react";
import { useState } from "react";
import { Button } from "./button";
import { ToolTipLabel } from "./tooltip";
export function CopyTextButton(props: {
textToShow: string;
textToCopy: string;
tooltip: string;
className?: string;
iconClassName?: string;
variant?:
| "primary"
| "default"
| "destructive"
| "outline"
| "secondary"
| "ghost";
copyIconPosition: "left" | "right";
}) {
const [isCopied, setIsCopied] = useState(false);
const copyButton = isCopied ? (
<CheckIcon
className={cn("size-3 text-green-500 shrink-0", props.iconClassName)}
/>
) : (
<CopyIcon
className={cn(
"size-3 text-muted-foreground shrink-0",
props.iconClassName,
)}
/>
);
return (
<ToolTipLabel label={props.tooltip}>
<Button
variant={props.variant || "outline"}
aria-label={props.tooltip}
className={cn(
"h-auto w-auto px-2.5 py-1.5 flex gap-2 rounded-lg text-foreground font-normal",
props.className,
)}
onClick={() => {
navigator.clipboard.writeText(props.textToCopy);
setIsCopied(true);
setTimeout(() => setIsCopied(false), 1000);
}}
>
{props.copyIconPosition === "right" ? (
<>
<span className="truncate min-w-0"> {props.textToShow} </span>
{copyButton}
</>
) : (
<>
{copyButton}
<span className="truncate min-w-0"> {props.textToShow} </span>
</>
)}
</Button>
</ToolTipLabel>
);
}
@@ -69,7 +69,7 @@ export function DatePickerWithRange(props: {
<DynamicHeight>
<div>
{!isValid && (
<p className="text-sm pt-2 justify-center text-destructive-foreground text-center flex items-center gap-2">
<p className="text-sm pt-2 justify-center text-destructive-text text-center flex items-center gap-2">
<CalendarX2Icon className="h-4 w-4" />
Invalid date range
</p>
@@ -113,9 +113,9 @@ export function DatePickerWithRange(props: {
}
}}
classNames={{
day_range_start: "!bg-inverted",
day_range_start: "!bg-inverted !text-inverted-foreground",
day_range_end:
"!bg-inverted/20 !text-inverted pointer-events-none",
"!bg-inverted/50 !text-inverted-foreground pointer-events-none",
}}
/>
)}
@@ -135,9 +135,9 @@ export function DatePickerWithRange(props: {
}
}}
classNames={{
day_range_end: "!bg-inverted",
day_range_end: "!bg-inverted !text-inverted-foreground",
day_range_start:
"!bg-inverted/20 !text-inverted pointer-events-none",
"!bg-inverted/50 !text-inverted-foreground pointer-events-none",
}}
/>
)}
@@ -1,7 +1,8 @@
"use client";
import { useIsomorphicLayoutEffect } from "@/lib/useIsomorphicLayoutEffect";
import type React from "react";
import { useLayoutEffect, useRef, useState } from "react";
import { useRef, useState } from "react";
export function DynamicHeight(props: {
children: React.ReactNode;
@@ -33,11 +34,11 @@ export function DynamicHeight(props: {
);
}
export function useHeightObserver() {
function useHeightObserver() {
const elementRef = useRef<HTMLDivElement>(null);
const [height, setHeight] = useState<number | undefined>();
useLayoutEffect(() => {
useIsomorphicLayoutEffect(() => {
const element = elementRef.current;
if (!element) {
return;
@@ -0,0 +1,25 @@
.unorderedList,
.orderedList {
@apply pl-5 leading-relaxed list-none text-secondary-foreground;
}
.unorderedList > li {
@apply pb-1 pl-2 list-disc;
}
.orderedList > li {
@apply pb-1 pl-2 list-decimal;
}
.unorderedList > li::marker {
@apply text-muted-foreground !m-0 text-left;
}
.orderedList > li::marker {
@apply text-muted-foreground text-left;
}
.unorderedList > li:hover::marker,
.orderedList > li:hover::marker {
@apply text-foreground;
}
@@ -0,0 +1,9 @@
import styles from "./List.module.css";
export function UnorderedList(props: { children?: React.ReactNode }) {
return <ul className={styles.unorderedList}>{props.children}</ul>;
}
export function OrderedList(props: { children?: React.ReactNode }) {
return <ul className={styles.orderedList}>{props.children}</ul>;
}
@@ -0,0 +1,25 @@
"use client";
import { cn } from "@/lib/utils";
import Link from "next/link";
import { usePathname } from "next/navigation";
export type NavButtonProps = {
className?: string;
activeClassName?: string;
href: string;
};
export function NavLink(props: React.PropsWithChildren<NavButtonProps>) {
const pathname = usePathname();
const isActive = pathname ? pathname.startsWith(props.href) : false;
return (
<Link
href={props.href}
className={cn(props.className, isActive && props.activeClassName)}
target={props.href.startsWith("http") ? "_blank" : undefined}
>
{props.children}
</Link>
);
}
@@ -1,7 +1,8 @@
"use client";
import { useIsomorphicLayoutEffect } from "@/lib/useIsomorphicLayoutEffect";
import { cn } from "@/lib/utils";
import { useLayoutEffect, useRef } from "react";
import { useRef } from "react";
import styles from "./ScrollShadow.module.css";
export function ScrollShadow(props: {
@@ -17,7 +18,7 @@ export function ScrollShadow(props: {
const shadowRightEl = useRef<HTMLDivElement>(null);
const wrapperEl = useRef<HTMLDivElement>(null);
useLayoutEffect(() => {
useIsomorphicLayoutEffect(() => {
const content = scrollableEl.current;
const shadowTop = shadowTopEl.current;
const shadowBottom = shadowBottomEl.current;
@@ -0,0 +1,146 @@
"use client";
import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog";
import * as React from "react";
import { buttonVariants } from "@/components/ui/button";
import { cn } from "@/lib/utils";
import type { VariantProps } from "class-variance-authority";
const AlertDialog = AlertDialogPrimitive.Root;
const AlertDialogTrigger = AlertDialogPrimitive.Trigger;
const AlertDialogPortal = AlertDialogPrimitive.Portal;
const AlertDialogOverlay = React.forwardRef<
React.ElementRef<typeof AlertDialogPrimitive.Overlay>,
React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Overlay>
>(({ className, ...props }, ref) => (
<AlertDialogPrimitive.Overlay
className={cn(
"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
className,
)}
{...props}
ref={ref}
/>
));
AlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName;
const AlertDialogContent = React.forwardRef<
React.ElementRef<typeof AlertDialogPrimitive.Content>,
React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Content>
>(({ className, ...props }, ref) => (
<AlertDialogPortal>
<AlertDialogOverlay />
<AlertDialogPrimitive.Content
ref={ref}
className={cn(
"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] rounded-lg",
className,
)}
{...props}
/>
</AlertDialogPortal>
));
AlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName;
const AlertDialogHeader = ({
className,
...props
}: React.HTMLAttributes<HTMLDivElement>) => (
<div
className={cn(
"flex flex-col space-y-2 text-center sm:text-left",
className,
)}
{...props}
/>
);
AlertDialogHeader.displayName = "AlertDialogHeader";
const AlertDialogFooter = ({
className,
...props
}: React.HTMLAttributes<HTMLDivElement>) => (
<div
className={cn(
"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
className,
)}
{...props}
/>
);
AlertDialogFooter.displayName = "AlertDialogFooter";
const AlertDialogTitle = React.forwardRef<
React.ElementRef<typeof AlertDialogPrimitive.Title>,
React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Title>
>(({ className, ...props }, ref) => (
<AlertDialogPrimitive.Title
ref={ref}
className={cn("text-lg hyphens-auto font-semibold", className)}
{...props}
/>
));
AlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName;
const AlertDialogDescription = React.forwardRef<
React.ElementRef<typeof AlertDialogPrimitive.Description>,
React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Description>
>(({ className, ...props }, ref) => (
<AlertDialogPrimitive.Description
ref={ref}
className={cn("text-sm text-muted-foreground", className)}
{...props}
/>
));
AlertDialogDescription.displayName =
AlertDialogPrimitive.Description.displayName;
interface AlertDialogActionProps
extends React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Action>,
VariantProps<typeof buttonVariants> {}
const AlertDialogAction = React.forwardRef<
React.ElementRef<typeof AlertDialogPrimitive.Action>,
AlertDialogActionProps
>((props: AlertDialogActionProps, ref) => (
<AlertDialogPrimitive.Action
ref={ref}
className={cn(buttonVariants({ variant: props.variant }), props.className)}
{...props}
/>
));
AlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName;
const AlertDialogCancel = React.forwardRef<
React.ElementRef<typeof AlertDialogPrimitive.Cancel>,
React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Cancel>
>(({ className, ...props }, ref) => (
<AlertDialogPrimitive.Cancel
ref={ref}
className={cn(
buttonVariants({ variant: "outline" }),
"mt-2 sm:mt-0",
className,
)}
{...props}
/>
));
AlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName;
export {
AlertDialog,
AlertDialogPortal,
AlertDialogOverlay,
AlertDialogTrigger,
AlertDialogContent,
AlertDialogHeader,
AlertDialogFooter,
AlertDialogTitle,
AlertDialogDescription,
AlertDialogAction,
AlertDialogCancel,
};
@@ -0,0 +1,65 @@
import { type VariantProps, cva } from "class-variance-authority";
import * as React from "react";
import { cn } from "@/lib/utils";
const alertVariants = cva(
"relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",
{
variants: {
variant: {
default: "bg-background text-foreground",
destructive:
"bg-destructive/30 border-destructive/50 dark:border-destructive [&>svg]:text-destructive",
info: "bg-primary/10 border-primary/50 dark:border-primary [&>svg]:text-primary",
warning:
"bg-warning/10 border-warning/50 dark:border-warning [&>svg]:text-warning",
},
},
defaultVariants: {
variant: "default",
},
},
);
const Alert = React.forwardRef<
HTMLDivElement,
React.HTMLAttributes<HTMLDivElement> & VariantProps<typeof alertVariants>
>(({ className, variant, ...props }, ref) => (
<div
ref={ref}
role="alert"
className={cn(alertVariants({ variant }), className)}
{...props}
/>
));
Alert.displayName = "Alert";
const AlertTitle = React.forwardRef<
HTMLParagraphElement,
React.HTMLAttributes<HTMLHeadingElement>
>(({ className, ...props }, ref) => (
<h5
ref={ref}
className={cn("mb-1.5 font-medium leading-none tracking-tight", className)}
{...props}
/>
));
AlertTitle.displayName = "AlertTitle";
const AlertDescription = React.forwardRef<
HTMLParagraphElement,
React.HTMLAttributes<HTMLParagraphElement>
>(({ className, ...props }, ref) => (
<div
ref={ref}
className={cn(
"text-sm [&_p]:leading-relaxed text-secondary-foreground",
className,
)}
{...props}
/>
));
AlertDescription.displayName = "AlertDescription";
export { Alert, AlertTitle, AlertDescription };
+4 -6
View File
@@ -4,20 +4,18 @@ import type * as React from "react";
import { cn } from "@/lib/utils";
const badgeVariants = cva(
"inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 leading-4",
"inline-flex items-center rounded-full border border-border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 leading-4",
{
variants: {
variant: {
default:
"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",
default: "border-transparent bg-primary/[0.08] text-primary",
secondary:
"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",
"border-transparent bg-accent text-accent-foreground hover:bg-accent/80",
destructive:
"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",
warning: "border-transparent bg-warning text-warning-foreground",
outline: "text-foreground",
success:
"border-transparent bg-success text-success-foreground hover:bg-success/80",
success: "border-transparent bg-success text-success-foreground",
},
},
defaultVariants: {
@@ -10,15 +10,15 @@ const buttonVariants = cva(
variants: {
variant: {
primary:
"bg-primary text-primary-foreground hover:bg-primary/90 text-semibold",
"bg-primary hover:bg-primary/90 text-semibold text-primary-foreground ",
default: "bg-foreground text-background hover:bg-foreground/90",
destructive:
"bg-destructive text-destructive-foreground hover:bg-destructive/90 text-semibold",
"bg-destructive hover:bg-destructive/90 text-semibold text-destructive-foreground ",
outline:
"border border-input bg-transaprent hover:bg-accent hover:text-accent-foreground text-semibold",
secondary:
"bg-secondary text-secondary-foreground hover:bg-secondary/80 text-semibold",
ghost: "hover:bg-accent hover:text-accent-foreground text-semibold",
"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",
},
size: {
@@ -44,10 +44,13 @@ export interface ButtonProps
const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
({ className, variant, size, asChild = false, ...props }, ref) => {
const Comp = asChild ? Slot : "button";
const btnOnlyProps =
Comp === "button" ? { type: "button" as const } : undefined;
return (
<Comp
className={cn(buttonVariants({ variant, size, className }))}
ref={ref}
{...btnOnlyProps}
{...props}
/>
);
+1 -1
View File
@@ -9,7 +9,7 @@ const Card = React.forwardRef<
<div
ref={ref}
className={cn(
"rounded-lg border bg-card text-card-foreground shadow-sm",
"rounded-lg border border-border bg-card text-card-foreground shadow-sm",
className,
)}
{...props}
@@ -0,0 +1,368 @@
"use client";
import * as React from "react";
import * as RechartsPrimitive from "recharts";
import { cn } from "@/lib/utils";
// Format: { THEME_NAME: CSS_SELECTOR }
const THEMES = { light: "", dark: ".dark" } as const;
export type ChartConfig = {
[k in string]: {
label?: React.ReactNode;
icon?: React.ComponentType;
} & (
| { color?: string; theme?: never }
| { color?: never; theme: Record<keyof typeof THEMES, string> }
);
};
type ChartContextProps = {
config: ChartConfig;
};
const ChartContext = React.createContext<ChartContextProps | null>(null);
function useChart() {
const context = React.useContext(ChartContext);
if (!context) {
throw new Error("useChart must be used within a <ChartContainer />");
}
return context;
}
const ChartContainer = React.forwardRef<
HTMLDivElement,
React.ComponentProps<"div"> & {
config: ChartConfig;
children: React.ComponentProps<
typeof RechartsPrimitive.ResponsiveContainer
>["children"];
}
>(({ id, className, children, config, ...props }, ref) => {
const uniqueId = React.useId();
const chartId = `chart-${id || uniqueId.replace(/:/g, "")}`;
return (
<ChartContext.Provider value={{ config }}>
<div
data-chart={chartId}
ref={ref}
className={cn(
"flex aspect-video justify-center text-xs [&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-none [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-sector]:outline-none [&_.recharts-surface]:outline-none",
className,
)}
{...props}
>
<ChartStyle id={chartId} config={config} />
<RechartsPrimitive.ResponsiveContainer>
{children}
</RechartsPrimitive.ResponsiveContainer>
</div>
</ChartContext.Provider>
);
});
ChartContainer.displayName = "Chart";
const ChartStyle = ({ id, config }: { id: string; config: ChartConfig }) => {
const colorConfig = Object.entries(config).filter(
// eslint-disable-next-line @typescript-eslint/no-unused-vars
([_, config]) => config.theme || config.color,
);
if (!colorConfig.length) {
return null;
}
return (
<style
// biome-ignore lint/security/noDangerouslySetInnerHtml: <explanation>
dangerouslySetInnerHTML={{
__html: Object.entries(THEMES)
.map(
([theme, prefix]) => `
${prefix} [data-chart=${id}] {
${colorConfig
.map(([key, itemConfig]) => {
const color =
itemConfig.theme?.[theme as keyof typeof itemConfig.theme] ||
itemConfig.color;
return color ? ` --color-${key}: ${color};` : null;
})
.join("\n")}
}
`,
)
.join("\n"),
}}
/>
);
};
const ChartTooltip = RechartsPrimitive.Tooltip;
const ChartTooltipContent = React.forwardRef<
HTMLDivElement,
React.ComponentProps<typeof RechartsPrimitive.Tooltip> &
React.ComponentProps<"div"> & {
hideLabel?: boolean;
hideIndicator?: boolean;
indicator?: "line" | "dot" | "dashed";
nameKey?: string;
labelKey?: string;
}
>(
(
{
active,
payload,
className,
indicator = "dot",
hideLabel = false,
hideIndicator = false,
label,
labelFormatter,
labelClassName,
formatter,
color,
nameKey,
labelKey,
},
ref,
) => {
const { config } = useChart();
const tooltipLabel = React.useMemo(() => {
if (hideLabel || !payload?.length) {
return null;
}
const [item] = payload;
const key = `${labelKey || item.dataKey || item.name || "value"}`;
const itemConfig = getPayloadConfigFromPayload(config, item, key);
const value =
!labelKey && typeof label === "string"
? config[label as keyof typeof config]?.label || label
: itemConfig?.label;
if (labelFormatter) {
return (
<div className={cn("font-medium", labelClassName)}>
{labelFormatter(value, payload)}
</div>
);
}
if (!value) {
return null;
}
return <div className={cn("font-medium", labelClassName)}>{value}</div>;
}, [
label,
labelFormatter,
payload,
hideLabel,
labelClassName,
config,
labelKey,
]);
if (!active || !payload?.length) {
return null;
}
const nestLabel = payload.length === 1 && indicator !== "dot";
return (
<div
ref={ref}
className={cn(
"grid min-w-[8rem] items-start gap-1.5 rounded-lg border border-border/50 bg-background px-2.5 py-1.5 text-xs shadow-xl",
className,
)}
>
{!nestLabel ? tooltipLabel : null}
<div className="grid gap-1.5">
{payload.map((item, index) => {
const key = `${nameKey || item.name || item.dataKey || "value"}`;
const itemConfig = getPayloadConfigFromPayload(config, item, key);
const indicatorColor = color || item.payload.fill || item.color;
return (
<div
key={item.dataKey}
className={cn(
"flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-muted-foreground",
indicator === "dot" && "items-center",
)}
>
{formatter && item?.value !== undefined && item.name ? (
formatter(item.value, item.name, item, index, item.payload)
) : (
<>
{/* Icon */}
{itemConfig?.icon ? (
<itemConfig.icon />
) : (
!hideIndicator && (
<div
className={cn(
"shrink-0 rounded-[2px] border-[--color-border] bg-[--color-bg]",
{
"h-2.5 w-2.5": indicator === "dot",
"w-1": indicator === "line",
"w-0 border-[1.5px] border-dashed bg-transparent":
indicator === "dashed",
"my-0.5": nestLabel && indicator === "dashed",
},
)}
style={
{
"--color-bg": indicatorColor,
"--color-border": indicatorColor,
} as React.CSSProperties
}
/>
)
)}
<div
className={cn(
"flex flex-1 gap-2 justify-between leading-none",
nestLabel ? "items-end" : "items-center",
)}
>
<div className="grid gap-1.5">
{nestLabel ? tooltipLabel : null}
<span className="text-muted-foreground">
{itemConfig?.label || item.name}
</span>
</div>
{item.value && (
<span className="font-mono font-medium tabular-nums text-foreground">
{item.value}
</span>
)}
</div>
</>
)}
</div>
);
})}
</div>
</div>
);
},
);
ChartTooltipContent.displayName = "ChartTooltip";
const ChartLegend = RechartsPrimitive.Legend;
const ChartLegendContent = React.forwardRef<
HTMLDivElement,
React.ComponentProps<"div"> &
Pick<RechartsPrimitive.LegendProps, "payload" | "verticalAlign"> & {
hideIcon?: boolean;
nameKey?: string;
}
>(
(
{ className, hideIcon = false, payload, verticalAlign = "bottom", nameKey },
ref,
) => {
const { config } = useChart();
if (!payload?.length) {
return null;
}
return (
<div
ref={ref}
className={cn(
"flex items-center justify-center gap-4 overflow-x-auto",
verticalAlign === "top" ? "pb-3" : "pt-3",
className,
)}
>
{payload.map((item) => {
const key = `${nameKey || item.dataKey || "value"}`;
const itemConfig = getPayloadConfigFromPayload(config, item, key);
return (
<div
key={item.value}
className={cn(
"flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3 [&>svg]:text-muted-foreground",
)}
>
{itemConfig?.icon && !hideIcon ? (
<itemConfig.icon />
) : (
<div
className="h-2 w-2 shrink-0 rounded-[2px]"
style={{
backgroundColor: item.color,
}}
/>
)}
{itemConfig?.label}
</div>
);
})}
</div>
);
},
);
ChartLegendContent.displayName = "ChartLegend";
// Helper to extract item config from a payload.
function getPayloadConfigFromPayload(
config: ChartConfig,
payload: unknown,
key: string,
) {
if (typeof payload !== "object" || payload === null) {
return undefined;
}
const payloadPayload =
"payload" in payload &&
typeof payload.payload === "object" &&
payload.payload !== null
? payload.payload
: undefined;
let configLabelKey: string = key;
if (
key in payload &&
typeof payload[key as keyof typeof payload] === "string"
) {
configLabelKey = payload[key as keyof typeof payload] as string;
} else if (
payloadPayload &&
key in payloadPayload &&
typeof payloadPayload[key as keyof typeof payloadPayload] === "string"
) {
configLabelKey = payloadPayload[
key as keyof typeof payloadPayload
] as string;
}
return configLabelKey in config
? config[configLabelKey]
: config[key as keyof typeof config];
}
export {
ChartContainer,
ChartTooltip,
ChartTooltipContent,
ChartLegend,
ChartLegendContent,
ChartStyle,
};
@@ -28,3 +28,19 @@ const Checkbox = React.forwardRef<
Checkbox.displayName = CheckboxPrimitive.Root.displayName;
export { Checkbox };
export function CheckboxWithLabel(props: {
children: React.ReactNode;
className?: string;
}) {
return (
<label
className={cn(
"flex gap-2 items-start text-secondary-foreground text-sm cursor-pointer select-none [&>button]:mt-0.5",
props.className,
)}
>
{props.children}
</label>
);
}
@@ -0,0 +1,137 @@
"use client";
import * as DialogPrimitive from "@radix-ui/react-dialog";
import { X } from "lucide-react";
import * as React from "react";
import { cn } from "@/lib/utils";
const Dialog = DialogPrimitive.Root;
const DialogTrigger = DialogPrimitive.Trigger;
const DialogPortal = DialogPrimitive.Portal;
const DialogClose = DialogPrimitive.Close;
const DialogOverlay = React.forwardRef<
React.ElementRef<typeof DialogPrimitive.Overlay>,
React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>
>(({ className, ...props }, ref) => (
<DialogPrimitive.Overlay
ref={ref}
className={cn(
"fixed inset-0 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
className,
)}
{...props}
/>
));
DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
const DialogContent = React.forwardRef<
React.ElementRef<typeof DialogPrimitive.Content>,
React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content> & {
dialogOverlayClassName?: string;
dialogCloseClassName?: string;
}
>(({ className, children, ...props }, ref) => (
<DialogPortal>
<DialogOverlay className={props.dialogOverlayClassName} />
<DialogPrimitive.Content
ref={ref}
className={cn(
"fixed grid w-full max-w-lg gap-4 border bg-background p-6 shadow-lg duration-300 rounded-t-xl md:rounded-lg border-border",
// on mobile - put the dialog at the bottom of the screen, animate - slide up and fade in
"bottom-0 left-0 right-0",
"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",
// on desktop - vertically and horizontally center the dialog, animate - zoom and fade in
"md:bottom-auto md:left-[50%] md:top-[50%] md:translate-x-[-50%] md:translate-y-[-50%] ",
"md:data-[state=closed]:zoom-out-95 md:data-[state=open]:zoom-in-95 ",
"md:data-[state=closed]:slide-out-to-left-1/2 md:data-[state=closed]:slide-out-to-top-[48%] ",
"md:data-[state=open]:slide-in-from-left-1/2 md:data-[state=open]:slide-in-from-top-[48%] ",
"data-[state=open]:animate-in data-[state=closed]:animate-out",
"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
className,
)}
{...props}
>
{children}
<DialogPrimitive.Close
className={cn(
"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",
props.dialogCloseClassName,
)}
>
<X className="h-4 w-4" />
<span className="sr-only">Close</span>
</DialogPrimitive.Close>
</DialogPrimitive.Content>
</DialogPortal>
));
DialogContent.displayName = DialogPrimitive.Content.displayName;
const DialogHeader = ({
className,
...props
}: React.HTMLAttributes<HTMLDivElement>) => (
<div
className={cn("flex flex-col space-y-1.5 text-left", className)}
{...props}
/>
);
DialogHeader.displayName = "DialogHeader";
const DialogFooter = ({
className,
...props
}: React.HTMLAttributes<HTMLDivElement>) => (
<div
className={cn(
"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
className,
)}
{...props}
/>
);
DialogFooter.displayName = "DialogFooter";
const DialogTitle = React.forwardRef<
React.ElementRef<typeof DialogPrimitive.Title>,
React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>
>(({ className, ...props }, ref) => (
<DialogPrimitive.Title
ref={ref}
className={cn(
"text-lg font-semibold leading-none tracking-tight",
className,
)}
{...props}
/>
));
DialogTitle.displayName = DialogPrimitive.Title.displayName;
const DialogDescription = React.forwardRef<
React.ElementRef<typeof DialogPrimitive.Description>,
React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>
>(({ className, ...props }, ref) => (
<DialogPrimitive.Description
ref={ref}
className={cn("text-sm text-muted-foreground", className)}
{...props}
/>
));
DialogDescription.displayName = DialogPrimitive.Description.displayName;
export {
Dialog,
DialogPortal,
DialogOverlay,
DialogClose,
DialogTrigger,
DialogContent,
DialogHeader,
DialogFooter,
DialogTitle,
DialogDescription,
};
@@ -0,0 +1,118 @@
"use client";
import * as React from "react";
import { Drawer as DrawerPrimitive } from "vaul";
import { cn } from "@/lib/utils";
const Drawer = ({
shouldScaleBackground = true,
...props
}: React.ComponentProps<typeof DrawerPrimitive.Root>) => (
<DrawerPrimitive.Root
shouldScaleBackground={shouldScaleBackground}
{...props}
/>
);
Drawer.displayName = "Drawer";
const DrawerTrigger = DrawerPrimitive.Trigger;
const DrawerPortal = DrawerPrimitive.Portal;
const DrawerClose = DrawerPrimitive.Close;
const DrawerOverlay = React.forwardRef<
React.ElementRef<typeof DrawerPrimitive.Overlay>,
React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Overlay>
>(({ className, ...props }, ref) => (
<DrawerPrimitive.Overlay
ref={ref}
className={cn("fixed inset-0 z-50 bg-black/80", className)}
{...props}
/>
));
DrawerOverlay.displayName = DrawerPrimitive.Overlay.displayName;
const DrawerContent = React.forwardRef<
React.ElementRef<typeof DrawerPrimitive.Content>,
React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Content>
>(({ className, children, ...props }, ref) => (
<DrawerPortal>
<DrawerOverlay />
<DrawerPrimitive.Content
ref={ref}
className={cn(
"fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background",
className,
)}
{...props}
>
<div className="mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted" />
{children}
</DrawerPrimitive.Content>
</DrawerPortal>
));
DrawerContent.displayName = "DrawerContent";
const DrawerHeader = ({
className,
...props
}: React.HTMLAttributes<HTMLDivElement>) => (
<div
className={cn("grid gap-1.5 p-4 text-center sm:text-left", className)}
{...props}
/>
);
DrawerHeader.displayName = "DrawerHeader";
const DrawerFooter = ({
className,
...props
}: React.HTMLAttributes<HTMLDivElement>) => (
<div
className={cn("mt-auto flex flex-col gap-2 p-4", className)}
{...props}
/>
);
DrawerFooter.displayName = "DrawerFooter";
const DrawerTitle = React.forwardRef<
React.ElementRef<typeof DrawerPrimitive.Title>,
React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Title>
>(({ className, ...props }, ref) => (
<DrawerPrimitive.Title
ref={ref}
className={cn(
"text-lg font-semibold leading-none tracking-tight",
className,
)}
{...props}
/>
));
DrawerTitle.displayName = DrawerPrimitive.Title.displayName;
const DrawerDescription = React.forwardRef<
React.ElementRef<typeof DrawerPrimitive.Description>,
React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Description>
>(({ className, ...props }, ref) => (
<DrawerPrimitive.Description
ref={ref}
className={cn("text-sm text-muted-foreground", className)}
{...props}
/>
));
DrawerDescription.displayName = DrawerPrimitive.Description.displayName;
export {
Drawer,
DrawerPortal,
DrawerOverlay,
DrawerTrigger,
DrawerClose,
DrawerContent,
DrawerHeader,
DrawerFooter,
DrawerTitle,
DrawerDescription,
};
@@ -0,0 +1,200 @@
"use client";
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
import { Check, ChevronRight, Circle } from "lucide-react";
import * as React from "react";
import { cn } from "@/lib/utils";
const DropdownMenu = DropdownMenuPrimitive.Root;
const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
const DropdownMenuGroup = DropdownMenuPrimitive.Group;
const DropdownMenuPortal = DropdownMenuPrimitive.Portal;
const DropdownMenuSub = DropdownMenuPrimitive.Sub;
const DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
const DropdownMenuSubTrigger = React.forwardRef<
React.ElementRef<typeof DropdownMenuPrimitive.SubTrigger>,
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubTrigger> & {
inset?: boolean;
}
>(({ className, inset, children, ...props }, ref) => (
<DropdownMenuPrimitive.SubTrigger
ref={ref}
className={cn(
"flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",
inset && "pl-8",
className,
)}
{...props}
>
{children}
<ChevronRight className="ml-auto h-4 w-4" />
</DropdownMenuPrimitive.SubTrigger>
));
DropdownMenuSubTrigger.displayName =
DropdownMenuPrimitive.SubTrigger.displayName;
const DropdownMenuSubContent = React.forwardRef<
React.ElementRef<typeof DropdownMenuPrimitive.SubContent>,
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubContent>
>(({ className, ...props }, ref) => (
<DropdownMenuPrimitive.SubContent
ref={ref}
className={cn(
"z-50 min-w-[8rem] overflow-hidden rounded-md border border-border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
className,
)}
{...props}
/>
));
DropdownMenuSubContent.displayName =
DropdownMenuPrimitive.SubContent.displayName;
const DropdownMenuContent = React.forwardRef<
React.ElementRef<typeof DropdownMenuPrimitive.Content>,
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content>
>(({ className, sideOffset = 4, ...props }, ref) => (
<DropdownMenuPrimitive.Portal>
<DropdownMenuPrimitive.Content
ref={ref}
sideOffset={sideOffset}
className={cn(
"z-50 min-w-[8rem] overflow-hidden rounded-md border border-border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
className,
)}
{...props}
/>
</DropdownMenuPrimitive.Portal>
));
DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
const DropdownMenuItem = React.forwardRef<
React.ElementRef<typeof DropdownMenuPrimitive.Item>,
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> & {
inset?: boolean;
}
>(({ className, inset, ...props }, ref) => (
<DropdownMenuPrimitive.Item
ref={ref}
className={cn(
"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
inset && "pl-8",
className,
)}
{...props}
/>
));
DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
const DropdownMenuCheckboxItem = React.forwardRef<
React.ElementRef<typeof DropdownMenuPrimitive.CheckboxItem>,
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.CheckboxItem>
>(({ className, children, checked, ...props }, ref) => (
<DropdownMenuPrimitive.CheckboxItem
ref={ref}
className={cn(
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
className,
)}
checked={checked}
{...props}
>
<span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
<DropdownMenuPrimitive.ItemIndicator>
<Check className="h-4 w-4" />
</DropdownMenuPrimitive.ItemIndicator>
</span>
{children}
</DropdownMenuPrimitive.CheckboxItem>
));
DropdownMenuCheckboxItem.displayName =
DropdownMenuPrimitive.CheckboxItem.displayName;
const DropdownMenuRadioItem = React.forwardRef<
React.ElementRef<typeof DropdownMenuPrimitive.RadioItem>,
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioItem>
>(({ className, children, ...props }, ref) => (
<DropdownMenuPrimitive.RadioItem
ref={ref}
className={cn(
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
className,
)}
{...props}
>
<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" />
</DropdownMenuPrimitive.ItemIndicator>
</span>
{children}
</DropdownMenuPrimitive.RadioItem>
));
DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
const DropdownMenuLabel = React.forwardRef<
React.ElementRef<typeof DropdownMenuPrimitive.Label>,
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label> & {
inset?: boolean;
}
>(({ className, inset, ...props }, ref) => (
<DropdownMenuPrimitive.Label
ref={ref}
className={cn(
"px-2 py-1.5 text-sm font-semibold",
inset && "pl-8",
className,
)}
{...props}
/>
));
DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
const DropdownMenuSeparator = React.forwardRef<
React.ElementRef<typeof DropdownMenuPrimitive.Separator>,
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator>
>(({ className, ...props }, ref) => (
<DropdownMenuPrimitive.Separator
ref={ref}
className={cn("-mx-1 my-1 h-px bg-muted", className)}
{...props}
/>
));
DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;
const DropdownMenuShortcut = ({
className,
...props
}: React.HTMLAttributes<HTMLSpanElement>) => {
return (
<span
className={cn("ml-auto text-xs tracking-widest opacity-60", className)}
{...props}
/>
);
};
DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
export {
DropdownMenu,
DropdownMenuTrigger,
DropdownMenuContent,
DropdownMenuItem,
DropdownMenuCheckboxItem,
DropdownMenuRadioItem,
DropdownMenuLabel,
DropdownMenuSeparator,
DropdownMenuShortcut,
DropdownMenuGroup,
DropdownMenuPortal,
DropdownMenuSub,
DropdownMenuSubContent,
DropdownMenuSubTrigger,
DropdownMenuRadioGroup,
};
+203
View File
@@ -0,0 +1,203 @@
import type * as LabelPrimitive from "@radix-ui/react-label";
import { Slot } from "@radix-ui/react-slot";
import * as React from "react";
import {
Controller,
type ControllerProps,
type FieldPath,
type FieldValues,
FormProvider,
useFormContext,
} from "react-hook-form";
import { Label } from "@/components/ui/label";
import { cn } from "@/lib/utils";
import { ToolTipLabel } from "./tooltip";
const Form = FormProvider;
type FormFieldContextValue<
TFieldValues extends FieldValues = FieldValues,
TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,
> = {
name: TName;
};
const FormFieldContext = React.createContext<FormFieldContextValue>(
{} as FormFieldContextValue,
);
const FormField = <
TFieldValues extends FieldValues = FieldValues,
TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,
>({
...props
}: ControllerProps<TFieldValues, TName>) => {
return (
<FormFieldContext.Provider value={{ name: props.name }}>
<Controller {...props} />
</FormFieldContext.Provider>
);
};
const useFormField = () => {
const fieldContext = React.useContext(FormFieldContext);
const itemContext = React.useContext(FormItemContext);
const { getFieldState, formState } = useFormContext();
const fieldState = getFieldState(fieldContext.name, formState);
if (!fieldContext) {
throw new Error("useFormField should be used within <FormField>");
}
const { id } = itemContext;
return {
id,
name: fieldContext.name,
formItemId: `${id}-form-item`,
formDescriptionId: `${id}-form-item-description`,
formMessageId: `${id}-form-item-message`,
...fieldState,
};
};
type FormItemContextValue = {
id: string;
};
const FormItemContext = React.createContext<FormItemContextValue>(
{} as FormItemContextValue,
);
const FormItem = React.forwardRef<
HTMLDivElement,
React.HTMLAttributes<HTMLDivElement>
>(({ className, ...props }, ref) => {
const id = React.useId();
return (
<FormItemContext.Provider value={{ id }}>
<div ref={ref} className={cn("space-y-2", className)} {...props} />
</FormItemContext.Provider>
);
});
FormItem.displayName = "FormItem";
const FormLabel = React.forwardRef<
React.ElementRef<typeof LabelPrimitive.Root>,
React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root>
>(({ className, ...props }, ref) => {
const { error, formItemId } = useFormField();
return (
<Label
ref={ref}
className={cn(error && "text-destructive-text", className)}
htmlFor={formItemId}
{...props}
/>
);
});
FormLabel.displayName = "FormLabel";
const RequiredFormLabel = React.forwardRef<
React.ElementRef<typeof LabelPrimitive.Root>,
React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root>
>(({ className, ...props }, ref) => {
const { error, formItemId } = useFormField();
return (
<ToolTipLabel label="Required">
<Label
ref={ref}
className={cn(error && "text-destructive-text", "relative", className)}
htmlFor={formItemId}
{...props}
>
{props.children}
<span className="absolute -top-1.5 -right-2 text-destructive-text">
•
</span>
</Label>
</ToolTipLabel>
);
});
FormLabel.displayName = "FormLabel";
const FormControl = React.forwardRef<
React.ElementRef<typeof Slot>,
React.ComponentPropsWithoutRef<typeof Slot>
>(({ ...props }, ref) => {
const { error, formItemId, formDescriptionId, formMessageId } =
useFormField();
return (
<Slot
ref={ref}
id={formItemId}
aria-describedby={
!error
? `${formDescriptionId}`
: `${formDescriptionId} ${formMessageId}`
}
aria-invalid={!!error}
{...props}
/>
);
});
FormControl.displayName = "FormControl";
const FormDescription = React.forwardRef<
HTMLParagraphElement,
React.HTMLAttributes<HTMLParagraphElement>
>(({ className, ...props }, ref) => {
const { formDescriptionId } = useFormField();
return (
<p
ref={ref}
id={formDescriptionId}
className={cn("text-sm text-muted-foreground", className)}
{...props}
/>
);
});
FormDescription.displayName = "FormDescription";
const FormMessage = React.forwardRef<
HTMLParagraphElement,
React.HTMLAttributes<HTMLParagraphElement>
>(({ className, children, ...props }, ref) => {
const { error, formMessageId } = useFormField();
const body = error ? String(error?.message) : children;
if (!body) {
return null;
}
return (
<p
ref={ref}
id={formMessageId}
className={cn("text-sm font-medium text-destructive-text", className)}
{...props}
>
{body}
</p>
);
});
FormMessage.displayName = "FormMessage";
export {
useFormField,
Form,
FormItem,
FormLabel,
RequiredFormLabel,
FormControl,
FormDescription,
FormMessage,
FormField,
};
@@ -0,0 +1,63 @@
"use client";
import * as React from "react";
import { cn } from "@/lib/utils";
import { UploadIcon } from "lucide-react";
import Image from "next/image";
import { useDropzone } from "react-dropzone";
export interface ImageUploadProps
extends React.InputHTMLAttributes<HTMLInputElement> {
onUpload?: (files: File[]) => void;
}
const ImageUpload = React.forwardRef<HTMLInputElement, ImageUploadProps>(
({ className, onUpload, ...props }, ref) => {
const [activeFile, setActiveFile] = React.useState<File | null>(null);
const onDrop = React.useCallback(
(acceptedFiles: File[]) => {
setActiveFile(acceptedFiles[0]);
onUpload?.(acceptedFiles);
},
[onUpload],
);
const { getRootProps, getInputProps, isDragActive } = useDropzone({
onDrop,
});
return (
<div className="flex items-start">
<div
{...getRootProps()}
className={cn(
"border bg-card relative group cursor-pointer hover:border-primary flex-col gap-1.5 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 overflow-hidden transition-all rounded-md flex items-center justify-center p-4 py-6 text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",
isDragActive ? "border-primary" : "border-input",
!activeFile ? "w-full" : "min-h-32 min-w-32",
className,
)}
>
<input ref={ref} {...getInputProps()} {...props} />
{activeFile ? (
<Image
className="object-contain object-center "
src={URL.createObjectURL(activeFile)}
fill
alt=""
/>
) : (
<>
<UploadIcon className="w-5 h-5 transition-all group-hover:scale-110" />
<p className="text-xs text-center">
Drag and drop a file or click to upload
</p>
</>
)}
</div>
</div>
);
},
);
ImageUpload.displayName = "Input";
export { ImageUpload };
+1 -1
View File
@@ -11,7 +11,7 @@ const Input = React.forwardRef<HTMLInputElement, InputProps>(
<input
type={type}
className={cn(
"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
"flex h-10 w-full rounded-md border border-input bg-card px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
className,
)}
ref={ref}
@@ -5,6 +5,7 @@ import { Circle } from "lucide-react";
import * as React from "react";
import { cn } from "@/lib/utils";
import { Label } from "./label";
const RadioGroup = React.forwardRef<
React.ElementRef<typeof RadioGroupPrimitive.Root>,
@@ -41,4 +42,34 @@ const RadioGroupItem = React.forwardRef<
});
RadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName;
export { RadioGroup, RadioGroupItem };
// Displays the radio item as a button-like element
const RadioGroupItemButton = React.forwardRef<
React.ElementRef<typeof RadioGroupPrimitive.Item>,
React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item>
>(({ className, ...props }, ref) => {
return (
<RadioGroupPrimitive.Item
ref={ref}
className={cn(
"cursor-pointer group flex items-center px-3 peer-hover:border-nonce py-4 space-x-3 space-y-0 border-2 rounded-md min-w-32 font-medium hover:border-foreground/25 transition-all data-[state=checked]:border-primary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
className,
)}
{...props}
>
<div className="flex items-center justify-center w-4 h-4 border-2 rounded-full transition-all group-data-[state=checked]:border-primary text-primary group-hover:border-foreground/25 aspect-square ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50">
{/* Show on checked */}
<RadioGroupPrimitive.Indicator className="flex items-center justify-center transition-all rounded-full">
<Circle className="w-2 h-2 text-current fill-current" />
</RadioGroupPrimitive.Indicator>
{/* Show on hover */}
<div className="items-center justify-center hidden transition-all rounded-full text-foreground/25 group-hover:flex group-data-[state=checked]:hidden">
<Circle className="w-2 h-2 text-current fill-current" />
</div>
</div>
<Label className="cursor-pointer">{props.children}</Label>
</RadioGroupPrimitive.Item>
);
});
RadioGroupItemButton.displayName = RadioGroupPrimitive.Item.displayName;
export { RadioGroup, RadioGroupItem, RadioGroupItemButton };
+15 -3
View File
@@ -19,7 +19,7 @@ const SelectTrigger = React.forwardRef<
<SelectPrimitive.Trigger
ref={ref}
className={cn(
"flex gap-2 h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
"flex gap-2 h-10 w-full items-center justify-between rounded-md border border-input bg-card px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
className,
)}
{...props}
@@ -73,9 +73,21 @@ const SelectContent = React.forwardRef<
>(({ className, children, position = "popper", ...props }, ref) => (
<SelectPrimitive.Portal>
<SelectPrimitive.Content
ref={ref}
// Fixes https://github.com/radix-ui/primitives/issues/1658
ref={(instance) => {
if (typeof ref === "function") {
ref(instance);
} else if (ref) {
ref.current = instance;
}
if (!instance) return;
instance.ontouchstart = (e) => {
e.preventDefault();
};
}}
className={cn(
"relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
"relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border border-border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
position === "popper" &&
"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
className,
@@ -25,14 +25,14 @@ function SkeletonContainer<T>(props: {
style={props.style}
aria-hidden={isLoading ? "true" : "false"}
className={cn(
isLoading && "animate-pulse rounded-lg bg-muted",
isLoading && "animate-pulse rounded-lg bg-muted inline-block",
props.className,
)}
>
<div className={cn(isLoading && "invisible")}>
<div
className={cn(
"transitino-opacity duration-300",
"transition-opacity duration-300",
isLoading ? "opacity-0" : "opacity-100",
)}
>
@@ -0,0 +1,31 @@
"use client";
import { useTheme } from "next-themes";
import { Toaster as Sonner } from "sonner";
type ToasterProps = React.ComponentProps<typeof Sonner>;
const Toaster = ({ ...props }: ToasterProps) => {
const { theme = "system" } = useTheme();
return (
<Sonner
theme={theme as ToasterProps["theme"]}
className="toaster group"
toastOptions={{
classNames: {
toast:
"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg group-[.toaster]:border",
description: "group-[.toast]:text-muted-foreground",
actionButton:
"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",
cancelButton:
"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground",
},
}}
{...props}
/>
);
};
export { Toaster };
@@ -0,0 +1,29 @@
"use client";
import * as SwitchPrimitives from "@radix-ui/react-switch";
import * as React from "react";
import { cn } from "@/lib/utils";
const Switch = React.forwardRef<
React.ElementRef<typeof SwitchPrimitives.Root>,
React.ComponentPropsWithoutRef<typeof SwitchPrimitives.Root>
>(({ className, ...props }, ref) => (
<SwitchPrimitives.Root
className={cn(
"peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-foreground data-[state=unchecked]:bg-input",
className,
)}
{...props}
ref={ref}
>
<SwitchPrimitives.Thumb
className={cn(
"pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0",
)}
/>
</SwitchPrimitives.Root>
));
Switch.displayName = SwitchPrimitives.Root.displayName;
export { Switch };
@@ -0,0 +1,117 @@
import * as React from "react";
import { cn } from "@/lib/utils";
const Table = React.forwardRef<
HTMLTableElement,
React.HTMLAttributes<HTMLTableElement>
>(({ className, ...props }, ref) => (
<div className="relative w-full overflow-auto">
<table
ref={ref}
className={cn("w-full caption-bottom text-sm", className)}
{...props}
/>
</div>
));
Table.displayName = "Table";
const TableHeader = React.forwardRef<
HTMLTableSectionElement,
React.HTMLAttributes<HTMLTableSectionElement>
>(({ className, ...props }, ref) => (
<thead ref={ref} className={cn("[&_tr]:border-b", className)} {...props} />
));
TableHeader.displayName = "TableHeader";
const TableBody = React.forwardRef<
HTMLTableSectionElement,
React.HTMLAttributes<HTMLTableSectionElement>
>(({ className, ...props }, ref) => (
<tbody
ref={ref}
className={cn("[&_tr:last-child]:border-0", className)}
{...props}
/>
));
TableBody.displayName = "TableBody";
const TableFooter = React.forwardRef<
HTMLTableSectionElement,
React.HTMLAttributes<HTMLTableSectionElement>
>(({ className, ...props }, ref) => (
<tfoot
ref={ref}
className={cn(
"border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",
className,
)}
{...props}
/>
));
TableFooter.displayName = "TableFooter";
const TableRow = React.forwardRef<
HTMLTableRowElement,
React.HTMLAttributes<HTMLTableRowElement>
>(({ className, ...props }, ref) => (
<tr
ref={ref}
className={cn(
"border-b transition-colors data-[state=selected]:bg-muted",
className,
)}
{...props}
/>
));
TableRow.displayName = "TableRow";
const TableHead = React.forwardRef<
HTMLTableCellElement,
React.ThHTMLAttributes<HTMLTableCellElement>
>(({ className, ...props }, ref) => (
<th
ref={ref}
className={cn(
"h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",
className,
)}
{...props}
/>
));
TableHead.displayName = "TableHead";
const TableCell = React.forwardRef<
HTMLTableCellElement,
React.TdHTMLAttributes<HTMLTableCellElement>
>(({ className, ...props }, ref) => (
<td
ref={ref}
className={cn("p-4 align-middle [&:has([role=checkbox])]:pr-0", className)}
{...props}
/>
));
TableCell.displayName = "TableCell";
const TableCaption = React.forwardRef<
HTMLTableCaptionElement,
React.HTMLAttributes<HTMLTableCaptionElement>
>(({ className, ...props }, ref) => (
<caption
ref={ref}
className={cn("mt-4 text-sm text-muted-foreground", className)}
{...props}
/>
));
TableCaption.displayName = "TableCaption";
export {
Table,
TableHeader,
TableBody,
TableFooter,
TableHead,
TableRow,
TableCell,
TableCaption,
};
+68 -32
View File
@@ -1,29 +1,56 @@
"use client";
import { useIsomorphicLayoutEffect } from "@/lib/useIsomorphicLayoutEffect";
import { cn } from "@/lib/utils";
import Link from "next/link";
import { useCallback, useLayoutEffect, useRef, useState } from "react";
import { cn } from "../../lib/utils";
import { useCallback, useRef, useState } from "react";
import { ScrollShadow } from "./ScrollShadow/ScrollShadow";
import { Button } from "./button";
export type TabLink = {
name: string;
href: string;
isActive: boolean;
isEnabled?: boolean;
};
export function TabLinks(props: {
links: { name: string; href: string; isActive: boolean }[];
links: TabLink[];
className?: string;
tabContainerClassName?: string;
}) {
const { containerRef, lineRef, activeTabRef } =
useUnderline<HTMLAnchorElement>();
return (
<div className="relative">
<div className={cn("relative", props.className)}>
{/* Bottom line */}
<div className="h-[1px] bg-border absolute bottom-0 left-0 right-0" />
<ScrollShadow scrollableClassName="pb-[8px] relative">
<div className="flex" ref={containerRef}>
<div
className={cn("flex", props.tabContainerClassName)}
ref={containerRef}
>
{props.links.map((tab) => {
return (
<Button asChild key={tab.name} variant="ghost">
<Button
asChild
key={tab.name}
disabled={!tab.isEnabled}
variant="ghost"
>
<Link
data-active={tab.isActive}
ref={tab.isActive ? activeTabRef : undefined}
href={tab.href}
aria-disabled={!tab.isEnabled}
className={cn(
"rounded-lg hover:bg-muted px-3 font-medium text-sm lg:text-base relative h-auto",
!tab.isActive && "opacity-50 hover:opacity-100",
"rounded-lg hover:bg-muted px-3 font-normal text-sm lg:text-sm relative h-auto",
!tab.isActive &&
tab.isEnabled &&
"opacity-50 hover:opacity-100",
!tab.isEnabled && "opacity-50 pointer-events-none",
)}
>
{tab.name}
@@ -36,11 +63,9 @@ export function TabLinks(props: {
{/* Active line */}
<div
ref={lineRef}
className="absolute left-0 bottom-0 z-10 h-[2px] bg-foreground rounded-lg fade-in-0 animate-in"
className="absolute left-0 bottom-0 h-[2px] bg-foreground rounded-lg fade-in-0 animate-in"
/>
</ScrollShadow>
{/* Bottom line */}
<div className="h-[1px] bg-border -translate-y-[2px]" />
</div>
);
}
@@ -56,12 +81,16 @@ export function TabButtons(props: {
tabClassName?: string;
activeTabClassName?: string;
tabContainerClassName?: string;
containerClassName?: string;
}) {
const { containerRef, lineRef, activeTabRef } =
useUnderline<HTMLButtonElement>();
return (
<div className="relative">
<div className={cn("relative", props.containerClassName)}>
{/* Bottom line */}
<div className="h-[1px] bg-border absolute bottom-0 left-0 right-0" />
<ScrollShadow scrollableClassName="pb-[8px] relative">
<div
className={cn("flex", props.tabContainerClassName)}
@@ -93,11 +122,9 @@ export function TabButtons(props: {
{/* Active line */}
<div
ref={lineRef}
className="absolute left-0 bottom-0 z-10 h-[2px] bg-foreground rounded-lg fade-in-0 animate-in"
className="absolute left-0 bottom-0 h-[2px] bg-foreground rounded-lg fade-in-0 animate-in"
/>
</ScrollShadow>
{/* Bottom line */}
<div className="h-[1px] bg-border -translate-y-[2px]" />
</div>
);
}
@@ -111,25 +138,34 @@ function useUnderline<El extends HTMLElement>() {
setActiveTabEl(el);
}, []);
useLayoutEffect(() => {
if (activeTabEl && containerRef.current && lineRef.current) {
const containerRect = containerRef.current.getBoundingClientRect();
const lineEl = lineRef.current;
const rect = activeTabEl.getBoundingClientRect();
lineEl.style.width = `${rect.width}px`;
lineEl.style.transform = `translateX(${
rect.left - containerRect.left
}px)`;
setTimeout(() => {
lineEl.style.transition = "transform 0.3s, width 0.3s";
}, 0);
useIsomorphicLayoutEffect(() => {
function update() {
if (activeTabEl && containerRef.current && lineRef.current) {
const containerRect = containerRef.current.getBoundingClientRect();
const lineEl = lineRef.current;
const rect = activeTabEl.getBoundingClientRect();
lineEl.style.width = `${rect.width}px`;
lineEl.style.transform = `translateX(${
rect.left - containerRect.left
}px)`;
setTimeout(() => {
lineEl.style.transition = "transform 0.3s, width 0.3s";
}, 0);
activeTabEl.scrollIntoView({
behavior: "smooth",
block: "nearest",
inline: "center",
});
activeTabEl.scrollIntoView({
behavior: "smooth",
block: "nearest",
inline: "center",
});
}
}
update();
// add event listener for resize
window.addEventListener("resize", update);
return () => {
window.removeEventListener("resize", update);
};
}, [activeTabEl]);
return { containerRef, lineRef, activeTabRef };
@@ -0,0 +1,24 @@
import * as React from "react";
import { cn } from "@/lib/utils";
export interface TextareaProps
extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {}
const Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(
({ className, ...props }, ref) => {
return (
<textarea
className={cn(
"flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
className,
)}
ref={ref}
{...props}
/>
);
},
);
Textarea.displayName = "Textarea";
export { Textarea };
@@ -1,129 +0,0 @@
"use client";
import * as ToastPrimitives from "@radix-ui/react-toast";
import { type VariantProps, cva } from "class-variance-authority";
import { X } from "lucide-react";
import * as React from "react";
import { cn } from "@/lib/utils";
const ToastProvider = ToastPrimitives.Provider;
const ToastViewport = React.forwardRef<
React.ElementRef<typeof ToastPrimitives.Viewport>,
React.ComponentPropsWithoutRef<typeof ToastPrimitives.Viewport>
>(({ className, ...props }, ref) => (
<ToastPrimitives.Viewport
ref={ref}
className={cn(
"fixed top-0 z-[10000000] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px] gap-4",
className,
)}
{...props}
/>
));
ToastViewport.displayName = ToastPrimitives.Viewport.displayName;
const toastVariants = cva(
"group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",
{
variants: {
variant: {
default: "border bg-background text-foreground",
destructive:
"destructive group border-destructive bg-destructive text-destructive-foreground",
},
},
defaultVariants: {
variant: "default",
},
},
);
const Toast = React.forwardRef<
React.ElementRef<typeof ToastPrimitives.Root>,
React.ComponentPropsWithoutRef<typeof ToastPrimitives.Root> &
VariantProps<typeof toastVariants>
>(({ className, variant, ...props }, ref) => {
return (
<ToastPrimitives.Root
ref={ref}
className={cn(toastVariants({ variant }), className)}
{...props}
/>
);
});
Toast.displayName = ToastPrimitives.Root.displayName;
const ToastAction = React.forwardRef<
React.ElementRef<typeof ToastPrimitives.Action>,
React.ComponentPropsWithoutRef<typeof ToastPrimitives.Action>
>(({ className, ...props }, ref) => (
<ToastPrimitives.Action
ref={ref}
className={cn(
"inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",
className,
)}
{...props}
/>
));
ToastAction.displayName = ToastPrimitives.Action.displayName;
const ToastClose = React.forwardRef<
React.ElementRef<typeof ToastPrimitives.Close>,
React.ComponentPropsWithoutRef<typeof ToastPrimitives.Close>
>(({ className, ...props }, ref) => (
<ToastPrimitives.Close
ref={ref}
className={cn(
"absolute right-2 top-2 rounded-md p-1 text-foreground/50 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",
className,
)}
toast-close=""
{...props}
>
<X className="h-4 w-4" />
</ToastPrimitives.Close>
));
ToastClose.displayName = ToastPrimitives.Close.displayName;
const ToastTitle = React.forwardRef<
React.ElementRef<typeof ToastPrimitives.Title>,
React.ComponentPropsWithoutRef<typeof ToastPrimitives.Title>
>(({ className, ...props }, ref) => (
<ToastPrimitives.Title
ref={ref}
className={cn("text-sm font-semibold", className)}
{...props}
/>
));
ToastTitle.displayName = ToastPrimitives.Title.displayName;
const ToastDescription = React.forwardRef<
React.ElementRef<typeof ToastPrimitives.Description>,
React.ComponentPropsWithoutRef<typeof ToastPrimitives.Description>
>(({ className, ...props }, ref) => (
<ToastPrimitives.Description
ref={ref}
className={cn("text-sm opacity-90", className)}
{...props}
/>
));
ToastDescription.displayName = ToastPrimitives.Description.displayName;
type ToastProps = React.ComponentPropsWithoutRef<typeof Toast>;
type ToastActionElement = React.ReactElement<typeof ToastAction>;
export {
type ToastProps,
type ToastActionElement,
ToastProvider,
ToastViewport,
Toast,
ToastTitle,
ToastDescription,
ToastClose,
ToastAction,
};
@@ -1,31 +0,0 @@
"use client";
import {
Toast,
ToastClose,
ToastDescription,
ToastProvider,
ToastTitle,
ToastViewport,
} from "@/components/ui/toast";
import { useToast } from "@/components/ui/use-toast";
export function Toaster() {
const { toasts } = useToast();
return (
<ToastProvider>
{toasts.map(({ id, title, description, action, ...props }) => (
<Toast key={id} {...props}>
<div className="grid gap-1 z-50">
{title && <ToastTitle>{title}</ToastTitle>}
{description && <ToastDescription>{description}</ToastDescription>}
</div>
{action}
<ToastClose />
</Toast>
))}
<ToastViewport />
</ToastProvider>
);
}
@@ -0,0 +1,61 @@
"use client";
import * as ToggleGroupPrimitive from "@radix-ui/react-toggle-group";
import type { VariantProps } from "class-variance-authority";
import * as React from "react";
import { toggleVariants } from "@/components/ui/toggle";
import { cn } from "@/lib/utils";
const ToggleGroupContext = React.createContext<
VariantProps<typeof toggleVariants>
>({
size: "default",
variant: "default",
});
const ToggleGroup = React.forwardRef<
React.ElementRef<typeof ToggleGroupPrimitive.Root>,
React.ComponentPropsWithoutRef<typeof ToggleGroupPrimitive.Root> &
VariantProps<typeof toggleVariants>
>(({ className, variant, size, children, ...props }, ref) => (
<ToggleGroupPrimitive.Root
ref={ref}
className={cn("flex items-center justify-center gap-1", className)}
{...props}
>
<ToggleGroupContext.Provider value={{ variant, size }}>
{children}
</ToggleGroupContext.Provider>
</ToggleGroupPrimitive.Root>
));
ToggleGroup.displayName = ToggleGroupPrimitive.Root.displayName;
const ToggleGroupItem = React.forwardRef<
React.ElementRef<typeof ToggleGroupPrimitive.Item>,
React.ComponentPropsWithoutRef<typeof ToggleGroupPrimitive.Item> &
VariantProps<typeof toggleVariants>
>(({ className, children, variant, size, ...props }, ref) => {
const context = React.useContext(ToggleGroupContext);
return (
<ToggleGroupPrimitive.Item
ref={ref}
className={cn(
toggleVariants({
variant: context.variant || variant,
size: context.size || size,
}),
className,
)}
{...props}
>
{children}
</ToggleGroupPrimitive.Item>
);
});
ToggleGroupItem.displayName = ToggleGroupPrimitive.Item.displayName;
export { ToggleGroup, ToggleGroupItem };
@@ -0,0 +1,45 @@
"use client";
import * as TogglePrimitive from "@radix-ui/react-toggle";
import { type VariantProps, cva } from "class-variance-authority";
import * as React from "react";
import { cn } from "@/lib/utils";
const toggleVariants = cva(
"inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground",
{
variants: {
variant: {
default: "bg-transparent",
outline:
"border border-input bg-transparent hover:bg-accent hover:text-accent-foreground",
},
size: {
default: "h-10 px-3",
sm: "h-9 px-2.5",
lg: "h-11 px-5",
},
},
defaultVariants: {
variant: "default",
size: "default",
},
},
);
const Toggle = React.forwardRef<
React.ElementRef<typeof TogglePrimitive.Root>,
React.ComponentPropsWithoutRef<typeof TogglePrimitive.Root> &
VariantProps<typeof toggleVariants>
>(({ className, variant, size, ...props }, ref) => (
<TogglePrimitive.Root
ref={ref}
className={cn(toggleVariants({ variant, size, className }))}
{...props}
/>
));
Toggle.displayName = TogglePrimitive.Root.displayName;
export { Toggle, toggleVariants };
+13 -4
View File
@@ -19,7 +19,7 @@ const TooltipContent = React.forwardRef<
ref={ref}
sideOffset={sideOffset}
className={cn(
"z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
"z-50 overflow-hidden rounded-md border border-border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
className,
)}
{...props}
@@ -31,15 +31,24 @@ export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider };
export function ToolTipLabel(props: {
children: React.ReactNode;
label: string;
label: React.ReactNode;
rightIcon?: React.ReactNode;
leftIcon?: React.ReactNode;
}) {
if (!props.label) {
return props.children;
}
return (
<TooltipProvider>
<Tooltip delayDuration={100} disableHoverableContent={true}>
<TooltipTrigger asChild>{props.children}</TooltipTrigger>
<TooltipContent sideOffset={10}>
<TooltipTrigger asChild className="!pointer-events-auto">
{props.children}
</TooltipTrigger>
<TooltipContent
sideOffset={10}
className="max-w-[400px] leading-relaxed whitespace-normal"
>
<div className="p-2 text-sm flex items-center gap-1.5">
{props.leftIcon}
{props.label}
@@ -0,0 +1,24 @@
import { useTrack } from "hooks/analytics/useTrack";
import Link from "next/link";
import type React from "react";
export type TrackedLinkProps = React.ComponentProps<typeof Link> & {
category: string;
label?: string;
trackingProps?: Record<string, string>;
};
export function TrackedLinkTW(props: TrackedLinkProps) {
const trackEvent = useTrack();
const { category, label, trackingProps, ...restProps } = props;
return (
<Link
onClick={(e) => {
trackEvent({ category, action: "click", label, ...trackingProps });
props.onClick?.(e);
}}
{...restProps}
/>
);
}

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