Compare commits

...
Author SHA1 Message Date
Jonas DanielsGitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
257e4283d2 Version Packages (#4365)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-04 15:21:10 -07:00
Edward SunandGitHub 82a30afd4b Supported chain and tokens using overriden state (#4388) 2024-09-04 14:34:33 -07:00
MananTank 9e8d3e6639 Add props for hiding send, receive and buy buttons on ConnectButton (#4382)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR enhances the `ConnectButton` component by adding props to hide "Send", "Receive", and "Buy" buttons in the details modal.

### Detailed summary
- Added props to hide "Send", "Receive", and "Buy" buttons in the `ConnectButton` component details modal
- Updated `ConnectButtonProps` with new boolean props for hiding buttons
- Modified `Details.tsx` to conditionally display buttons based on the new props

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

<!-- end pr-codex -->
2024-09-04 20:31:32 +00:00
MananTank d74e61b581 Fix Swap Fees layout in Pay UI drawer (#4390)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on fixing the Swap Fees layout in the fees drawer in the pay UI.

### Detailed summary
- Updated `SwapFees` component layout in `Fees.tsx` to align items to the left
- Removed `align` prop from `SwapFees` component in `BuyScreen.tsx`
- Created `SwapFeesRightAligned` component for right-aligned fees display in `ConfirmationScreen.tsx`

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

<!-- end pr-codex -->
2024-09-04 20:20:27 +00:00
MananTank d8f55efc97 Add Connect analytics page in Teams layout (#4384)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on updating the analytics feature for team projects.

### Detailed summary
- Updated links and routes related to analytics feature
- Renamed functions for clarity
- Refactored components for analytics visualization
- Added new UI components for analytics dashboard

> The following files were skipped due to too many changes: `apps/dashboard/src/app/team/[team_slug]/[project_slug]/connect/analytics/_components/ConnectSDKCard.tsx`, `apps/dashboard/src/app/team/[team_slug]/[project_slug]/connect/analytics/ConnectAnalyticsDashboard.tsx`, `apps/dashboard/src/pages/dashboard/connect/analytics.tsx`

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

<!-- end pr-codex -->
2024-09-04 19:52:29 +00:00
MananTank d254505436 Add Pay page in teams layout (#4387)
## 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 `PayConfig` component and update related components to use `clientId` instead of `apiKey.key`.

### Detailed summary
- Updated `PayConfig` to use `clientId` instead of `apiKey.key`
- Updated `PayAnalytics` to accept `clientId` instead of `apiKey`
- Updated `WebhooksPage` to use `clientId` instead of `apiKey.key`

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

<!-- end pr-codex -->
2024-09-04 16:46:36 +00:00
jnsdls b663959917 [Update] Refactor claim conditions detection and NFT page handling (#4379)
<!-- start pr-codex -->

## PR-Codex overview
The focus of this PR is to update the NFT overview page to include an `isErc721` flag and adjust features detection in NFT drawer tabs.

### Detailed summary
- Added `isErc721` flag to NFT overview page props
- Adjusted features detection in NFT drawer tabs for ERC20
- Refactored feature detection in contract route configuration

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

<!-- end pr-codex -->
2024-09-04 16:39:06 +00:00
jnsdls ad61b64b4b [Update] Refactor ERC4337 extension detection and UI (#4378)
### TL;DR

Enhanced ERC4337 support with new functions and improved contract detection.

### What changed?

- Added new ERC4337 extension functions for account management and permissions.
- Implemented support checks for various ERC4337 functions.
- Updated contract UI hooks to use new detection methods for ERC4337 features.
- Removed redundant code and simplified contract UI components.
- Improved type safety and consistency across ERC4337-related functions.

### How to test?

1. Test the new ERC4337 functions in a development environment.
2. Verify that the contract UI correctly detects and displays ERC4337 features.
3. Check that account management, permissions, and factory functionalities work as expected.
4. Ensure that the support checks for ERC4337 functions return correct results.

### Why make this change?

This change improves the detection and support for ERC4337 smart contract accounts. It enhances the developer experience by providing more granular control over account features and permissions. The updates also streamline the codebase, making it easier to maintain and extend ERC4337 functionality in the future.

---

<!-- start pr-codex -->

---

## PR-Codex overview
This PR updates account permissions and extensions in the dashboard.

### Detailed summary
- Updated imports and components in `AccountPermissionsPage`, `AccountsPage`, and `AccountPage`.
- Added support for `isAddAdminSupported`, `isAddSessionKeySupported`, `isRemoveSessionKeySupported` functions in ERC4337 extensions.
- Added support for `isGetAllActiveSignersSupported`, `isGetAllAdminsSupported`, `isGetAllSignersSupported`, `isIsActiveSignerSupported` functions in account permissions.

> The following files were skipped due to too many changes: `packages/thirdweb/src/exports/extensions/erc4337.ts`, `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-09-04 16:39:04 +00:00
Kien NgoandGitHub 57fb7fc6fb [Dashboard] Fix CodeSnippet page (#4386) 2024-09-04 08:37:00 -07:00
MananTank 70f051d770 Docs: Fix table cell size on firefox (#4381)
Fixes - https://linear.app/thirdweb/issue/CNCT-1751/fix-portal-table-cell-widths-on-firefox
2024-09-04 14:38:37 +00:00
kien-ngo 8abcf3d4c3 [Portal] Update useSendTransaction docs (#4380)
## 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 example and improve clarity in the `useSendTransaction` hook documentation.

### Detailed summary
- Updated the example from "Using a prepared contract call" to "Sending a prepared contract call"
- Added comments for clarity in the example code
- Added `chain` and `client` properties to the prepared transaction object

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

<!-- end pr-codex -->
2024-09-04 11:17:27 +00:00
joaquim-verges 2ce8840d80 feat: zksync deploys (#4346)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR increases the size limit for `thirdweb (cjs)` to 105 kB, adds an event `ContractDeployed`, and improves error handling and EIP712 transaction support.

### Detailed summary
- Increased size limit for `thirdweb (cjs)` to 105 kB
- Added `ContractDeployed` event
- Improved error messages with detailed information
- Added EIP712 transaction support for zksync
- Refactored deployment address computation and metadata handling

> The following files were skipped due to too many changes: `packages/thirdweb/src/contract/deployment/zksync/zkDeployContract.ts`, `packages/thirdweb/src/transaction/actions/zksync/send-eip712-transaction.test.ts`, `packages/thirdweb/src/contract/deployment/zksync/zkDeployProxy.ts`, `packages/thirdweb/package.json`, `packages/thirdweb/src/contract/deployment/zksync/zkDeployCreate2Factory.ts`, `packages/thirdweb/src/contract/deployment/utils/bootstrap.ts`, `packages/thirdweb/src/contract/deployment/zksync/zkDeployDeterministic.ts`, `packages/thirdweb/src/extensions/prebuilts/deploy-published.ts`, `packages/thirdweb/src/utils/any-evm/zksync/constants.ts`, `pnpm-lock.yaml`

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

<!-- end pr-codex -->
2024-09-04 07:14:25 +00:00
jnsdls 4ad5f7fd50 [Update] Refactor NFT drawer tabs and contract interactions (#4377)
### TL;DR

Refactored NFT-related components and hooks to improve code organization and reduce redundancy.

### What changed?

- Consolidated imports from `thirdweb/extensions` modules
- Removed redundant contract creation and feature detection logic
- Updated component props to directly pass `ThirdwebContract` instead of separate address and chain ID
- Simplified conditional rendering based on contract type (ERC721 vs ERC1155)
- Moved some feature detection logic to parent components
- Updated `useNFTDrawerTabs` hook to use new contract prop structure

### How to test?

1. Navigate to the NFT management pages in the dashboard
2. Verify that all NFT-related functionality (minting, burning, transferring, etc.) works as expected for both ERC721 and ERC1155 tokens
3. Check that the NFT drawer displays the correct tabs and options based on the contract type and user permissions
4. Ensure that claim conditions and multi-phase claim conditions are correctly detected and displayed

### Why make this change?

This refactoring improves code maintainability and reduces duplication. By centralizing contract-related logic and simplifying component interfaces, it becomes easier to manage and extend NFT functionality across the dashboard. The changes also prepare the codebase for potential future enhancements and make it more consistent with other parts of the application.

---

<!-- start pr-codex -->

---

## PR-Codex overview
This PR introduces support for multi-phase claims in ERC20, ERC721, and ERC1155 contracts across various components.

### Detailed summary
- Added `isMultiPhase` boolean to support multi-phase claims in ERC20, ERC721, and ERC1155 contracts.
- Updated components to handle `isMultiPhase` property efficiently.
- Refactored code to remove unnecessary functions and imports.

> The following files were skipped due to too many changes: `apps/dashboard/src/contract-ui/tabs/nfts/components/airdrop-tab.tsx`, `apps/dashboard/src/core-ui/nft-drawer/useNftDrawerTabs.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-09-04 06:56:23 +00:00
jnsdls e9cd4c25f1 [Update] Refactor contract route config and permissions detection (#4376)
### TL;DR

Refactored contract UI routing and improved permissions detection.

### What changed?

- Removed `contractAddress` parameter from `useContractRouteConfig` function
- Implemented new logic for detecting permissions and enumerable permissions
- Simplified component rendering by removing unnecessary conditional checks
- Updated `ContractOverviewPage` to use the new permissions detection
- Refactored route configurations to use the contract prop directly
- Adjusted the `Inner` component to reflect these changes

### How to test?

1. Navigate to various contract pages and ensure all tabs and components load correctly
2. Test contracts with different permission configurations to verify accurate detection
3. Check that the overview page displays the correct permissions information
4. Verify that all contract-related components render without errors

### Why make this change?

This refactoring improves code efficiency and readability while enhancing the accuracy of permissions detection. By simplifying the routing logic and removing redundant checks, we've made the codebase more maintainable and reduced the potential for errors. The new permissions detection method provides a more reliable way to determine contract capabilities, ensuring that users see accurate information about contract features and permissions.

---

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to refactor and optimize the contract route configuration logic.

### Detailed summary
- Refactored `useContractRouteConfig` to simplify and optimize contract route configurations
- Removed unnecessary dependencies and streamlined the logic for permissions detection
- Updated usage of contract address to use `props.contract.address` consistently throughout
- Improved code readability and maintainability in the contract UI components

> The following files were skipped due to too many changes: `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-09-04 06:56:19 +00:00
jnsdls edb95d00ca [Extensions] Expose permission detection logic (#4375)
### TL;DR

Exposed permission detection logic for the Extensions module.

### What changed?

- Added `is*Supported` functions for various permission-related operations.
- Exported these new functions to make them accessible to users.
- Implemented `isGetAllRoleMembersSupported` function to check if both `getRoleMember` and `getRoleMemberCount` are supported.
- Renamed `grant.ts` to `grantRole.ts` for consistency.

### How to test?

1. Import the new `is*Supported` functions from the permissions module.
2. Pass an array of contract function selectors to these functions.
3. Verify that they correctly identify whether the corresponding permission operations are supported.

Example:
```typescript
import { isGetAllRoleMembersSupported } from "thirdweb/extensions/permissions";

const supported = isGetAllRoleMembersSupported(["0x..."]);
console.log("getAllRoleMembers supported:", supported);
```

### Why make this change?

This change allows developers to programmatically detect which permission-related operations are supported by a given contract. This is particularly useful when working with contracts that may implement only a subset of the permissions interface, enabling more robust and flexible integration with various smart contracts.

---

<!-- start pr-codex -->

---

## PR-Codex overview
This PR enhances the `thirdweb` package by exposing permission detection logic for various role-related operations.

### Detailed summary
- Exposes permission detection logic for `hasRole`, `revokeRole`, `getRoleAdmin`, `renounceRole`, and more
- Renamed `grant.js` to `grantRole.js`
- Added new exports for supported permission operations
- Added a new function `isGetAllRoleMembersSupported` to check support for `getAllRoleMembers` operation

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

<!-- end pr-codex -->
2024-09-04 06:56:14 +00:00
Joe-ThirdwebandGitHub ccaaef481c Updating Soneium Chainlist Page (#4373) 2024-09-03 23:54:32 -07:00
jnsdls 787ed1531f [Update] Refactor useWalletNFTs hook and NFT handling (#4374)
### TL;DR

Refactored wallet NFT handling and improved font loading across the dashboard.

### What changed?

- Updated `useWalletNFTs` hook to accept `chainId` as a parameter
- Modified `NftsOwned` component to use contract chain ID
- Refactored font loading in `layout.tsx` and `MiniPlayground.tsx`
- Updated NFT data structures to use `id` instead of `tokenId`
- Adjusted NFT card rendering to include chain ID and contract address
- Modified Alchemy, Moralis, and SimpleHash NFT transformations

### How to test?

1. Test the wallet NFT fetching functionality with different chain IDs
2. Verify that NFT cards display correctly in the dashboard
3. Check font loading performance in various components
4. Ensure that NFT details are correctly displayed in listings and overview pages

### Why make this change?

This change improves the consistency of NFT handling across the dashboard, enhances font loading performance, and provides better support for multi-chain NFT display. It also aligns the NFT data structure with the latest ThirdWeb SDK conventions, using `id` instead of `tokenId`.

---
2024-09-04 05:37:38 +00:00
Joaquim VergesandGitHub 73e5dc7276 fix direct transfers to the same wallet (#4319) 2024-09-04 14:16:14 +12:00
jnsdls 0246529e61 [Update] Migrate contract analytics to v5 (#4366)
<!-- start pr-codex -->

## PR-Codex overview
This PR focuses on updating imports and types related to ABI parameters in the codebase.

### Detailed summary
- Updated imports from `"@thirdweb-dev/sdk"` to `"abitype"`
- Changed types to use `AbiParameter` instead of previous types like `Abi`, `AbiFunction`, `AbiEvent`
- Fixed type errors and updated type annotations throughout the codebase

> The following files were skipped due to too many changes: `apps/dashboard/src/components/contract-functions/interactive-abi-function.tsx`, `apps/dashboard/src/contract-ui/tabs/overview/components/NFTDetails.tsx`, `packages/thirdweb/src/extensions/thirdweb/read/contractType.ts`, `apps/dashboard/src/contract-ui/tabs/code/components/code-overview.tsx`, `apps/dashboard/src/components/contract-components/contract-deploy-form/custom-contract.tsx`, `apps/dashboard/src/components/contract-components/contract-publish-form/index.tsx`, `apps/dashboard/src/contract-ui/tabs/analytics/page.tsx`, `apps/dashboard/src/contract-ui/tabs/overview/page.tsx`, `apps/dashboard/src/components/contract-components/hooks.ts`, `apps/dashboard/src/components/contract-functions/contract-function.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-09-04 01:54:02 +00:00
MananTank 961445f9d6 Update Connect Analytics charts (#4372)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on restructuring chart components and adding storybook stories for analytics dashboard components.

### Detailed summary
- Deleted `DocsButton.tsx` and `useApi.ts`
- Updated global CSS variables for charts
- Modified chart component styles and colors
- Refactored story utility functions
- Added new chart components and stories
- Implemented skeleton and loading states for charts

> The following files were skipped due to too many changes: `apps/dashboard/src/app/team/[team_slug]/[project_slug]/connect/analytics/ConnectAnalyticsDashboard.tsx`, `apps/dashboard/src/app/team/[team_slug]/[project_slug]/connect/analytics/_components/DailyConnectionsChartCard.tsx`, `apps/dashboard/src/app/team/[team_slug]/[project_slug]/connect/analytics/_components/WalletDistributionChartCard.tsx`, `apps/dashboard/src/app/team/[team_slug]/[project_slug]/connect/analytics/_components/WalletConnectorsChartCard.tsx`, `apps/dashboard/src/pages/dashboard/connect/analytics.tsx`

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

<!-- end pr-codex -->
2024-09-04 00:14:14 +00:00
kumaryash90 b407bc9fd8 Remove XPLA overrides for create2 deployment (#4368)
## 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 gas prices for different networks in `any-evm-constants.ts`.

### Detailed summary
- Updated gas price for "Xpla Testnet" to 2000 * 10 ** 9.
- Removed gas price for "Xpla Mainnet".
- Updated gas price for "BitTorrent Chain" to 300000 * 10 ** 9.

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

<!-- end pr-codex -->
2024-09-03 15:39:12 +00:00
MananTank b6aae7f29f dashboard storybook improvements (#4369)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR adds mobile viewport options to Storybook stories and updates UI components for mobile viewports.

### Detailed summary
- Added mobile viewport options to Storybook stories
- Updated UI components for mobile viewports in various settings pages and embedded wallets
- Adjusted button sizes and styles for different viewport sizes

> The following files were skipped due to too many changes: `pnpm-lock.yaml`, `apps/dashboard/src/app/team/[team_slug]/(team)/~/settings/general/Sidebar.stories.tsx`

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

<!-- end pr-codex -->
2024-09-03 15:27:39 +00:00
Prithvish BaidyaandGitHub ec4d635e1b refactor: Fix address slicing in CopyAddressButton component (#4370) 2024-09-03 08:26:53 -07:00
Jonas DanielsandGitHub ab15e9cf1f [Update] Refine marketplace v3 detection logic (#4367) 2024-09-03 01:11:59 -07:00
kien-ngo 066aede2d1 [SDK] Allow specifying "to" and "from" props for the ClaimButton (#4363)
## 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 `ClaimButton` component by allowing the specification of "from" and "to" props for different types of claims.

### Detailed summary
- Added ability to specify "from" and "to" props for `ClaimButton`
- Updated `Erc721ClaimParams` and `Erc1155ClaimParams` types
- Added `to` and `from` props to `Erc20ClaimParams`
- Updated `getERC1155ClaimTo` and `getERC20ClaimTo` functions to handle `from` prop

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

<!-- end pr-codex -->
2024-09-03 02:55:57 +00:00
Jonas DanielsGitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
cb6d7a3b00 Version Packages (#4331)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-03 14:52:24 +12:00
jnsdls 4a3a007c2c [Add] Embed tab for marketplace and token contracts (#4364) 2024-09-03 01:55:23 +00:00
kien-ngo 915e7fb879 [SDK] FIx merkle tree proof for Drop contracts (#4344)
internal discussion: https://thirdwebdev.slack.com/archives/C04DP04AF1V/p1725028836481129

<!-- start pr-codex -->

---

## PR-Codex overview
**Focus:** This PR focuses on fixing the Merkle tree proof for Drop contracts in the `thirdweb` package.

### Detailed summary
- Fixed sorting of leaves in `MerkleTree.ts`.
- Renamed `ADDRESS_ZERO` to `ZERO_ADDRESS`.
- Updated logic for fetching proofs in `fetchProofsForClaimer`.
- Added a test for large Merkle trees in `MerkleTree.test.ts`.

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

<!-- end pr-codex -->
2024-09-03 00:52:23 +00:00
gregfromstl c54822f80c [Dashboard] Fix: Only show sponsorship banner on AA page when on eligible chain (#4362)
<!-- start pr-codex -->

## PR-Codex overview
The focus of this PR is to implement a feature that automatically applies gas credits for specific blockchain chains in the application.

### Detailed summary
- Added `chain` state using `useActiveWalletChain` hook
- Implemented logic to check if the current chain is in a predefined list
- Updated UI to display information based on the chain eligibility

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

<!-- end pr-codex -->
2024-09-03 00:40:23 +00:00
MananTank d8c88ef720 Add In-app wallet page on Teams layout (#4361)
## 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 in-app wallet functionality by updating configurations and adding analytics components.

### Detailed summary
- Updated `Configure` component props for better data handling
- Added `AnalyticsCallout` component for analytics tracking
- Improved UI with new components like `InAppWaletFooterSection`

> The following files were skipped due to too many changes: `apps/dashboard/src/app/team/[team_slug]/[project_slug]/connect/in-app-wallets/_components/footer.tsx`, `apps/dashboard/src/pages/dashboard/connect/in-app-wallets.tsx`

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

<!-- end pr-codex -->
2024-09-03 00:27:56 +00:00
kien-ngo aa556f17b6 [Portal] Update docs for useActiveWallet (#4352)
## 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 `useActiveWallet` hook by adding examples demonstrating its usage for account and network change events.

### Detailed summary
- Added examples for basic usage, account change event, multiple accounts changed event, and network change event in the `useActiveWallet` hook.

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

<!-- end pr-codex -->
2024-09-02 23:43:54 +00:00
MananTank 3a55a7eabc Fix TWTable whitespace wrapping (#4359)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR adds the `whitespace-nowrap` class to the `ScrollShadow` component in `TWTable.tsx` for better text wrapping control.

### Detailed summary
- Added `whitespace-nowrap` class to `ScrollShadow` component in `TWTable.tsx`

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

<!-- end pr-codex -->
2024-09-02 23:07:19 +00:00
MananTank 0aa72e3a93 Migrate In-app wallet settings page to shadcn/tailwind (#4360)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR updates global CSS variables, adds a new API key field, and refactors components for In-App Wallet settings.

### Detailed summary
- Updated global CSS variables for input and ring styles
- Added `redirectUrls` field to `UpdateKeyInput` interface
- Added `InAppWalletSettingsUI` storybook component
- Refactored `Configure` and `index` components for In-App Wallet settings

> The following files were skipped due to too many changes: `apps/dashboard/src/components/embedded-wallets/Configure/index.tsx`

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

<!-- end pr-codex -->
2024-09-02 22:54:49 +00:00
FirekeeperandGitHub 1198dc7676 Unity 4.20.1 (#4330) 2024-09-02 15:23:39 -07:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
1246486102 chore(deps-dev): bump checkly from 4.7.0 to 4.8.1 (#4358)
Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-02 15:22:59 -07:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
c5f56b7fd1 chore(deps-dev): bump esbuild from 0.21.5 to 0.23.1 (#4357)
Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-02 15:22:28 -07:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
86215a0071 chore(deps-dev): bump @babel/plugin-transform-class-properties from 7.24.1 to 7.25.4 (#4355)
Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-02 15:18:27 -07:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
a9add4f266 chore(deps): bump viem from 2.19.3 to 2.21.1 (#4356)
Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-02 15:18:02 -07:00
MananTank 3a868e2778 Add theme switcher in dashboard storybook preview (#4354)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR updates Storybook stories by removing theme props and related functions, simplifying the code structure.

### Detailed summary
- Removed `useSetStoryTheme` function and theme props from Storybook stories
- Updated components to remove theme-related logic and props
- Simplified the structure of Storybook stories for easier maintenance

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

<!-- end pr-codex -->
2024-09-02 19:02:57 +00:00
jnsdls 470f4db74e v5 extension detection (dashboard) (#4303)
<!-- start pr-codex -->

## PR-Codex overview
The focus of this PR is to introduce a new library `@shazow/whatsabi` and update contract UI components and ERC20 checks.

### Detailed summary
- Added `@shazow/whatsabi` library
- Updated contract UI components
- Enhanced ERC20 token checks
- Improved settings page structure

> The following files were skipped due to too many changes: `pnpm-lock.yaml`, `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-09-02 18:02:12 +00:00
kien-ngo 5489311e45 [SDK] Add test for getOwnedNFTs 1155 (#4351)
## 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 test for fetching owned ERC1155 token IDs.

### Detailed summary
- Added test for fetching owned token IDs
- Imported necessary modules for testing
- Defined test parameters and expectations
- Deployed ERC1155 contract and minted tokens
- Fetched and validated owned token IDs

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

<!-- end pr-codex -->
2024-09-02 17:47:09 +00:00
gregfromstl 21c2b04ef2 [Dashboard] Feature: Remove analytics gating and update empty state (#4329)
## Problem solved

Short description of the bug fixed or feature added

![Screenshot 2024-09-01 at 12.36.10 PM.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/G5kV6fAq4H1wu10SVop6/0f419079-18df-423a-934b-f594f52dd126.png)

<!-- start pr-codex -->

---

## PR-Codex overview
This PR updates redirects and UI components related to the `/dashboard/connect` page. It changes the destination of a redirect, updates layout and links for "Connect" page items, and adds new icons for Unity, TypeScript, .NET, Unreal, and React.

### Detailed summary
- Updated redirect destination from `/dashboard/connect/in-app-wallets` to `/dashboard/connect/analytics`
- Modified layout and links for "Connect" page items
- Added new UI components for DocsButton, UnityIcon, TypeScriptIcon, .NETIcon, UnrealIcon, and ReactIcon

> The following files were skipped due to too many changes: `apps/dashboard/src/components/icons/ReactIcon.tsx`, `apps/dashboard/src/pages/dashboard/connect/analytics.tsx`

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

<!-- end pr-codex -->
2024-09-02 17:35:54 +00:00
Joe-ThirdwebandGitHub 0e7ff0acbc Adding custom chains on chainlist. (#4350) 2024-09-02 10:32:05 -07:00
MananTank 0476f81e4c Migrate GatedSwitch to tailwind + Refactor (#4353)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR updates components with a new `upgradeRequired` prop and adds a `Spinner` component for loading states.

### Detailed summary
- Added `upgradeRequired` prop to `GatedSwitch` component
- Updated `Spinner` component usage in multiple files
- Added `Spinner` component for loading states in `SponsorshipPolicies` and `Configure` components

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

<!-- end pr-codex -->
2024-09-02 15:56:03 +00:00
MananTank fa7281d4b7 Migrate In-app wallet users page to shadcn/tailwind (#4348)
## 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 optimize components in the dashboard app.

### Detailed summary
- Updated rendering of supported platforms in `ConnectLanding`
- Refactored `SupportedPlatformLink` component
- Improved UI and functionality in `Analytics` and `UsageCard`
- Enhanced user experience in `index.tsx` for embedded wallets

> The following files were skipped due to too many changes: `apps/dashboard/src/components/embedded-wallets/Users/index.tsx`, `apps/dashboard/src/pages/dashboard/connect/in-app-wallets.tsx`

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

<!-- end pr-codex -->
2024-09-02 11:34:21 +00:00
MananTank d9177eb724 Migrate TWTable to shadcn/tailwind (#4347)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR adds a `Separator` component, updates table styling, and refactors components in `TWTable.tsx`.

### Detailed summary
- Added `Separator` component
- Updated table styling with new classes
- Refactored `Th`, `Tr`, and `Td` components
- Removed unused imports and components

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

<!-- end pr-codex -->
2024-09-02 11:34:19 +00:00
MananTank 18678d45e7 Team Settings page UI (#4304)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on improving UI components and updating team-related functionalities in the dashboard. Changes include UI refinements, new components, and team-related API updates.

### Detailed summary
- Updated UI components like buttons and icons for better styling
- Added new components like `RoleSelector` and `DangerSettingCard`
- Updated team-related API with additional fields for `Team`
- Improved UI consistency and user experience in the dashboard

> The following files were skipped due to too many changes: `apps/dashboard/src/app/team/[team_slug]/(team)/~/settings/general/DangerSettingCard.tsx`, `apps/dashboard/src/stories/Button.stories.tsx`, `apps/dashboard/src/app/team/[team_slug]/(team)/~/settings/_components/sidebar/TeamSettingsSidebar.tsx`, `apps/dashboard/src/app/team/[team_slug]/(team)/~/settings/_components/sidebar/TeamsMobileNav.tsx`, `apps/dashboard/src/app/team/[team_slug]/(team)/~/settings/general/DangerSettingCard.stories.tsx`, `apps/dashboard/src/app/components/Header/TeamHeader/TeamHeaderUI.tsx`, `apps/dashboard/src/app/team/[team_slug]/(team)/~/settings/general/SettingsCard.tsx`, `apps/dashboard/src/app/team/[team_slug]/(team)/~/settings/general/GeneralSettingsPage.stories.tsx`, `apps/dashboard/src/app/team/[team_slug]/(team)/~/settings/general/Sidebar.stories.tsx`, `apps/dashboard/src/app/team/[team_slug]/(team)/TeamOverviewPage.tsx`, `apps/dashboard/src/app/team/[team_slug]/(team)/~/settings/layout.tsx`, `apps/dashboard/src/app/team/[team_slug]/(team)/~/settings/general/SettingsCard.stories.tsx`, `apps/dashboard/src/app/team/[team_slug]/(team)/~/settings/members/TeamMembersSettingsPage.stories.tsx`, `apps/dashboard/src/app/team/[team_slug]/(team)/~/settings/members/InviteSection.tsx`, `apps/dashboard/src/app/components/Header/TeamHeader/TeamHeaderUI.stories.tsx`, `apps/dashboard/src/app/team/[team_slug]/(team)/~/settings/members/ManageMembersSection.tsx`, `apps/dashboard/src/app/team/[team_slug]/(team)/~/settings/general/GeneralSettingsPage.tsx`

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

<!-- end pr-codex -->
2024-09-02 04:06:21 +00:00
gregfromstl 5475551e5d [TS SDK] Feature: Accept a string for signature mint UID (#4270)
## Problem solved

Auto-encodes strings passed to `generateSignatureMint` across all token types. This change could cause confusion since the response uid from the contract will still be in hex form.

<!-- start pr-codex -->

---

## PR-Codex overview
This PR allows accepting string UIDs for signature minting in ERC721 and ERC20 contracts.

### Detailed summary
- Updated functions to accept and encode string UIDs for minting signatures
- Added tests for generating mint signatures with custom string UIDs
- Updated dependencies and peer dependencies in package.json

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

<!-- end pr-codex -->
2024-09-01 19:11:35 +00:00
joaquim-verges a2f2c7e172 fix(smart-wallet): Improve error message for connection failures (#4343)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR improves error handling in smart wallet connection by providing a more informative error message when encountering an RPC error.

### Detailed summary
- Improved error message when smart wallet connection fails due to RPC error
- Added dynamic error message including original error message or "unknown error"

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

<!-- end pr-codex -->
2024-09-01 02:41:31 +00:00
MananTank 3dc675e69c Dialog Modal z-index fixes, Fix depedency sort lint error (#4340)
## 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 dialog components in multiple files with new styling classes and z-index values.

### Detailed summary
- Updated `DialogContent` styling and z-index in various files
- Added `dialogOverlayClassName` in multiple dialog components
- Updated dependencies in `react-native-adapter/package.json`

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

<!-- end pr-codex -->
2024-09-01 00:22:19 +00:00
kien-ngo ff3abfa79e [SDK] Add tests for ethers5 Adapter (#4339)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to export functions `toEthersProvider`, `toEthersContract`, and `fromEthersContract` in `ethers5.ts`, and update test cases in `ethers5.test.ts` for these functions.

### Detailed summary
- Exported `toEthersProvider`, `toEthersContract`, and `fromEthersContract` functions in `ethers5.ts`
- Updated test cases in `ethers5.test.ts` for `toEthersContract` and `fromEthersContract`
- Added imports and test cases for new functions and modules

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

<!-- end pr-codex -->
2024-08-31 08:18:30 +00:00
kien-ngo 29374a711f [SDK] Add tests for updateMetadata extensions (#4338)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR updates the metadata of ERC721 and ERC1155 NFTs by adding a `client` parameter to the `updateMetadata` function.

### Detailed summary
- Added `client` parameter to `updateMetadata` function in ERC721 and ERC1155 NFTs.
- Updated test files to include `client` parameter in function calls.
- Improved NFT metadata updating process.

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

<!-- end pr-codex -->
2024-08-31 08:13:30 +00:00
kien-ngo b417d6fe2d [SDK] Document the claim behavior where claiming address is the same as PrimarySaleRecipient address (#4337)
Internal discussion: https://thirdwebdev.slack.com/archives/C04LA5X7FNE/p1718033032416319
<!-- start pr-codex -->

## PR-Codex overview
The focus of this PR is to add a test for claiming ERC1155 tokens without paying if the claiming address is the same as the PrimaryRecipientAddress.

### Detailed summary
- Added a test to demonstrate claiming without payment if address matches PrimaryRecipientAddress.
- Imported `deployERC20Contract` for ERC20 deployment.
- Included Solidity code documentation for safe transfer behavior.
- Updated test logic for claiming ERC20 tokens without payment.

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

<!-- end pr-codex -->
2024-08-31 03:36:24 +00:00
MananTank 993973d47e Dashboard color updates and other UI adjustments (#4332)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR updates the styling of various components by replacing the color "gray.700" with "text-muted-foreground" for consistency and accessibility.

### Detailed summary
- Updated various components to use the class `text-muted-foreground` for consistent styling
- Changed background colors to `bg-background` for improved theme consistency

> The following files were skipped due to too many changes: `apps/dashboard/src/components/engine/overview/transaction-timeline.tsx`, `apps/dashboard/src/components/contract-components/contract-deploy-form/modular-contract-default-modules-fieldset.tsx`, `apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/(chainPage)/components/server/cta-card.tsx`, `apps/dashboard/src/app/(dashboard)/(chain)/chainlist/page.tsx`, `apps/dashboard/src/components/settings/AuthorizedWallets/AuthorizedWalletRevokeModal.tsx`, `apps/dashboard/src/components/settings/ApiKeys/Create/index.tsx`, `apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/tx/[txHash]/page.tsx`, `apps/dashboard/src/components/engine/overview/create-backend-wallet-button.tsx`, `apps/dashboard/src/components/engine/contract-subscription/contract-subscriptions-table.tsx`, `apps/dashboard/src/components/contract-components/contract-publish-form/NetworkDropdown.tsx`, `apps/dashboard/src/pages/pricing.tsx`, `apps/dashboard/src/components/cmd-k-search/index.tsx`, `apps/dashboard/src/components/pay/PayConfig.tsx`, `apps/dashboard/src/components/engine/contract-subscription/add-contract-subscription-button.tsx`, `apps/dashboard/src/app/team/[team_slug]/components/tab-switcher.client.tsx`, `apps/dashboard/src/contract-ui/tabs/sources/page.tsx`, `apps/dashboard/src/pages/explore/index.tsx`, `apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/(chainPage)/components/server/explorer-section.tsx`, `apps/dashboard/src/components/engine/relayer/add-relayer-button.tsx`, `apps/dashboard/src/app/team/[team_slug]/(team)/TeamOverviewPage.tsx`, `apps/dashboard/src/pages/dashboard/engine/import.tsx`, `apps/dashboard/src/app/(dashboard)/dashboard/connect/pay/page.tsx`, `apps/dashboard/src/components/pay/PayAnalytics/components/common.tsx`, `apps/dashboard/src/components/shared/TWQueryTable.tsx`, `apps/dashboard/src/@/components/ui/NavLink.tsx`, `apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/(chainPage)/components/server/ChainOverviewSection.tsx`, `apps/dashboard/src/components/dashboard/HomeProductCard.tsx`, `apps/dashboard/src/components/selects/NetworkSelectorButton.tsx`, `apps/dashboard/src/components/explore/upsells/deploy-your-own.tsx`, `apps/dashboard/tailwind.config.js`, `apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/(chainPage)/components/server/ClaimChainSection.tsx`, `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/ecosystem-header.client.tsx`, `apps/dashboard/src/app/(dashboard)/(chain)/chainlist/components/client/search.tsx`, `apps/dashboard/src/@/components/ui/CopyTextButton.tsx`, `apps/dashboard/src/components/contract-functions/contract-function.tsx`, `apps/dashboard/src/@/components/blocks/Sidebar.tsx`, `apps/dashboard/src/pages/dashboard/contracts/deploy.tsx`, `apps/dashboard/src/components/homepage/sections/UpgradeModal.tsx`, `apps/dashboard/src/@/components/ui/textarea.tsx`, `apps/dashboard/src/contract-ui/tabs/listings/components/list-form.tsx`, `apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/(chainPage)/components/server/SupportedProductsSection.tsx`, `apps/dashboard/src/components/engine/relayer/relayers-table.tsx`, `apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/(chainPage)/popular/page.tsx`, `apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/(chainPage)/components/server/FaucetSection.tsx`, `apps/dashboard/src/@/components/ui/badge.tsx`, `apps/dashboard/src/components/dashboard/StepsCard.tsx`, `apps/dashboard/src/app/(dashboard)/dashboard/components/sidebar/section.tsx`, `apps/dashboard/src/components/embedded-wallets/Users/Analytics.tsx`, `apps/dashboard/src/components/contract-components/tables/cells.tsx`, `apps/dashboard/src/pages/dashboard/settings/api-keys/index.tsx`, `apps/dashboard/src/components/engine/engine-list.tsx`, `apps/dashboard/src/app/team/[team_slug]/(team)/layout.tsx`, `apps/dashboard/src/@/components/ui/tabs.tsx`, `apps/dashboard/src/app/(dashboard)/dashboard/connect/ecosystem/page.tsx`, `apps/dashboard/src/pages/dashboard/connect/in-app-wallets.tsx`, `apps/dashboard/src/components/selects/NetworkSelectDropdown.tsx`, `apps/dashboard/src/components/explore/contract-card/index.tsx`, `apps/dashboard/src/app/(dashboard)/(chain)/chainlist/components/server/chainlist-card.tsx`, `apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/(chainPage)/components/server/BuyFundsSection.tsx`, `apps/dashboard/src/components/explore/upsells/publish-submit.tsx`, `apps/dashboard/src/app/(dashboard)/trending/page.tsx`, `apps/dashboard/src/app/(dashboard)/dashboard/connect/pay/components/pay-ui.client.tsx`, `apps/dashboard/src/contract-ui/tabs/nfts/components/table.tsx`, `apps/dashboard/src/app/team/[team_slug]/[project_slug]/layout.tsx`, `apps/dashboard/src/@/components/ui/checkbox.tsx`, `apps/dashboard/src/components/shared/TWTable.tsx`, `apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/(chainPage)/components/client/FaucetButton.tsx`, `apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/(chainPage)/components/server/chain-header.tsx`, `apps/dashboard/src/components/engine/explorer/engine-explorer.tsx`, `apps/dashboard/src/@/components/ui/alert.tsx`, `apps/dashboard/src/components/shared/FileInput.tsx`, `apps/dashboard/src/app/(dashboard)/trending/components/trending-table.tsx`, `apps/dashboard/src/components/engine/permissions/access-tokens-table.tsx`, `apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/(chainPage)/layout.tsx`, `apps/dashboard/src/app/components/Header/DashboardHeader.tsx`, `apps/dashboard/src/components/engine/permissions/admins-table.tsx`, `apps/dashboard/src/app/(dashboard)/support/page.tsx`, `apps/dashboard/src/components/engine/overview/engine-overview.tsx`, `apps/dashboard/src/components/engine/overview/backend-wallets-table.tsx`, `apps/dashboard/src/components/dashboard/Changelog.tsx`, `apps/dashboard/src/components/settings/ApiKeys/index.tsx`, `apps/dashboard/src/components/engine/tier-card.tsx`, `apps/dashboard/src/@/styles/globals.css`, `apps/dashboard/src/theme/index.ts`, `apps/dashboard/src/components/layout/app-shell/index.tsx`, `apps/dashboard/src/components/contract-components/tables/deployed-contracts.tsx`, `apps/dashboard/src/components/engine/overview/transactions-table.tsx`, `apps/dashboard/src/@/components/blocks/app-footer.tsx`, `apps/dashboard/src/app/(dashboard)/styleguide/page.tsx`, `apps/dashboard/src/components/contract-components/import-contract/modal.tsx`

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

<!-- end pr-codex -->
2024-08-31 01:09:28 +00:00
gregfromstl 8b137f0fe2 [React SDK] Fix: Hide in-app wallet connection option in pay embed (#4336)
The PayEmbed is missing the proper context to handle in-app wallet connections. Given this is an unlikely user use case, we'll disable it for now until the PayEmbed can be fully refactored.

CNCT-1762

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on hiding the in-app wallet connection in the Pay Embed feature of the `WalletSwitcherConnectionScreen` and filtering out the in-app wallet option in the `BuyScreen`.

### Detailed summary
- Hide in-app wallet connection in Pay Embed feature
- Filter out in-app wallet option in BuyScreen

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

<!-- end pr-codex -->
2024-08-31 00:53:36 +00:00
kien-ngo fd051797b7 [SDK] ERC1155 ClaimTo test with Allowlist (#4333)
## 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 ERC1155 claimTo extension by adding support for claiming NFTs with an allowlist feature.

### Detailed summary
- Added support for claiming NFTs with an allowlist feature
- Updated test cases to include claiming with an allowlist
- Modified contract setup and transaction handling for allowlist functionality

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

<!-- end pr-codex -->
2024-08-31 00:15:53 +00:00
gregfromstl 6432e8dc6b [TS SDK] Feature: L2 ENS name resolution (#4334)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR adds L2 ENS name resolution functionality to the Thirdweb package.

### Detailed summary
- Added L2 ENS name resolution
- Updated cache key in resolve-name.ts
- Added new constants in constants.ts
- Exported new functions and constants in ens.ts
- Updated resolve-address.ts and resolve-l2-name.ts for Basename resolution
- Added resolve-l2-name test cases
- Added resolve-l2-name functionality and related files

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

<!-- end pr-codex -->
2024-08-30 20:12:58 +00:00
kien-ngo c52e1beffb [Dashboard] Fix ERC1155 claim issue (#4335)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on updating the `from` field in the `claim-tab.tsx` component to use the `account.address` value.

### Detailed summary
- Updated `from` field in the `claim-tab.tsx` component to use `account.address` value.

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

<!-- end pr-codex -->
2024-08-30 18:40:38 +00:00
kien-ngo bdb814df6c [SDK] Fix token approval for CreateDirectListingButton (#4327)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on fixing NFT approval for `CreateDirectListingButton`.

### Detailed summary
- Added checks for ERC721 and ERC1155 asset types
- Updated NFT contract retrieval
- Implemented token approval logic for ERC721 and ERC1155
- Removed unnecessary imports

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

<!-- end pr-codex -->
2024-08-30 15:05:56 +00:00
kien-ngo eac008967c [Dashboard] Add approval step to claim forms (#4326)
<!-- start pr-codex -->

## PR-Codex overview
The focus of this PR is to enhance NFT and token claiming functionality by adding approval checks for ERC20 tokens.

### Detailed summary
- Added approval checks for ERC20 tokens before claiming NFTs and tokens
- Improved error handling and notifications for claiming process
- Ensured account detection before claiming to prevent errors

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

<!-- end pr-codex -->
2024-08-30 12:20:26 +00:00
DustinandGitHub f57acc6b24 Update ClaimChainSection.tsx (#4315) 2024-08-30 23:07:40 +12:00
Jonas DanielsGitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
e46b3d3e2e Version Packages (#4320)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-08-30 21:48:00 +12:00
edwardysun c97b1a5d7e Fix default "Pay with" chain (#4328)
## Problem solved

When supported source chains is updated, update `fromChain` to take the first chain on the supported sources list instead of defaulting to `polygon`

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to update the default source chain selection in `PayEmbed`.

### Detailed summary
- Updated default source chain selection logic in `BuyScreen.tsx`
- Refactored the dependencies array in `useEffect` hook for better performance

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

<!-- end pr-codex -->
2024-08-30 08:03:15 +00:00
kien-ngo 42d5c65e49 [SDK] NFT Prebuilt components (#4179)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR adds NFT prebuilt components for displaying NFT metadata, including name, description, and media.

### Detailed summary
- Added `image_url` property to `NFT` type
- Introduced NFT prebuilt components: `NFT`, `NFT.Media`, `NFT.Name`, `NFT.Description`
- Implemented functions to fetch and display NFT metadata
- Updated test cases for NFT components

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

<!-- end pr-codex -->
2024-08-30 03:00:16 +00:00
gregfromstl 81c9ee91fa [Playground] Refactor: Move ThirdwebProvider to each individual page for separate context (#4292)
<!-- start pr-codex -->

## PR-Codex overview
The focus of this PR is to refactor the codebase by introducing a `ThirdwebProvider` component and removing unnecessary wallet-related logic from different components.

### Detailed summary
- Introduced `ThirdwebProvider` component to wrap children with `_ThirdwebProvider`
- Removed wallet-related logic from `ConnectSmartAccountPreview`, `SponsoredTxPreview`, `SponsoredTxZksyncPreview` components
- Updated various components to use `ThirdwebProvider` instead of `ThirdwebProvider` directly

> The following files were skipped due to too many changes: `apps/playground-web/src/app/connect/in-app-wallet/page.tsx`, `apps/playground-web/src/app/connect/pay/page.tsx`, `apps/playground-web/src/app/connect/auth/page.tsx`, `apps/playground-web/src/app/connect/sign-in/button/page.tsx`, `apps/playground-web/src/app/connect/blockchain-api/page.tsx`

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

<!-- end pr-codex -->
2024-08-30 00:35:39 +00:00
kien-ngo c6d1f79267 [Dashboard] Handle loading state for marketplace ui (#4321)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on improving error handling in the `list-form.tsx` file by setting `isFormLoading` to false when an error occurs during NFT approval.

### Detailed summary
- Added `setIsFormLoading(false)` to handle error in NFT approval process.

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

<!-- end pr-codex -->
2024-08-30 00:24:32 +00:00
MananTank 3b7890c0fc Add pagination in InApp wallet users table and update tabs (#4325)
## 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 pagination functionality for displaying a specific number of items per page in the Users component of the embedded wallets feature.

### Detailed summary
- Added pagination logic to display a subset of wallets per page based on active page
- Implemented pagination buttons for navigating through multiple pages
- Updated the Users component to show items based on pagination
- Added state management for active page selection
- Updated URL search parameters based on selected tab in the EmbeddedWallets component

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

<!-- end pr-codex -->
2024-08-30 00:13:37 +00:00
MananTank 3d60da3717 Fix inApp wallet config form values + show loading state (#4323)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to improve the loading state handling in the in-app wallets section and refactor the form values handling in the Configure component.

### Detailed summary
- Improved loading state handling in in-app wallets section
- Refactored form values handling in the Configure component

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

<!-- end pr-codex -->
2024-08-29 23:49:13 +00:00
gregfromstl 3e425ecc68 [React SDK] Fix: Accessbility warnings (#4322)
Fixes #4313

<!-- start pr-codex -->

---

## PR-Codex overview
This PR fixes accessibility warnings in the `Modal` component by adding a visually hidden title for screen readers.

### Detailed summary
- Added visually hidden title for screen readers in the `Modal` component
- Set `aria-describedby` attribute to `undefined` in `Dialog.Content` to improve accessibility

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

<!-- end pr-codex -->
2024-08-29 22:55:31 +00:00
gregfromstl 9d6eb27081 [TS SDK] Fix: Contract deployments with smart accounts (#4306)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on fixing programmatic deployments with smart accounts in the `useSendToken` hook.

### Detailed summary
- Updated error message for invalid receiver address
- Allowed empty strings for deployment transactions in `encodeAddress` function

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

<!-- end pr-codex -->
2024-08-29 21:25:15 +00:00
gregfromstl 1e70bbf2c3 [React Native] Fix: Retry fetching user shares (#4317)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR introduces automatic retries for React Native in-app wallet logins to improve user experience.

### Detailed summary
- Added automatic retries for in-app wallet login in React Native
- Implemented retry mechanism with a maximum of 3 retries
- Added error handling for failed login attempts

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

<!-- end pr-codex -->
2024-08-29 21:09:22 +00:00
gregfromstl a65bb8839b [TS SDK] Fix: Include MainnetZ in legacy chain list (#4316)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on enhancing the in-app wallet transactions by including the from address and updating gas fee data for MainnetZ.

### Detailed summary
- Added from address in in-app wallet transactions
- Updated gas fee data for MainnetZ Mainnet and Testnet

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

<!-- end pr-codex -->
2024-08-29 20:40:46 +00:00
MananTank 74753e1dfe Marketplace create listing form UI improvements (#4318)
## 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 CreateListingButton component to manage form loading state more efficiently.

### Detailed summary
- Added `useState` to manage form loading state
- Replaced `useSendAndConfirmTransaction` with `useActiveAccount` in `list-button.tsx`
- Replaced `mutation` with `setIsFormLoading` in `list-button.tsx`
- Added `CircleAlertIcon` and form validation for contract address in `list-form.tsx`

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

<!-- end pr-codex -->
2024-08-29 19:53:09 +00:00
kien-ngo 3aaffe1a70 [Dashboard] Add NFT approval step to Marketplace create listing & auction (#4311)
## 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 `CreateListingButton` and `CreateListingsForm` components to use `mutation` instead of `mutate` for transaction handling.

### Detailed summary
- Refactored `useSendAndConfirmTransaction()` to `useSendAndConfirmTransaction()`
- Renamed `mutate` to `mutation` in `CreateListingButton`
- Updated `useMutationResult` import in `list-form.tsx`
- Replaced `mutate` with `mutation` in `CreateListingsForm`
- Added error handling and approval logic in `CreateListingsForm`

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

<!-- end pr-codex -->
2024-08-29 18:11:43 +00:00
kien-ngo 68ee714e22 [SDK] Add tests: claim conditions for ERC1155 Drop (#4309)
## 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 test for getting active claim conditions in an ERC1155 contract.

### Detailed summary
- Added imports for test constants and functions
- Added a test case for getting active claim conditions in ERC1155 contract
- Implemented setup and assertions for the test case

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

<!-- end pr-codex -->
2024-08-29 11:18:54 +00:00
Phillip HoandGitHub 5858cc1c26 chore: Update AWS/GCP KMS docs (#4300) 2024-08-29 10:22:17 +00:00
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
1289 changed files with 24753 additions and 15687 deletions
+3
View File
@@ -30,3 +30,6 @@ sitemap*.xml
# typedoc
legacy_packages/*/typedoc/*
packages/*/typedoc/*
*storybook.log
storybook-static
+1
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",
+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;
+78
View File
@@ -0,0 +1,78 @@
import type { Preview } from "@storybook/react";
import "@/styles/globals.css";
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
import { MoonIcon, SunIcon } from "lucide-react";
import { Inter as interFont } from "next/font/google";
// biome-ignore lint/style/useImportType: <explanation>
import React, { useState } from "react";
import { useEffect } from "react";
import { Button } from "../src/@/components/ui/button";
// 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) => {
return (
<StoryLayout>
<Story />
</StoryLayout>
);
},
],
};
export default preview;
function StoryLayout(props: {
children: React.ReactNode;
}) {
const [theme, setTheme] = useState<"light" | "dark">("dark");
useEffect(() => {
document.body.className = `font-sans antialiased ${fontSans.variable} ${theme === "dark" ? " dark" : ""}`;
}, [theme]);
return (
<div>
<div className="flex justify-end p-4 border-b gap-2">
<Button
onClick={() => setTheme("dark")}
size="sm"
variant={theme === "dark" ? "default" : "ghost"}
>
<MoonIcon className="size-5" />
</Button>
<Button
onClick={() => setTheme("light")}
size="sm"
variant={theme === "light" ? "default" : "ghost"}
>
<SunIcon className="size-5" />
</Button>
</div>
<QueryClientProvider client={queryClient}>
{props.children}
</QueryClientProvider>
</div>
);
}
+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:;
+17 -13
View File
@@ -18,7 +18,9 @@
"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",
@@ -46,11 +48,10 @@
"@radix-ui/react-tooltip": "1.1.2",
"@react-icons/all-files": "^4.1.0",
"@sentry/nextjs": "^8.26.0",
"@shazow/whatsabi": "^0.14.1",
"@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/react": "workspace:*",
"@thirdweb-dev/sdk": "workspace:*",
@@ -68,7 +69,6 @@
"flat": "^6.0.1",
"framer-motion": "^11.2.12",
"fuse.js": "7.0.0",
"idb-keyval": "^6.2.1",
"ioredis": "^5.4.1",
"ipaddr.js": "^2.2.0",
"lottie-react": "^2.4.0",
@@ -82,13 +82,11 @@
"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",
"react": "18.3.1",
"react-children-utilities": "^2.10.0",
"react-confetti": "^6.1.0",
"react-day-picker": "^8.10.1",
"react-dom": "18.3.1",
"react-dropzone": "^14.2.3",
@@ -117,9 +115,19 @@
},
"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",
"@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/addon-viewport": "^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.9",
"@types/papaparse": "^5.3.14",
@@ -133,21 +141,17 @@
"@typescript-eslint/eslint-plugin": "7.14.1",
"@typescript-eslint/parser": "7.14.1",
"autoprefixer": "^10.4.19",
"checkly": "^4.7.0",
"dotenv": "^16.4.5",
"checkly": "^4.8.1",
"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",
"eslint-plugin-storybook": "^0.8.0",
"knip": "^5.23.1",
"next-sitemap": "^4.2.3",
"next-unused": "^0.0.6",
"storybook": "^8.2.9",
"tailwindcss": "^3.4.10",
"typescript": "5.5.4"
},
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

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: 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: 12 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.

Before

Width:  |  Height:  |  Size: 694 KiB

After

Width:  |  Height:  |  Size: 728 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 636 KiB

After

Width:  |  Height:  |  Size: 1.2 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.

Before

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

+9 -4
View File
@@ -131,12 +131,17 @@ function redirects() {
},
{
source: "/dashboard/connect",
destination: "/dashboard/connect/playground",
destination: "/dashboard/connect/analytics",
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,
},
{
@@ -161,7 +166,7 @@ function redirects() {
},
{
source: "/dashboard/wallets",
destination: "/dashboard/connect/playground",
destination: "https://playground.thirdweb.com/connect/sign-in/button",
permanent: false,
},
{
@@ -181,7 +186,7 @@ function redirects() {
},
{
source: "/dashboard/wallets/connect",
destination: "/dashboard/connect/playground",
destination: "https://playground.thirdweb.com/connect/sign-in/button",
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 [];
}
+69
View File
@@ -0,0 +1,69 @@
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 = {
id: string;
name: string;
slug: string;
createdAt: string;
updatedAt: string;
deletedAt: string | null;
bannedAt: string | null;
// image: string; // -> TODO
billingPlan: "pro" | "growth" | "free";
billingStatus: "validPayment" | (string & {}); // what's the other value?
// billingEmail: string;
// billingExternalId: string;
// billingType: "STRIPE" | ??
// billingCustomerPayload: ?? | null
// paymentAttemptCount: number
// trialPeriodEndedAt: string | null;
};
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 [];
}
@@ -2,24 +2,20 @@
import { Button } from "@/components/ui/button";
import { Dialog, DialogContent, DialogTrigger } from "@/components/ui/dialog";
import { MenuIcon } from "lucide-react";
import { useState } from "react";
import { NavLink } from "../ui/NavLink";
export function BurgerMenuButton(props: {
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>
<Button size="icon" variant="outline">
<MenuIcon strokeWidth={1} />
</Button>
</DialogTrigger>
<DialogTrigger asChild>{props.trigger}</DialogTrigger>
<DialogContent
className="p-6 rounded-xl"
className="p-4 rounded-t-xl rounded-b-none"
dialogCloseClassName="hidden"
onClick={(e) => {
if (e.target instanceof HTMLAnchorElement) {
@@ -4,7 +4,7 @@ import { NavLink } from "../ui/NavLink";
export type SidebarContentProps = {
header?: React.ReactNode;
links?: { href: string; label: React.ReactNode }[];
links: { href: string; label: React.ReactNode; exactMatch?: boolean }[];
className?: string;
};
@@ -22,6 +22,7 @@ export function Sidebar(props: SidebarContentProps) {
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"
exactMatch={link.exactMatch}
>
{link.label}
</NavLink>
@@ -21,7 +21,7 @@ export function AppFooter(props: AppFooterProps) {
return (
<footer
className={cn(
"bg-background border-t border-border py-6 md:py-8 w-full",
"bg-muted/50 border-t border-border py-6 md:py-8 w-full",
props.className,
)}
>
@@ -30,22 +30,22 @@ export function AppFooter(props: AppFooterProps) {
<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>
<p className="text-sm text-muted-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" />
<SiGithub className="text-muted-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" />
<SiTiktok className="text-muted-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" />
<SiInstagram className="text-muted-foreground size-5" />
</Link>
</Button>
<Button size="icon" variant="ghost" asChild className="size-9">
@@ -53,27 +53,27 @@ export function AppFooter(props: AppFooterProps) {
href="hhttps://www.linkedin.com/company/third-web/"
target="_blank"
>
<SiLinkedin className="text-secondary-foreground size-5" />
<SiLinkedin className="text-muted-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" />
<SiYoutube className="text-muted-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" />
<SiDiscord className="text-muted-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" />
<SiReddit className="text-muted-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" />
<SiX className="text-muted-foreground size-5" />
</Link>
</Button>
</div>
@@ -81,55 +81,55 @@ export function AppFooter(props: AppFooterProps) {
{/* 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"
className="py-[6px] px-[10px] text-muted-foreground text-sm hover:underline"
href="/"
>
Home
</Link>
<Link
className="py-[6px] px-[10px] text-secondary-foreground text-sm hover:underline"
className="py-[6px] px-[10px] text-muted-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"
className="py-[6px] px-[10px] text-muted-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"
className="py-[6px] px-[10px] text-muted-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"
className="py-[6px] px-[10px] text-muted-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"
className="py-[6px] px-[10px] text-muted-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"
className="py-[6px] px-[10px] text-muted-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"
className="py-[6px] px-[10px] text-muted-foreground text-sm hover:underline"
href="https://thirdweb.com/chainlist"
target="_blank"
>
@@ -20,9 +20,9 @@ export function ColorModeToggle() {
aria-label="Toggle theme"
>
{theme === "light" ? (
<Sun strokeWidth={1} className="size-6" />
<Sun strokeWidth={1} className="size-5" />
) : (
<Moon strokeWidth={1} className="size-6" />
<Moon strokeWidth={1} className="size-5" />
)}
</Button>
</ClientOnly>
@@ -16,7 +16,7 @@ export function CopyAddressButton(props: {
| "ghost";
copyIconPosition: "left" | "right";
}) {
const shortenedAddress = `${props.address.slice(0, 6)}...${props.address.slice(0, 4)}`;
const shortenedAddress = `${props.address.slice(0, 6)}...${props.address.slice(-4)}`;
return (
<CopyTextButton
@@ -10,12 +10,13 @@ export function CopyButton(props: {
text: string;
className?: string;
iconClassName?: string;
variant?: "ghost" | "primary" | "secondary";
}) {
const [isCopied, setIsCopied] = useState(false);
return (
<ToolTipLabel label="Copy">
<Button
variant="ghost"
variant={props.variant || "ghost"}
aria-label="Copy"
className={cn("h-auto w-auto p-1", props.className)}
onClick={() => {
@@ -20,6 +20,7 @@ export function CopyTextButton(props: {
| "secondary"
| "ghost";
copyIconPosition: "left" | "right";
onClick?: () => void;
}) {
const [isCopied, setIsCopied] = useState(false);
const copyButton = isCopied ? (
@@ -44,10 +45,12 @@ export function CopyTextButton(props: {
"h-auto w-auto px-2.5 py-1.5 flex gap-2 rounded-lg text-foreground font-normal",
props.className,
)}
onClick={() => {
onClick={(e) => {
navigator.clipboard.writeText(props.textToCopy);
setIsCopied(true);
setTimeout(() => setIsCopied(false), 1000);
e.stopPropagation();
props.onClick?.();
}}
>
{props.copyIconPosition === "right" ? (
@@ -34,7 +34,7 @@ export function DynamicHeight(props: {
);
}
export function useHeightObserver() {
function useHeightObserver() {
const elementRef = useRef<HTMLDivElement>(null);
const [height, setHeight] = useState<number | undefined>();
@@ -1,6 +1,6 @@
.unorderedList,
.orderedList {
@apply pl-5 leading-relaxed list-none text-secondary-foreground;
@apply pl-5 leading-relaxed list-none text-muted-foreground;
}
.unorderedList > li {
@@ -8,15 +8,21 @@ export type NavButtonProps = {
className?: string;
activeClassName?: string;
href: string;
exactMatch?: boolean;
};
export function NavLink(props: React.PropsWithChildren<NavButtonProps>) {
const pathname = usePathname();
const isActive = pathname === props.href;
const isActive = pathname
? props.exactMatch
? pathname === props.href
: 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>
@@ -4,7 +4,7 @@ export function Spinner(props: { className?: string }) {
return (
<svg
viewBox="0 0 50 50"
className={`${style.loader} ${props.className || ""}`}
className={`${style.loader} ${props.className || "size-4"}`}
>
<title>loading</title>
<circle
+7 -9
View File
@@ -4,16 +4,14 @@ 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",
"dark:bg-muted/50 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",
default: "text-foreground",
destructive: "text-destructive-text [&>svg]:text-destructive-text",
info: "text-primary [&>svg]:text-primary",
warning: "text-warning-text [&>svg]:text-warning-text",
},
},
defaultVariants: {
@@ -41,7 +39,7 @@ const AlertTitle = React.forwardRef<
>(({ className, ...props }, ref) => (
<h5
ref={ref}
className={cn("mb-1.5 font-medium leading-none tracking-tight", className)}
className={cn("font-medium leading-none tracking-tight", className)}
{...props}
/>
));
@@ -54,7 +52,7 @@ const AlertDescription = React.forwardRef<
<div
ref={ref}
className={cn(
"text-sm [&_p]:leading-relaxed text-secondary-foreground",
"text-sm [&_p]:leading-relaxed text-muted-foreground mt-1.5",
className,
)}
{...props}
+5 -5
View File
@@ -8,16 +8,16 @@ const badgeVariants = cva(
{
variants: {
variant: {
default:
"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",
default: "border-transparent bg-primary/20 text-primary",
secondary:
"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",
"border-transparent dark:bg-red-950 dark:text-red-400 bg-red-500/20 text-red-800",
warning:
"border-transparent dark:bg-yellow-600/20 dark:text-yellow-500 bg-yellow-500/20 text-yellow-900",
outline: "text-foreground",
success:
"border-transparent bg-success text-success-foreground hover:bg-success/80",
"border-transparent dark:bg-green-950/50 dark:text-green-400 bg-green-200 text-green-950",
},
},
defaultVariants: {
+1 -1
View File
@@ -46,7 +46,7 @@ const CardDescription = React.forwardRef<
>(({ className, ...props }, ref) => (
<p
ref={ref}
className={cn("text-sm text-secondary-foreground", className)}
className={cn("text-sm text-muted-foreground", className)}
{...props}
/>
));
+1 -1
View File
@@ -283,7 +283,7 @@ const ChartLegendContent = React.forwardRef<
<div
ref={ref}
className={cn(
"flex items-center justify-center gap-4 overflow-x-auto",
"flex items-center justify-center gap-x-4 gap-y-2 overflow-x-auto flex-wrap",
verticalAlign === "top" ? "pb-3" : "pt-3",
className,
)}
@@ -13,7 +13,7 @@ const Checkbox = React.forwardRef<
<CheckboxPrimitive.Root
ref={ref}
className={cn(
"peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",
"peer h-4 w-4 shrink-0 rounded-sm border border-foreground ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-inverted data-[state=checked]:text-inverted-foreground",
className,
)}
{...props}
@@ -21,7 +21,7 @@ const Checkbox = React.forwardRef<
<CheckboxPrimitive.Indicator
className={cn("flex items-center justify-center text-current")}
>
<Check className="h-4 w-4 text-white" />
<Check className="h-4 w-4" />
</CheckboxPrimitive.Indicator>
</CheckboxPrimitive.Root>
));
@@ -36,7 +36,7 @@ export function CheckboxWithLabel(props: {
return (
<label
className={cn(
"flex gap-2 items-start text-secondary-foreground text-sm cursor-pointer select-none [&>button]:mt-0.5",
"flex gap-2 items-start text-muted-foreground text-sm cursor-pointer select-none [&>button]:mt-0.5",
props.className,
)}
>
+13 -1
View File
@@ -73,7 +73,19 @@ 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 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" &&
@@ -36,7 +36,12 @@ function SkeletonContainer<T>(props: {
isLoading ? "opacity-0" : "opacity-100",
)}
>
{props.render(props.loadedData ?? props.skeletonData, !isLoading)}
{props.render(
props.loadedData === undefined
? props.skeletonData
: props.loadedData,
!isLoading,
)}
</div>
</div>
</div>
+52 -35
View File
@@ -7,40 +7,49 @@ import { useCallback, useRef, useState } from "react";
import { ScrollShadow } from "./ScrollShadow/ScrollShadow";
import { Button } from "./button";
export type TabLink = {
name: string;
href: string;
isActive: boolean;
isDisabled?: boolean;
};
export function TabLinks(props: {
links: {
name: string;
href: string;
isActive: boolean;
isEnabled?: 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}
disabled={!tab.isEnabled}
disabled={tab.isDisabled}
variant="ghost"
>
<Link
data-active={tab.isActive}
ref={tab.isActive ? activeTabRef : undefined}
href={tab.href}
aria-disabled={!tab.isEnabled}
aria-disabled={tab.isDisabled}
className={cn(
"rounded-lg hover:bg-muted px-3 font-medium text-sm lg:text-base relative h-auto",
!tab.isActive &&
tab.isEnabled &&
"opacity-50 hover:opacity-100",
!tab.isEnabled && "opacity-50 pointer-events-none",
"rounded-lg hover:bg-muted px-3 font-normal text-sm lg:text-sm relative h-auto text-muted-foreground",
!tab.isActive && !tab.isDisabled && "hover:text-foreground",
tab.isDisabled && "pointer-events-none",
tab.isActive && "!text-foreground",
)}
>
{tab.name}
@@ -56,8 +65,6 @@ export function TabLinks(props: {
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>
);
}
@@ -80,6 +87,9 @@ export function TabButtons(props: {
return (
<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)}
@@ -114,8 +124,6 @@ export function TabButtons(props: {
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>
);
}
@@ -130,24 +138,33 @@ function useUnderline<El extends HTMLElement>() {
}, []);
useIsomorphicLayoutEffect(() => {
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);
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 };
@@ -10,7 +10,7 @@ const Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(
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",
"flex min-h-[80px] w-full rounded-md border border-input bg-card 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}
@@ -34,6 +34,7 @@ export function ToolTipLabel(props: {
label: React.ReactNode;
rightIcon?: React.ReactNode;
leftIcon?: React.ReactNode;
hoverable?: boolean;
}) {
if (!props.label) {
return props.children;
@@ -41,7 +42,7 @@ export function ToolTipLabel(props: {
return (
<TooltipProvider>
<Tooltip delayDuration={100} disableHoverableContent={true}>
<Tooltip delayDuration={100} disableHoverableContent={!props.hoverable}>
<TooltipTrigger asChild className="!pointer-events-auto">
{props.children}
</TooltipTrigger>
@@ -1,3 +1,5 @@
"use client";
import { useTrack } from "hooks/analytics/useTrack";
import Link from "next/link";
import type React from "react";
+3 -5
View File
@@ -1,17 +1,15 @@
const LOGGED_IN_ONLY_PATHS = [
// anything that _starts_ with /dashboard is logged in only
"/dashboard",
// team pages are logged in only
"/team",
// anything that _starts_ with /cli is logged in only
"/cli",
"/support",
// TODO: add any other logged in only paths here
];
export function isLoginRequired(pathname: string) {
// exceptions from LOGGED_IN_ONLY_PATHS
if (pathname.startsWith("/dashboard/connect/playground")) {
return false;
}
return LOGGED_IN_ONLY_PATHS.some((path) => pathname.startsWith(path));
}
+76 -60
View File
@@ -3,82 +3,83 @@
@tailwind utilities;
@layer base {
:root {
:root,
[data-theme="light"] {
/* bg - neutral */
--background: 0 0% 100%;
--secondary: 0 0% 97%;
--popover: 0 0% 100%;
--card: 0 0% 100%;
--secondary: 0 0% 92%;
--muted: 0 0% 95%;
--accent: 0 0% 92%;
--card: var(--secondary);
--popover: var(--background);
--inverted: var(--foreground);
/* bg - colorful */
--primary: 221.21deg 83.19% 53.33%;
--destructive: 0 84.2% 94%;
--success: 142.09 60.56% 90%;
--warning: 40.61deg 96.12% 92%;
/* Text */
--foreground: 0 0% 3.9%;
--card-foreground: 0 0% 3.9%;
--popover-foreground: 240 10% 3.9%;
--primary-foreground: 0 0% 100%;
--secondary-foreground: 0 0% 30%;
--muted-foreground: 0 0% 40%;
--accent-foreground: 0 0% 9%;
--success-foreground: 142.09 70.56% 35.29%;
--destructive-foreground: 0 84.24% 60.2%;
--inverted-foreground: var(--background);
--warning-foreground: 40.61deg 96.12% 40.4%;
--link-foreground: 221.21deg 83.19% 53.33%;
--destructive-text: 0 84.24% 60.2%;
--success-text: 142.09 70.56% 35.29%;
/* Borders */
--border: 0 0% 80%;
--input: var(--border);
--ring: 215.88 100% 60%;
/* Others */
--radius: 0.5rem;
}
.dark {
/* bg - neutral */
--background: 0 0% 4.5%;
--secondary: 0 0% 6.5%;
--muted: 0 0% 9%;
--accent: 0 0% 12%;
--card: var(--secondary);
--popover: var(--background);
--inverted: var(--foreground);
--accent: 0 0% 95%;
--inverted: 0 0% 4%;
/* bg - colorful */
--primary: 221 83% 54%;
--destructive: 0 62.8% 15%;
--success: 156.2 71.6% 10%;
--warning: 40.61deg 96.12% 8%;
--destructive: 360 72% 51%;
/* Text */
--foreground: 0 0% 4%;
--card-foreground: 0 0% 4%;
--popover-foreground: 240 10% 4%;
--primary-foreground: 0 0% 100%;
--secondary-foreground: 0 0% 4%;
--muted-foreground: 0 0% 40%;
--accent-foreground: 0 0% 9%;
--destructive-foreground: 0 0% 100%;
--inverted-foreground: var(--background);
--link-foreground: 221.21deg 83.19% 53.33%;
--success-text: 142.09 70.56% 35.29%;
--warning-text: 38 92% 40%;
--destructive-text: 357.15deg 100% 68.72%;
/* Borders */
--border: 0 0% 80%;
--input: 0 0% 80%;
--ring: 0 0% 85%;
/* Others */
--radius: 0.5rem;
--chart-lightness: 50%;
--chart-saturation: 50%;
}
.dark,
[data-theme="dark"] {
/* bg - neutral */
--background: 0 0% 0%;
--card: 0 0% 0%;
--popover: 0 0% 0%;
--secondary: 0 0% 10%;
--muted: 0 0% 9%;
--accent: 0 0% 9%;
--inverted: 0 0% 98%;
/* bg - colorful */
--primary: 221 83% 54%;
--destructive: 360 72% 51%;
/* Text */
--foreground: 0 0% 98%;
--card-foreground: 0 0% 98%;
--popover-foreground: 0 0% 98%;
--primary-foreground: 0 0% 100%;
--secondary-foreground: 0 0% 75%;
--muted-foreground: 0 0% 63.9%;
--secondary-foreground: 0 0% 98%;
--muted-foreground: 0 0% 63%;
--accent-foreground: 0 0% 98%;
--destructive-foreground: 0deg 90.6% 80%;
--success-foreground: 156.2 71.6% 66.86%;
--warning-foreground: 45.4deg 93.39% 47.45%;
--destructive-foreground: 0 0% 100%;
--link-foreground: 215.88 100% 65%;
--destructive-text: 0 84.24% 65%;
--success-text: 156.2 71.6% 66.86%;
--warning-text: 38 92% 50%;
--destructive-text: 360 72% 55%;
--success-text: 142 75% 50%;
/* Borders */
--border: 0 0% 14.9%;
--ring: 215.88 100% 60%;
--input: var(--border);
--border: 0 0% 15%;
--ring: 0 0% 30%;
--input: 0 0% 15%;
--chart-lightness: 50%;
--chart-saturation: 50%;
}
}
@@ -99,6 +100,7 @@
--chart-3: 30 80% 55%;
--chart-4: 280 65% 60%;
--chart-5: 340 75% 55%;
/* below is ai generated based on the initial */
--chart-6: 200 65% 50%;
--chart-7: 120 70% 45%;
@@ -122,3 +124,17 @@
opacity: 0.5;
}
}
@layer utilities {
/* Hide scrollbar for Chrome, Safari and Opera */
.no-scrollbar::-webkit-scrollbar,
.no-scrollbar *::-webkit-scrollbar {
display: none;
}
/* Hide scrollbar for IE, Edge and Firefox */
.no-scrollbar,
.no-scrollbar * {
-ms-overflow-style: none; /* IE and Edge */
scrollbar-width: none; /* Firefox */
}
}
@@ -3,12 +3,16 @@
import { Spinner } from "@/components/ui/Spinner/Spinner";
import { Button } from "@/components/ui/button";
import { thirdwebClient } from "@/constants/client";
import { useSupportedChains } from "@thirdweb-dev/react";
import { getSDKTheme } from "app/components/sdk-component-theme";
import { CustomChainRenderer } from "components/selects/CustomChainRenderer";
import { mapV4ChainToV5Chain } from "contexts/map-chains";
import { useTrack } from "hooks/analytics/useTrack";
import { useSupportedChains } from "hooks/chains/configureChains";
import {
useAddRecentlyUsedChainId,
useRecentlyUsedChains,
} from "hooks/chains/recentlyUsedChains";
import { useSetIsNetworkConfigModalOpen } from "hooks/networkConfigModal";
import { useTheme } from "next-themes";
import Image from "next/image";
import Link from "next/link";
@@ -16,10 +20,6 @@ import { usePathname } from "next/navigation";
import { useCallback, useMemo } from "react";
import type { Chain } from "thirdweb";
import { AutoConnect, ConnectButton, useConnectModal } from "thirdweb/react";
import { getSDKTheme } from "../../../../app/components/sdk-component-theme";
import { CustomChainRenderer } from "../../../../components/selects/CustomChainRenderer";
import { mapV4ChainToV5Chain } from "../../../../contexts/map-chains";
import { useSetIsNetworkConfigModalOpen } from "../../../../hooks/networkConfigModal";
import { useFavoriteChains } from "../../hooks/useFavoriteChains";
import { useLoggedInUser } from "../../hooks/useLoggedInUser";
import { popularChains } from "../popularChains";
@@ -27,6 +27,7 @@ import { popularChains } from "../popularChains";
export const CustomConnectWallet = (props: {
loginRequired?: boolean;
connectButtonClassName?: string;
detailsButtonClassName?: string;
}) => {
const loginRequired =
props.loginRequired === undefined ? true : props.loginRequired;
@@ -119,6 +120,9 @@ export const CustomConnectWallet = (props: {
connectButton={{
className: props.connectButtonClassName,
}}
detailsButton={{
className: props.detailsButtonClassName,
}}
chains={allChains}
detailsModal={{
networkSelector: {
@@ -180,13 +180,14 @@ interface CreateKeyInput {
services?: UpdateKeyServiceInput[];
}
interface UpdateKeyInput {
export interface UpdateKeyInput {
id: string;
name: string;
domains: string[];
bundleIds: string[];
walletAddresses?: string[];
services?: UpdateKeyServiceInput[];
redirectUrls: string[];
}
interface UsageBundler {
@@ -227,7 +228,7 @@ export interface UsageBillableByService {
};
}
interface WalletStats {
export interface WalletStats {
timeSeries: {
dayTime: string;
clientId: string;
@@ -270,9 +271,9 @@ interface UseAccountInput {
export function useAccount({ refetchInterval }: UseAccountInput = {}) {
const { user, isLoggedIn } = useLoggedInUser();
return useQuery(
accountKeys.me(user?.address as string),
async () => {
return useQuery({
queryKey: accountKeys.me(user?.address as string),
queryFn: async () => {
const res = await fetch(`${THIRDWEB_API_HOST}/v1/account/me`, {
method: "GET",
headers: {
@@ -287,19 +288,17 @@ export function useAccount({ refetchInterval }: UseAccountInput = {}) {
return json.data as Account;
},
{
enabled: !!user?.address && isLoggedIn,
refetchInterval: refetchInterval ?? false,
},
);
enabled: !!user?.address && isLoggedIn,
refetchInterval: refetchInterval ?? false,
});
}
export function useAccountUsage() {
const { user, isLoggedIn } = useLoggedInUser();
return useQuery(
accountKeys.usage(user?.address as string),
async () => {
return useQuery({
queryKey: accountKeys.usage(user?.address as string),
queryFn: async () => {
const res = await fetch(`${THIRDWEB_API_HOST}/v1/account/usage`, {
method: "GET",
headers: {
@@ -314,16 +313,16 @@ export function useAccountUsage() {
return json.data as UsageBillableByService;
},
{ enabled: !!user?.address && isLoggedIn },
);
enabled: !!user?.address && isLoggedIn,
});
}
export function useAccountCredits() {
const { user, isLoggedIn } = useLoggedInUser();
return useQuery(
accountKeys.credits(user?.address as string),
async () => {
return useQuery({
queryKey: accountKeys.credits(user?.address as string),
queryFn: async () => {
const res = await fetch(`${THIRDWEB_API_HOST}/v1/account/credits`, {
method: "GET",
@@ -340,22 +339,25 @@ export function useAccountCredits() {
const credits = (json.data as BillingCredit[]).filter(
(credit) =>
credit.remainingValueUsdCents > 0 &&
credit.expiresAt > new Date().toISOString() &&
(!credit.expiresAt || credit.expiresAt > new Date().toISOString()) &&
credit.isActive,
);
return credits;
},
{ enabled: !!user?.address && isLoggedIn },
);
enabled: !!user?.address && isLoggedIn,
});
}
export function useWalletStats(clientId: string | undefined) {
const { user, isLoggedIn } = useLoggedInUser();
return useQuery(
accountKeys.walletStats(user?.address as string, clientId as string),
async () => {
return useQuery({
queryKey: accountKeys.walletStats(
user?.address as string,
clientId as string,
),
queryFn: async () => {
const res = await fetch(
`${THIRDWEB_API_HOST}/v1/account/wallets?clientId=${clientId}`,
{
@@ -374,8 +376,8 @@ export function useWalletStats(clientId: string | undefined) {
return json.data as WalletStats;
},
{ enabled: !!clientId && !!user?.address && isLoggedIn },
);
enabled: !!clientId && !!user?.address && isLoggedIn,
});
}
export function useUpdateAccount() {
@@ -494,9 +496,9 @@ export function useUpdateNotifications() {
export function useCreateBillingSession(enabled = false) {
const { user } = useLoggedInUser();
return useQuery(
accountKeys.billingSession(user?.address as string),
async () => {
return useQuery({
queryKey: accountKeys.billingSession(user?.address as string),
queryFn: async () => {
invariant(user?.address, "walletAddress is required");
const res = await fetch(
@@ -517,8 +519,8 @@ export function useCreateBillingSession(enabled = false) {
return json.data;
},
{ enabled },
);
enabled,
});
}
export function useConfirmEmail() {
@@ -636,9 +638,9 @@ export function useCreatePaymentMethod() {
export function useApiKeys() {
const { user, isLoggedIn } = useLoggedInUser();
return useQuery(
apiKeys.keys(user?.address as string),
async () => {
return useQuery({
queryKey: apiKeys.keys(user?.address as string),
queryFn: async () => {
const res = await fetch(`${THIRDWEB_API_HOST}/v1/keys`, {
method: "GET",
@@ -653,8 +655,8 @@ export function useApiKeys() {
}
return json.data as ApiKey[];
},
{ enabled: !!user?.address && isLoggedIn },
);
enabled: !!user?.address && isLoggedIn,
});
}
export function useCreateApiKey() {
@@ -884,9 +886,9 @@ export function useRevokeAuthorizedWallet() {
export function useAuthorizedWallets() {
const { user, isLoggedIn } = useLoggedInUser();
return useQuery(
authorizedWallets.authorizedWallets(user?.address as string),
async () => {
return useQuery({
queryKey: authorizedWallets.authorizedWallets(user?.address as string),
queryFn: async () => {
const res = await fetch(`${THIRDWEB_API_HOST}/v1/authorized-wallets`, {
method: "GET",
@@ -902,8 +904,9 @@ export function useAuthorizedWallets() {
return json.data as AuthorizedWallet[];
},
{ enabled: !!user?.address && isLoggedIn, cacheTime: 0 },
);
enabled: !!user?.address && isLoggedIn,
cacheTime: 0,
});
}
/**
@@ -923,7 +926,10 @@ export async function fetchChainsFromApi() {
}
export function useApiChains() {
return useQuery(["all-chains"], async () => {
return fetchChainsFromApi();
return useQuery({
queryKey: ["all-chains"],
queryFn: () => {
return fetchChainsFromApi();
},
});
}
@@ -12,9 +12,9 @@ import { getContractMetadata, name, symbol } from "thirdweb/extensions/common";
* 2. our API endpoint
*/
export function useDashboardContractMetadata(contract: ThirdwebContract) {
return useQuery(
["contract-metadata-header", contract.chain.id, contract.address],
async () => {
return useQuery({
queryKey: ["contract-metadata-header", contract.chain.id, contract.address],
queryFn: async () => {
const [contractMetadata, _name, _symbol, compilerMetadata] =
await Promise.all([
getContractMetadata({ contract }).catch(() => ({
@@ -50,5 +50,5 @@ export function useDashboardContractMetadata(contract: ThirdwebContract) {
contractType: compilerMetadata?.name || "",
};
},
);
});
}
@@ -25,12 +25,12 @@ export type EmbeddedWalletUser = {
export function useEmbeddedWallets(clientId: string) {
const { user, isLoggedIn } = useLoggedInUser();
return useQuery(
embeddedWalletsKeys.embeddedWallets(
return useQuery({
queryKey: embeddedWalletsKeys.embeddedWallets(
user?.address as string,
clientId as string,
),
async () => {
queryFn: async () => {
const res = await fetch(
`${THIRDWEB_EWS_API_HOST}/api/thirdweb/embedded-wallet?clientId=${clientId}&lastAccessedAt=0`,
{
@@ -46,6 +46,6 @@ export function useEmbeddedWallets(clientId: string) {
return json.walletUsers as EmbeddedWalletUser[];
},
{ enabled: !!user?.address && isLoggedIn && !!clientId },
);
enabled: !!user?.address && isLoggedIn && !!clientId,
});
}
@@ -55,9 +55,9 @@ const getEngineRequestHeaders = (token: string | null): HeadersInit => {
export function useEngineInstances() {
const { user, isLoggedIn } = useLoggedInUser();
return useQuery(
engineKeys.instances(user?.address as string),
async (): Promise<EngineInstance[]> => {
return useQuery({
queryKey: engineKeys.instances(user?.address as string),
queryFn: async (): Promise<EngineInstance[]> => {
const res = await fetch(`${THIRDWEB_API_HOST}/v1/engine`, {
method: "GET",
});
@@ -79,8 +79,8 @@ export function useEngineInstances() {
};
});
},
{ enabled: !!user?.address && isLoggedIn },
);
enabled: !!user?.address && isLoggedIn,
});
}
// GET Requests
@@ -100,9 +100,9 @@ export type BackendWallet = {
export function useEngineBackendWallets(instance: string) {
const token = useLoggedInUser().user?.jwt ?? null;
return useQuery(
[engineKeys.backendWallets(instance)],
async () => {
return useQuery({
queryKey: [engineKeys.backendWallets(instance)],
queryFn: async () => {
const res = await fetch(`${instance}backend-wallet/get-all?limit=50`, {
method: "GET",
headers: getEngineRequestHeaders(token),
@@ -112,8 +112,8 @@ export function useEngineBackendWallets(instance: string) {
return (json.result as BackendWallet[]) || [];
},
{ enabled: !!instance && !!token },
);
enabled: !!instance && !!token,
});
}
export interface EngineSystemHealth {
@@ -382,9 +382,9 @@ type TransactionResponse = {
export function useEngineTransactions(instance: string, autoUpdate: boolean) {
const token = useLoggedInUser().user?.jwt ?? null;
return useQuery(
engineKeys.transactions(instance),
async () => {
return useQuery({
queryKey: engineKeys.transactions(instance),
queryFn: async () => {
const res = await fetch(`${instance}transaction/get-all`, {
method: "GET",
headers: getEngineRequestHeaders(token),
@@ -394,11 +394,10 @@ export function useEngineTransactions(instance: string, autoUpdate: boolean) {
return (json.result as TransactionResponse) || {};
},
{
enabled: !!instance && !!token,
refetchInterval: autoUpdate ? 4_000 : false,
},
);
enabled: !!instance && !!token,
refetchInterval: autoUpdate ? 4_000 : false,
});
}
type WalletConfig =
@@ -423,9 +422,9 @@ type WalletConfig =
export function useEngineWalletConfig(instance: string) {
const token = useLoggedInUser().user?.jwt ?? null;
return useQuery(
engineKeys.walletConfig(instance),
async () => {
return useQuery({
queryKey: engineKeys.walletConfig(instance),
queryFn: async () => {
const res = await fetch(`${instance}configuration/wallets`, {
method: "GET",
headers: getEngineRequestHeaders(token),
@@ -435,8 +434,8 @@ export function useEngineWalletConfig(instance: string) {
return (json.result as WalletConfig) || {};
},
{ enabled: !!instance && !!token },
);
enabled: !!instance && !!token,
});
}
type CurrencyValue = {
@@ -456,9 +455,9 @@ export function useEngineBackendWalletBalance(
invariant(chainId, "chainId is required");
return useQuery(
engineKeys.backendWalletBalance(address, chainId),
async () => {
return useQuery({
queryKey: engineKeys.backendWalletBalance(address, chainId),
queryFn: async () => {
const res = await fetch(
`${instance}backend-wallet/${chainId}/${address}/get-balance`,
{
@@ -471,8 +470,8 @@ export function useEngineBackendWalletBalance(
return (json.result as CurrencyValue) || {};
},
{ enabled: !!instance && !!address && !!chainId && !!token },
);
enabled: !!instance && !!address && !!chainId && !!token,
});
}
export type EngineAdmin = {
@@ -485,9 +484,9 @@ export function useEnginePermissions(instance: string) {
const token = useLoggedInUser().user?.jwt ?? null;
const address = useActiveAccount()?.address;
return useQuery(
engineKeys.permissions(instance),
async () => {
return useQuery({
queryKey: engineKeys.permissions(instance),
queryFn: async () => {
const res = await fetch(`${instance}auth/permissions/get-all`, {
method: "GET",
headers: getEngineRequestHeaders(token),
@@ -501,10 +500,9 @@ export function useEnginePermissions(instance: string) {
return (json.result as EngineAdmin[]) || [];
},
{
enabled: !!instance && !!token && !!address,
},
);
enabled: !!instance && !!token && !!address,
});
}
export type AccessToken = {
@@ -519,9 +517,9 @@ export type AccessToken = {
export function useEngineAccessTokens(instance: string) {
const token = useLoggedInUser().user?.jwt ?? null;
return useQuery(
engineKeys.accessTokens(instance),
async () => {
return useQuery({
queryKey: engineKeys.accessTokens(instance),
queryFn: async () => {
const res = await fetch(`${instance}auth/access-tokens/get-all`, {
method: "GET",
headers: getEngineRequestHeaders(token),
@@ -531,8 +529,8 @@ export function useEngineAccessTokens(instance: string) {
return (json.result as AccessToken[]) || [];
},
{ enabled: !!instance && !!token },
);
enabled: !!instance && !!token,
});
}
export type KeypairAlgorithm = "ES256" | "RS256" | "PS256";
@@ -549,9 +547,9 @@ export type Keypair = {
export function useEngineKeypairs(instance: string) {
const token = useLoggedInUser().user?.jwt ?? null;
return useQuery(
engineKeys.keypairs(instance),
async () => {
return useQuery({
queryKey: engineKeys.keypairs(instance),
queryFn: async () => {
const res = await fetch(`${instance}auth/keypair/get-all`, {
method: "GET",
headers: getEngineRequestHeaders(token),
@@ -561,8 +559,8 @@ export function useEngineKeypairs(instance: string) {
return (json.result as Keypair[]) || [];
},
{ enabled: !!instance && !!token },
);
enabled: !!instance && !!token,
});
}
type AddKeypairInput = {
@@ -645,9 +643,9 @@ export type EngineRelayer = {
export function useEngineRelayer(instance: string) {
const token = useLoggedInUser().user?.jwt ?? null;
return useQuery(
engineKeys.relayers(instance),
async () => {
return useQuery({
queryKey: engineKeys.relayers(instance),
queryFn: async () => {
const res = await fetch(`${instance}relayer/get-all`, {
method: "GET",
headers: getEngineRequestHeaders(token),
@@ -657,8 +655,8 @@ export function useEngineRelayer(instance: string) {
return (json.result as EngineRelayer[]) || [];
},
{ enabled: !!instance && !!token },
);
enabled: !!instance && !!token,
});
}
export type CreateRelayerInput = {
@@ -782,9 +780,9 @@ export interface EngineWebhook {
export function useEngineWebhooks(instance: string) {
const token = useLoggedInUser().user?.jwt ?? null;
return useQuery(
engineKeys.webhooks(instance),
async () => {
return useQuery({
queryKey: engineKeys.webhooks(instance),
queryFn: async () => {
const res = await fetch(`${instance}webhooks/get-all`, {
method: "GET",
headers: getEngineRequestHeaders(token),
@@ -794,8 +792,8 @@ export function useEngineWebhooks(instance: string) {
return (json.result as EngineWebhook[]) || [];
},
{ enabled: !!instance && !!token },
);
enabled: !!instance && !!token,
});
}
// POST REQUESTS
@@ -1241,9 +1239,9 @@ export function useEngineSendTokens(instance: string) {
export function useEngineCorsConfiguration(instance: string) {
const token = useLoggedInUser().user?.jwt ?? null;
return useQuery(
engineKeys.corsUrls(instance),
async () => {
return useQuery({
queryKey: engineKeys.corsUrls(instance),
queryFn: async () => {
const res = await fetch(`${instance}configuration/cors`, {
method: "GET",
headers: getEngineRequestHeaders(token),
@@ -1253,8 +1251,8 @@ export function useEngineCorsConfiguration(instance: string) {
return (json.result as string[]) || [];
},
{ enabled: !!instance && !!token },
);
enabled: !!instance && !!token,
});
}
interface SetCorsUrlInput {
@@ -1297,9 +1295,9 @@ export function useEngineIpAllowlistConfiguration(instance: string) {
// if engine instance is not updated to have IP_ALLOWLIST
const { data: health } = useEngineSystemHealth(instance);
return useQuery(
engineKeys.ipAllowlist(instance),
async () => {
return useQuery({
queryKey: engineKeys.ipAllowlist(instance),
queryFn: async () => {
const res = await fetch(`${instance}configuration/ip-allowlist`, {
method: "GET",
headers: getEngineRequestHeaders(token),
@@ -1308,11 +1306,10 @@ export function useEngineIpAllowlistConfiguration(instance: string) {
const json = await res.json();
return (json.result as string[]) || [];
},
{
enabled:
!!instance && !!token && health?.features?.includes("IP_ALLOWLIST"),
},
);
enabled:
!!instance && !!token && health?.features?.includes("IP_ALLOWLIST"),
});
}
interface SetIpAllowlistInput {
@@ -1365,9 +1362,9 @@ export interface EngineContractSubscription {
export function useEngineContractSubscription(instance: string) {
const token = useLoggedInUser().user?.jwt ?? null;
return useQuery(
engineKeys.contractSubscriptions(instance),
async () => {
return useQuery({
queryKey: engineKeys.contractSubscriptions(instance),
queryFn: async () => {
const res = await fetch(`${instance}contract-subscriptions/get-all`, {
method: "GET",
headers: getEngineRequestHeaders(token),
@@ -1376,10 +1373,9 @@ export function useEngineContractSubscription(instance: string) {
const json = await res.json();
return json.result as EngineContractSubscription[];
},
{
enabled: !!instance && !!token,
},
);
enabled: !!instance && !!token,
});
}
export interface AddContractSubscriptionInput {
@@ -1465,9 +1461,9 @@ export function useEngineSubscriptionsLastBlock(
) {
const token = useLoggedInUser().user?.jwt ?? null;
return useQuery(
engineKeys.contractSubscriptionsLastBlock(instanceUrl, chainId),
async () => {
return useQuery({
queryKey: engineKeys.contractSubscriptionsLastBlock(instanceUrl, chainId),
queryFn: async () => {
const response = await fetch(
`${instanceUrl}contract-subscriptions/last-block?chain=${chainId}`,
{
@@ -1479,11 +1475,10 @@ export function useEngineSubscriptionsLastBlock(
const json = await response.json();
return json.result.lastBlock as number;
},
{
enabled: !!instanceUrl && !!token,
refetchInterval: autoUpdate ? 5_000 : false,
},
);
enabled: !!instanceUrl && !!token,
refetchInterval: autoUpdate ? 5_000 : false,
});
}
export interface EngineResourceMetrics {
@@ -1500,9 +1495,9 @@ export interface EngineResourceMetrics {
export function useEngineSystemMetrics(engineId: string) {
const [enabled, setEnabled] = useState(true);
return useQuery(
engineKeys.systemMetrics(engineId),
async () => {
return useQuery({
queryKey: engineKeys.systemMetrics(engineId),
queryFn: async () => {
const res = await fetch(
`${THIRDWEB_API_HOST}/v1/engine/${engineId}/metrics`,
);
@@ -1513,10 +1508,9 @@ export function useEngineSystemMetrics(engineId: string) {
const json = (await res.json()) as EngineResourceMetrics;
return json;
},
{
// Poll every 5s unless disabled.
enabled,
refetchInterval: 5_000,
},
);
// Poll every 5s unless disabled.
enabled,
refetchInterval: 5_000,
});
}
@@ -1,5 +1,5 @@
import { useSupportedChains } from "@thirdweb-dev/react";
import { useFavouriteChainIds } from "app/(dashboard)/(chain)/components/client/star-button";
import { useSupportedChains } from "hooks/chains/configureChains";
import { useMemo } from "react";
import type { ChainMetadata } from "thirdweb/chains";
@@ -1,16 +0,0 @@
import { useQuery } from "@tanstack/react-query";
export type GasEstimate = { gasPrice: number; ethPrice: number };
export function useGas() {
return useQuery(
["gas-price", "ethereum"],
async () => {
const res = await fetch("/api/gas");
return res.json() as Promise<GasEstimate>;
},
{
refetchInterval: 60_000,
},
);
}
@@ -16,9 +16,9 @@ import { useActiveAccount } from "thirdweb/react";
import invariant from "tiny-invariant";
function useMultiChainRegContractList(walletAddress?: string) {
return useQuery(
["dashboard-registry", walletAddress, "multichain-contract-list"],
async () => {
return useQuery({
queryKey: ["dashboard-registry", walletAddress, "multichain-contract-list"],
queryFn: async () => {
invariant(walletAddress, "walletAddress is required");
const contracts = await getAllMultichainRegistry({
contract: MULTICHAIN_REGISTRY_CONTRACT,
@@ -27,10 +27,9 @@ function useMultiChainRegContractList(walletAddress?: string) {
return contracts;
},
{
enabled: !!walletAddress,
},
);
enabled: !!walletAddress,
});
}
interface Options {
@@ -1,24 +1,17 @@
import type { WalletNFTApiReturn } from "pages/api/wallet/nfts/[chainId]";
import { useActiveAccount } from "thirdweb/react";
import { useQueryWithNetwork } from "./query/useQueryWithNetwork";
import { useDashboardEVMChainId } from "./useActiveChainId";
export function useWalletNFTs(walletAddress?: string) {
const activeChainId = useDashboardEVMChainId();
const connectedAddress = useActiveAccount()?.address;
const address = walletAddress || connectedAddress;
export function useWalletNFTs(walletAddress?: string, chainId?: number) {
return useQueryWithNetwork(
["walletNfts", address],
["walletNfts", walletAddress],
async () => {
const response = await fetch(
`/api/wallet/nfts/${activeChainId}?owner=${address}`,
`/api/wallet/nfts/${chainId}?owner=${walletAddress}`,
);
return (await response.json()) as WalletNFTApiReturn;
},
{
enabled: !!address && !!activeChainId,
enabled: !!walletAddress && !!chainId,
},
);
}
@@ -120,7 +120,7 @@ export function FaucetButton({
// loading state
if (faucetWalletBalanceQuery.isLoading || canClaimFaucetQuery.isLoading) {
return (
<Button variant="secondary" className="w-full gap-2">
<Button variant="outline" className="w-full gap-2">
Checking Faucet <Spinner className="size-3" />
</Button>
);
@@ -129,7 +129,7 @@ export function FaucetButton({
// faucet is empty
if (isFaucetEmpty) {
return (
<Button variant="secondary" disabled className="w-full !opacity-100 ">
<Button variant="outline" disabled className="w-full !opacity-100 ">
Faucet is empty right now
</Button>
);
@@ -138,7 +138,7 @@ export function FaucetButton({
// Can not claim
if (canClaimFaucetQuery.data && canClaimFaucetQuery.data.canClaim === false) {
return (
<Button variant="secondary" className="w-full !opacity-100 " disabled>
<Button variant="outline" className="w-full !opacity-100 " disabled>
{canClaimFaucetQuery.data.type === "throttle" && (
<>
Your next claim is available{" "}
@@ -185,7 +185,7 @@ export function FaucetButton({
</Button>
{faucetWalletBalanceQuery.data && (
<p className="mt-3 text-xs text-secondary-foreground">
<p className="mt-3 text-xs text-muted-foreground">
{Number(faucetWalletBalanceQuery.data.displayValue).toFixed(3)}{" "}
{faucetWalletBalanceQuery.data.symbol} left in the faucet
</p>
@@ -12,7 +12,7 @@ export function BuyFundsSection(props: { chain: ChainMetadata }) {
return (
<section>
<SectionTitle title="Buy Funds" />
<div className="border border-border px-4 py-10 rounded-lg flex justify-center">
<div className="border border-border px-4 py-10 rounded-lg flex justify-center bg-muted/30">
<div className="max-w-[520px] flex flex-col items-center ">
<div className="flex items-center">
<ChainIcon
@@ -33,7 +33,7 @@ export function BuyFundsSection(props: { chain: ChainMetadata }) {
<div className="h-2" />
<p className="text-secondary-foreground text-sm max-w-[520px] text-center px-4">
<p className="text-muted-foreground text-sm max-w-[520px] text-center px-4">
Instantly onramp, bridge & swap into {sanitizedChainName} with any
token.
</p>
@@ -49,7 +49,7 @@ export function BuyFundsSection(props: { chain: ChainMetadata }) {
<Link
href="https://portal.thirdweb.com/connect/pay/overview"
className="inline-flex gap-1.5 items-center text-sm text-secondary-foreground hover:text-foreground"
className="inline-flex gap-1.5 items-center text-sm text-muted-foreground hover:text-foreground"
>
Learn more about thirdweb Pay{" "}
<ExternalLinkIcon className="size-3" />
@@ -11,7 +11,7 @@ export function ChainOverviewSection(props: { chain: ChainMetadata }) {
return (
<section>
<SectionTitle title="Chain Overview" />
<div className="grid grid-cols-1 gap-6 lg:gap-8 md:grid-cols-2 lg:grid-cols-3 border rounded-lg p-4 md:p-6">
<div className="grid grid-cols-1 gap-6 lg:gap-8 md:grid-cols-2 lg:grid-cols-3 border rounded-lg p-4 md:p-6 bg-muted/50">
{/* Info */}
{chain.infoURL && (
<PrimaryInfoItem title="Info">
@@ -7,9 +7,9 @@ export function ClaimChainSection() {
return (
<section>
<SectionTitle title="Claim Chain" />
<div className="border p-4 rounded-lg">
<div className="border p-4 rounded-lg bg-muted/50">
<p className="mb-1"> This chain page is unclaimed </p>
<p className="text-secondary-foreground text-sm mb-5">
<p className="text-muted-foreground text-sm mb-5">
Are you the owner of this ecosystem? Claim this page to add additional
information on this page to help your developers get started!
</p>
@@ -17,7 +17,7 @@ export function ClaimChainSection() {
<Button variant="outline" asChild>
<Link
className="gap-2"
href="https://share.hsforms.com/1o01TyfsZRAao2eCrzuXSVgea58c"
href="https://share.hsforms.com/1qAViW3U5SoKbabNhRZy4Kgea58c"
target="_blank"
>
<span>Claim Chain</span>
@@ -15,7 +15,7 @@ export async function FaucetSection(props: { chain: ChainMetadata }) {
return (
<section>
<SectionTitle title="Faucet" />
<div className="border border-border px-4 py-10 rounded-lg flex justify-center">
<div className="border border-border px-4 py-10 rounded-lg flex justify-center bg-muted/50">
<div className="max-w-[520px] w-full flex flex-col items-center ">
<div className="flex items-center">
<ChainIcon
@@ -33,7 +33,7 @@ export async function FaucetSection(props: { chain: ChainMetadata }) {
<div className="h-2" />
<p className="text-secondary-foreground text-sm max-w-[520px] text-center px-4">
<p className="text-muted-foreground text-sm max-w-[520px] text-center px-4">
Get free {chain.nativeCurrency.symbol} fast and reliably.{" "}
{amountToGive} {chain.nativeCurrency.symbol}/day.
</p>
@@ -25,7 +25,7 @@ export function SupportedProductsSection(props: {
return (
<div
key={product.id}
className="border rounded-lg p-4 flex gap-3 relative hover:bg-secondary transition-colors duration-300 pr-8"
className="border rounded-lg p-4 flex gap-3 relative hover:bg-muted bg-muted/50 transition-colors duration-300 pr-8"
>
<CircleCheckIcon className="size-5 text-success-text absolute top-4 right-4" />
<product.icon className="size-5 shrink-0 mt-0.5" />
@@ -40,7 +40,7 @@ export function SupportedProductsSection(props: {
{product.name}{" "}
</Link>
</h3>
<p className="text-sm text-secondary-foreground">
<p className="text-sm text-muted-foreground">
{product.description}
</p>
</div>
@@ -1,5 +1,6 @@
import { AspectRatio } from "@/components/ui/aspect-ratio";
import { Button } from "@/components/ui/button";
import { cn } from "@/lib/utils";
import Link from "next/link";
import type { ChainMetadata } from "thirdweb/chains";
import { mapV4ChainToV5Chain } from "../../../../../../../contexts/map-chains";
@@ -22,7 +23,7 @@ export function ChainHeader(props: ChainHeaderProps) {
<AspectRatio
ratio={props.headerImageUrl ? 4 : 8}
className="border-b border-border -mx-4 lg:-mx-6"
className="border-b border-border max-sm:-mx-4"
>
{props.headerImageUrl && (
// eslint-disable-next-line @next/next/no-img-element
@@ -40,7 +41,10 @@ export function ChainHeader(props: ChainHeaderProps) {
<ChainIcon
iconUrl={props.logoUrl}
className="p-2 lg:p-4 absolute top-0 left-0 size-20 lg:size-36 rounded-full bg-background -translate-y-[50%] overflow-hidden border border-border"
className={cn(
"p-2 lg:p-4 absolute top-0 left-0 size-20 lg:size-36 rounded-full -translate-y-[50%] overflow-hidden border border-border bg-muted",
props.headerImageUrl && "lg:left-4",
)}
/>
{/* action group */}
@@ -54,7 +58,7 @@ export function ChainHeader(props: ChainHeaderProps) {
mapV4ChainToV5Chain(props.chain)
}
/>
<Button variant="primary" asChild>
<Button variant="default" asChild>
<Link href="https://thirdweb.com/dashboard" target="_blank">
Get started with thirdweb
</Link>
@@ -23,7 +23,7 @@ export function ChainCTA(props: ChainCTAProps) {
{props.title}
</h2>
{props.description && (
<p className="max-w-[600px] text-secondary-foreground leading-relaxed text-sm md:text-base">
<p className="max-w-[600px] text-muted-foreground leading-relaxed text-sm md:text-base">
{props.description}
</p>
)}
@@ -14,7 +14,7 @@ export function ExplorersSection(props: {
return (
<div
key={explorer.url}
className="p-4 border rounded-xl relative hover:bg-secondary"
className="p-4 border rounded-xl relative hover:bg-muted bg-muted/50"
>
<ExternalLinkIcon className="size-4 absolute top-4 right-4 text-muted-foreground" />
<h3 className="mb-1 text-base font-semibold capitalize">
@@ -1,7 +1,7 @@
import { BurgerMenuButton } from "@/components/blocks/BurgerMenuButton";
import { MobileSidebar } from "@/components/blocks/MobileSidebar";
import { Sidebar } from "@/components/blocks/Sidebar";
import { Button } from "@/components/ui/button";
import { ArrowLeftIcon, TicketCheckIcon } from "lucide-react";
import { ArrowLeftIcon, MenuIcon, TicketCheckIcon } from "lucide-react";
import type { Metadata } from "next";
import Link from "next/link";
import { redirect } from "next/navigation";
@@ -50,6 +50,7 @@ export default async function ChainPageLayout({
{
href: `/${chain.slug}`,
label: "Overview",
exactMatch: true,
},
{
href: `/${chain.slug}/popular`,
@@ -64,11 +65,11 @@ export default async function ChainPageLayout({
<div className="flex items-center gap-1.5 mb-5 flex-wrap">
<Link
href="/chainlist"
className="text-secondary-foreground hover:text-foreground text-sm"
className="text-muted-foreground hover:text-foreground text-sm"
>
Chainlist
</Link>
<span className="text-secondary-foreground text-sm"> / </span>
<span className="text-muted-foreground text-sm"> / </span>
<Link href={`/${chain.slug}`} className="text-foreground text-sm">
{chain.name.replace("Mainnet", "")}
</Link>
@@ -77,7 +78,7 @@ export default async function ChainPageLayout({
links={sidebarLinks}
/>
<div className="flex flex-col w-full lg:px-6 lg:border-x pb-10">
<div className="flex flex-col w-full pb-10">
{/* Icon + Background */}
<ChainHeader
headerImageUrl={chainMetadata?.headerImgUrl}
@@ -86,13 +87,18 @@ export default async function ChainPageLayout({
/>
<div className="flex lg:hidden justify-end">
<BurgerMenuButton
<MobileSidebar
links={sidebarLinks}
trigger={
<Button size="icon" variant="outline">
<MenuIcon strokeWidth={1} />
</Button>
}
footer={
<div className="mt-5 border-t pt-6 pb-2">
<Link
href="/chainlist"
className="px-2 text-sm flex justify-start gap-2 items-center text-secondary-foreground hover:text-foreground"
className="px-2 text-sm flex justify-start gap-2 items-center text-muted-foreground hover:text-foreground"
>
<ArrowLeftIcon className="size-4" />
View all chains
@@ -135,7 +141,7 @@ export default async function ChainPageLayout({
{/* description */}
{chainMetadata?.about && (
<p className="text-secondary-foreground text-sm lg:text-base mb-2">
<p className="text-muted-foreground text-sm lg:text-base mb-2">
{chainMetadata.about}
</p>
)}
@@ -25,7 +25,7 @@ export default async function Page(props: {
Popular Contracts
</h2>
<p className="text-sm text-secondary-foreground">
<p className="text-sm text-muted-foreground">
Explore contracts on Ethereum and sort them by your preferred metrics
</p>
@@ -41,7 +41,7 @@ export default async function Page(props: {
)}
{topContracts.length === 0 && (
<div className="text-secondary-foreground text-lg flex border rounded-lg h-[200px] border-border items-center justify-center">
<div className="text-muted-foreground text-lg flex border rounded-lg h-[200px] border-border items-center justify-center">
<div className="flex items-center gap-2">
<CircleAlertIcon className="size-5 text-destructive-text" />
No contracts found
@@ -155,7 +155,7 @@ export default async function Page(props: {
<div className="grid grid-cols-2 items-start">
<div className="flex gap-x-2 items-center">Raw Input:</div>
<div className="bg-secondary p-4 rounded-lg break-words text-sm">
<div className="bg-muted/50 p-4 rounded-lg break-words text-sm">
{transaction.input}
</div>
</div>
@@ -42,10 +42,10 @@ export const SearchInput: React.FC = () => {
return (
<div className="relative w-full">
<SearchIcon className="absolute size-5 top-[50%] -translate-y-1/2 left-4 text-muted-foreground" />
<SearchIcon className="absolute size-4 top-[50%] -translate-y-1/2 left-3 text-muted-foreground" />
<Input
placeholder="Search by name or chain ID"
className={"pl-12 h-10 py-2 text-base bg-secondary rounded-lg"}
className={"pl-9 h-10 py-2 rounded-lg"}
defaultValue={searchParams?.get("query") || ""}
onChange={(e) => handleSearch(e.target.value)}
ref={inputRef}
@@ -31,7 +31,7 @@ export async function ChainListCard({
return (
<div className="relative h-full">
<Card className="w-full h-full hover:bg-muted">
<Card className="w-full h-full bg-muted/50 hover:bg-muted">
<CardHeader className="flex flex-row items-center justify-between p-4">
<div className="flex flex-row items-center gap-2">
<ChainIcon iconUrl={iconUrl} className="size-6" />
@@ -51,7 +51,7 @@ export async function ChainListCard({
<table className="w-full">
<tbody className="[&_td>*]:min-h-[25px] text-sm">
<tr>
<th className="font-normal text-left text-secondary-foreground">
<th className="font-normal text-left text-muted-foreground">
Chain ID
</th>
<td className="text-right">
@@ -66,7 +66,7 @@ export async function ChainListCard({
</td>
</tr>
<tr>
<th className="font-normal text-left text-secondary-foreground">
<th className="font-normal text-left text-muted-foreground">
Native Token
</th>
<td className="text-right">
@@ -76,7 +76,7 @@ export async function ChainListCard({
</td>
</tr>
<tr>
<th className="font-normal text-left text-secondary-foreground">
<th className="font-normal text-left text-muted-foreground">
Available Services
</th>
@@ -36,7 +36,7 @@ export async function ChainListRow({
}: ChainListRowProps) {
const chainMetadata = await getChainMetadata(chainId);
return (
<tr className="border-b relative hover:bg-secondary">
<tr className="border-b relative hover:bg-muted/50">
<TableData>{favoriteButton}</TableData>
{/* Name */}
<TableData>
@@ -296,7 +296,7 @@ async function ChainsData(props: {
<ChainlistPagination totalPages={totalPages} activePage={activePage} />
)}
<div className="h-4" />
<p className="text-sm text-center text-secondary-foreground text-balance">
<p className="text-sm text-center text-muted-foreground text-balance">
Showing{" "}
<span className="text-accent-foreground">{paginatedChains.length}</span>{" "}
out of{" "}
Binary file not shown.

After

Width:  |  Height:  |  Size: 226 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 226 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 164 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 276 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 389 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

@@ -7,6 +7,9 @@ import zeroGBanner from "./temp-assets/0gLabsBanner.png";
import alephZeroBaner from "./temp-assets/AlephZeroBanner.jpg";
import alephZeroCTA from "./temp-assets/AlephZeroCTA.jpg";
import ancient8Banner from "./temp-assets/ancient8-banner.png";
import assetChainBanner from "./temp-assets/assetChainBanner.png";
import assetChainCTABG from "./temp-assets/assetChainCTABanner.png";
// TEMPORARY
import baseBanner from "./temp-assets/base-banner.jpeg";
import superchainCTABG from "./temp-assets/cta-bg-superchain.png";
@@ -14,11 +17,12 @@ import xaiCTABg from "./temp-assets/cta-bg-xai-connect.png";
import thirdwebCTA from "./temp-assets/cta-thirdweb.png";
import lumiaCTA from "./temp-assets/lumia-cta.png";
import lumiaBanner from "./temp-assets/lumiaBanner.png";
import mantleBanner from "./temp-assets/mantle-banner.jpeg";
import mantleBanner from "./temp-assets/mantle.png";
import plumeBanner from "./temp-assets/plumeBanner.png";
import plumeCTA from "./temp-assets/plumeCTA.png";
import rootStockBanner from "./temp-assets/rootstock-banner.png";
import rootStockCTABG from "./temp-assets/rootstock-cta.png";
import soneiumBanner from "./temp-assets/soneiumBanner.png";
import superpositionBanner from "./temp-assets/superpositionBanner.png";
import superpositionCTA from "./temp-assets/superpositionCTA.png";
import thirdwebBanner from "./temp-assets/thirdweb-banner.png";
@@ -27,6 +31,8 @@ import treasureCTA from "./temp-assets/treasureCta.png";
import vanarBanner from "./temp-assets/vanar-banner.png";
import vanarCTABG from "./temp-assets/vanar-cta.png";
import xaiBanner from "./temp-assets/xai-banner.jpg";
import zytronBanner from "./temp-assets/zytronBanner.png";
import zytronCTA from "./temp-assets/zytronCTA.jpg";
// END TEMPORARY
@@ -170,17 +176,14 @@ const chainMetaRecord = {
},
// mantle
5000: {
about:
"A fast-growing, DAO-led web3 ecosystem whose mission is the mass adoption of token-governed technologies. Mantle Ecosystem comprises Mantle Network, an Ethereum layer 2; Mantle Governance, Mantle Treasury and Mantle LSP.",
about: `Build dApps with exceptional UX, all while relying on Ethereum's unrivaled security, with our high-performance Ethereum layer-2 network built with modular architecture.`,
headerImgUrl: mantleBanner.src,
// TODO: waiting on CTA copy
// cta: {
// backgroundImageUrl: mantleCTA.src,
// title: "Title Goes Here",
// description: "Optional description goes here",
// buttonText: "Learn More",
// buttonLink: "https://www.mantle.xyz",
// },
cta: {
backgroundImageUrl: mantleBanner.src,
title: "Reach out to bring your brilliant ideas to life",
buttonText: "Learn More",
buttonLink: "https://x.com/0xMantleDevs",
},
},
// rootstock
30: {
@@ -362,6 +365,43 @@ const chainMetaRecord = {
buttonText: "Learn more",
},
},
//AssetChain
42421: {
headerImgUrl: assetChainBanner.src,
about:
"Asset Chain is the native blockchain for Xend Finance's Real-World Asset OAE (Onchain Asset Environment), with its consensus based on Fantom's Lachesis consensus mechanism.",
cta: {
backgroundImageUrl: assetChainCTABG.src,
title: "Start Building",
buttonLink: "https://docs.assetchain.org",
buttonText: "Learn more",
},
},
//zytron
9901: {
headerImgUrl: zytronBanner.src,
about:
"Discover Zytron - a highly customizable Layer 3 roll up stack, natively supporting Zypher’s blockchain abstraction layer for games. It is designed for production level gaming experiences, from autonomous worlds to TON-based hyper casual games.",
cta: {
backgroundImageUrl: zytronCTA.src,
title: "Unlock ZK Gaming with Zytron Layer3.",
buttonLink: "https://zytron.zypher.network/",
buttonText: "Learn more",
},
},
//Soneium
1946: {
headerImgUrl: soneiumBanner.src,
about:
"Soneium, an Ethereum layer-2 developed by Sony Block Solutions Labs. This versatile chain is a general-purpose blockchain platform that aims to evoke emotion, empower creativity, and meet diverse needs to go mainstream. Soneium will be simplifying blockchain experiences while empowering developers, creators, and communities. Built on accessibility, scalability, and efficiency, it aims to solve real-world problems across industries globally. Soneium will change the way we interact with the internet, opening up a world of innovative applications and unlimited potential for users worldwide.",
cta: {
backgroundImageUrl: soneiumBanner.src,
title: "Begin your journey with Soneium Spark",
buttonLink:
"https://soneium.org/en/blog/soneium-minato-testnet-is-live-along-with-soneium-spark-incubation-program/",
buttonText: "Learn more",
},
},
} satisfies Record<number, ExtraChainMetadata>;
// END TEMPORARY
@@ -9,9 +9,7 @@ export const SidebarSection: React.FC<SidebarSectionProps> = ({ section }) => {
return (
<div className="flex flex-col gap-2 h-7 relative">
{/* title element */}
<label className="text-sm text-secondary-foreground">
{section.title}
</label>
<label className="text-sm text-muted-foreground">{section.title}</label>
<nav>
<ul>
{section.items.map((item) => (
@@ -19,7 +17,7 @@ export const SidebarSection: React.FC<SidebarSectionProps> = ({ section }) => {
<NavLink
prefetch={false}
href={item.href}
className="pl-3 border-l-2 h-8 text-sm text-secondary-foreground flex items-center hover:text-accent-foreground hover:border-secondary-foreground"
className="pl-3 border-l-2 h-8 text-sm text-muted-foreground flex items-center hover:text-accent-foreground hover:border-foreground"
activeClassName="border-primary hover:border-primary text-accent-foreground font-semibold"
>
{item.title}
@@ -175,19 +175,18 @@ export function EcosystemHeader(props: { ecosystem: Ecosystem }) {
name: "Permissions",
href: `/dashboard/connect/ecosystem/${ecosystem.slug}/permissions`,
isActive: pathname?.endsWith("/permissions") || false, // pathname will almost never be null: https://nextjs.org/docs/app/api-reference/functions/use-pathname
isEnabled: true,
},
{
name: "Analytics (Coming Soon)",
href: "#",
isActive: false,
isEnabled: false,
isDisabled: true,
},
{
name: "Design (Coming Soon)",
href: "#",
isActive: false,
isEnabled: false,
isDisabled: true,
},
]}
/>
@@ -20,7 +20,10 @@ export function UpdatePartnerModal({
return (
<Dialog open={open} onOpenChange={setOpen}>
<DialogTrigger>{children}</DialogTrigger>
<DialogContent className="w-[90vw] sm:w-auto">
<DialogContent
className="w-[90vw] sm:w-auto z-[10001]"
dialogOverlayClassName="z-[10000]"
>
<DialogHeader>
<DialogTitle>Update {partner.name}</DialogTitle>
</DialogHeader>
@@ -29,7 +29,7 @@ export function PartnersTable({ ecosystem }: { ecosystem: Ecosystem }) {
return (
<table className="w-full">
<thead>
<tr className="border-b bg-muted">
<tr className="border-b bg-muted/50">
<TableHeading>Name</TableHeading>
<TableHeading className="hidden md:table-cell">Domains</TableHeading>
<TableHeading className="hidden md:table-cell">
@@ -85,7 +85,7 @@ function TableRow(props: {
return (
<tr
className={cn(
"relative border-b hover:bg-secondary",
"relative border-b hover:bg-muted/50",
isDeleting && "animate-pulse",
)}
>
@@ -8,7 +8,7 @@ export default function Page() {
<h2 className="text-4xl font-bold text-foreground">
Create an Ecosystem
</h2>
<p className="text-secondary-foreground">
<p className="text-muted-foreground">
Create wallets that work across every chain and every app.
</p>
</header>
@@ -62,7 +62,7 @@ export default async function Page() {
<h2 className="text-2xl font-bold sm:text-3xl text-foreground text-balance">
One wallet, a whole ecosystem of apps and games
</h2>
<p className="text-secondary-foreground">
<p className="text-muted-foreground">
With Ecosystem Wallets, your users can access their assets across
hundreds of apps and games within your ecosystem. You can control
which apps join your ecosystem and how their users interact with your
@@ -99,10 +99,10 @@ export default async function Page() {
>
<Card className="flex flex-col gap-3 p-6 md:p-8 md:px-10">
<div className="flex items-center gap-2">
<BookMarkedIcon className="size-5 text-secondary-foreground" />
<BookMarkedIcon className="size-5 text-muted-foreground" />
<h4 className="text-lg font-bold">Learn more</h4>
</div>
<p className="text-secondary-foreground text-md">
<p className="text-muted-foreground text-md">
Learn how to create and manage Ecosystem Wallets in our docs.
</p>
<div className="flex flex-row items-center gap-2 mt-4 transition-all group-hover:gap-3 group-hover:text-primary/80 text-primary text-md">
@@ -6,11 +6,6 @@ const SIDEBAR_SECTIONS = [
id: "connect",
title: "Connect",
items: [
{
id: "playground",
title: "Playground",
href: "/dashboard/connect/playground",
},
{
id: "analytics",
title: "Analytics",
@@ -36,6 +31,11 @@ const SIDEBAR_SECTIONS = [
title: "Pay",
href: "/dashboard/connect/pay",
},
{
id: "playground",
title: "Playground",
href: "https://playground.thirdweb.com/connect/sign-in/button",
},
],
},
] satisfies Array<SidebarNavSection>;
@@ -31,7 +31,22 @@ export function PayUI(props: {
return (
<>
<div className="flex flex-row w-full">
<div className="flex-col gap-4 flex lg:flex-row w-full relative">
<div className="max-sm:w-full lg:min-w-[200px] lg:absolute right-0 bottom-3 z-10">
<Select defaultValue={selectedKeyId} onValueChange={setSelectedKeyId}>
<SelectTrigger>
<SelectValue>{selectedKey?.name || selectedKeyId}</SelectValue>
</SelectTrigger>
<SelectContent>
{props.apiKeys.map((key) => (
<SelectItem key={key.key} value={key.key}>
{key.name}
</SelectItem>
))}
</SelectContent>
</Select>
</div>
<TabButtons
containerClassName="w-full"
tabs={[
@@ -55,28 +70,12 @@ export function PayUI(props: {
},
]}
/>
<div className="flex-shrink-0 flex-grow-0 relative md:min-w-[200px]">
<Select defaultValue={selectedKeyId} onValueChange={setSelectedKeyId}>
<SelectTrigger>
<SelectValue>{selectedKey?.name || selectedKeyId}</SelectValue>
</SelectTrigger>
<SelectContent>
{props.apiKeys.map((key) => (
<SelectItem key={key.key} value={key.key}>
{key.name}
</SelectItem>
))}
</SelectContent>
</Select>
<div className="absolute bottom-0 left-0 right-0 h-[1px] bg-border -translate-y-[2px]" />
</div>
</div>
{/* TODO: split this into sub-pages */}
{activeTab === "analytics" && <PayAnalytics apiKey={selectedKey} />}
{activeTab === "analytics" && <PayAnalytics clientId={selectedKey.key} />}
{activeTab === "settings" && <PayConfig apiKey={selectedKey} />}
{activeTab === "webhooks" && <WebhooksPage apiKey={selectedKey} />}
{activeTab === "webhooks" && <WebhooksPage clientId={selectedKey.key} />}
</>
);
}
@@ -1,6 +1,5 @@
import { CopyTextButton } from "@/components/ui/CopyTextButton";
import { Spinner } from "@/components/ui/Spinner/Spinner";
import { Badge } from "@/components/ui/badge";
import { Button } from "@/components/ui/button";
import {
Dialog,
@@ -36,7 +35,6 @@ import {
TableHeader,
TableRow,
} from "@/components/ui/table";
import type { ApiKey } from "@3rdweb-sdk/react/hooks/useApi";
import { zodResolver } from "@hookform/resolvers/zod";
import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
import { formatDistanceToNow } from "date-fns";
@@ -57,15 +55,15 @@ type Webhook = {
};
export type WebhooksPageProps = {
apiKey: ApiKey;
clientId: string;
};
export function WebhooksPage(props: WebhooksPageProps) {
const webhooksQuery = useQuery({
queryKey: ["webhooks", props.apiKey.key],
queryKey: ["webhooks", props.clientId],
queryFn: async () => {
const res = await fetch(
`/api/server-proxy/pay/webhooks/get-all?clientId=${props.apiKey.key}`,
`/api/server-proxy/pay/webhooks/get-all?clientId=${props.clientId}`,
{
headers: {
"Content-Type": "application/json",
@@ -85,7 +83,7 @@ export function WebhooksPage(props: WebhooksPageProps) {
return (
<div className="border border-border rounded-lg p-8 text-center flex flex-col items-center gap-8">
<h2 className="text-xl font-semibold">No webhooks configured yet.</h2>
<CreateWebhookButton apiKey={props.apiKey}>
<CreateWebhookButton clientId={props.clientId}>
<Button variant="primary" className="gap-1">
<PlusIcon className="size-4" />
<span>Create Webhook</span>
@@ -105,7 +103,7 @@ export function WebhooksPage(props: WebhooksPageProps) {
<TableHead>Secret</TableHead>
<TableHead>Created</TableHead>
<TableHead className="text-right">
<CreateWebhookButton apiKey={props.apiKey}>
<CreateWebhookButton clientId={props.clientId}>
<Button size="sm" variant="primary" className="gap-1">
<PlusIcon className="size-4" />
<span>Create New Webhook</span>
@@ -134,7 +132,7 @@ export function WebhooksPage(props: WebhooksPageProps) {
</TableCell>
<TableCell className="text-right">
<DeleteWebhookButton
apiKey={props.apiKey}
clientId={props.clientId}
webhookId={webhook.id}
>
<Button variant="ghost" size="icon">
@@ -172,19 +170,19 @@ function CreateWebhookButton(props: PropsWithChildren<WebhooksPageProps>) {
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({ ...values, clientId: props.apiKey.key }),
body: JSON.stringify({ ...values, clientId: props.clientId }),
});
const json = await res.json();
return json.result as string;
},
onSuccess: () => {
return queryClient.invalidateQueries(["webhooks", props.apiKey.key]);
return queryClient.invalidateQueries(["webhooks", props.clientId]);
},
});
return (
<Dialog open={open} onOpenChange={setOpen}>
<DialogTrigger asChild>{props.children}</DialogTrigger>
<DialogContent>
<DialogContent className="z-[10001]" dialogOverlayClassName="z-[10000]">
<Form {...form}>
<form
onSubmit={form.handleSubmit((values) =>
@@ -247,9 +245,7 @@ function CreateWebhookButton(props: PropsWithChildren<WebhooksPageProps>) {
{/* Note: this is a "fake" form field since there is nothing to select yet */}
<FormItem>
<FormLabel>
Event Type <Badge variant="outline">Coming Soon</Badge>
</FormLabel>
<FormLabel>Event Type</FormLabel>
<Select disabled defaultValue="purchase_complete">
<SelectTrigger className="w-full">
<SelectValue placeholder="Purchase Complete" />
@@ -290,13 +286,13 @@ function DeleteWebhookButton(
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({ id, clientId: props.apiKey.key }),
body: JSON.stringify({ id, clientId: props.clientId }),
});
const json = await res.json();
return json.result as string;
},
onSuccess: () => {
return queryClient.invalidateQueries(["webhooks", props.apiKey.key]);
return queryClient.invalidateQueries(["webhooks", props.clientId]);
},
});
return (
@@ -48,7 +48,7 @@ export default async function DashboardConnectPayPage() {
<div className="flex flex-col lg:flex-row gap-6 justify-between items-start">
<div className="max-w-[800px]">
<h1 className="text-5xl tracking-tight font-bold mb-5">Pay</h1>
<p className="text-secondary-foreground leading-7">
<p className="text-muted-foreground leading-7">
Pay allows your users to purchase cryptocurrencies and execute
transactions with their credit card or debit card, or with any token
via cross-chain routing.{" "}
@@ -4,7 +4,7 @@ import { DashboardHeader } from "app/components/Header/DashboardHeader";
export default function DashboardLayout(props: { children: React.ReactNode }) {
return (
<>
<div className="flex flex-col h-full">
<div className="flex flex-col h-full bg-background">
<DashboardHeader />
<main className="grow">{props.children}</main>
<AppFooter />
@@ -1,5 +1,15 @@
import { Separator } from "@/components/ui/separator";
import { cn } from "@/lib/utils";
import { CircleAlertIcon } from "lucide-react";
import {
Alert,
AlertDescription,
AlertTitle,
} from "../../../@/components/ui/alert";
import { Badge } from "../../../@/components/ui/badge";
import { Button } from "../../../@/components/ui/button";
import { Checkbox } from "../../../@/components/ui/checkbox";
import { Input } from "../../../@/components/ui/input";
import { Label } from "../../../@/components/ui/label";
export const metadata = {
robots: "noindex, nofollow",
@@ -7,11 +17,11 @@ export const metadata = {
export default function Page() {
return (
<div className="container py-10">
<div className="max-w-[700px] py-10 mx-auto">
<h1 className="text-5xl tracking-tighter font-semibold mb-8">
Styleguide
</h1>
<Separator className="my-10" />
<div className="my-10" />
<Colors />
</div>
);
@@ -21,65 +31,205 @@ function Colors() {
return (
<div>
<h2 className="text-2xl mb-5 font-semibold tracking-tight">
Neutral background Colors
Backgrounds
</h2>
<div className="flex-col md:flex-row flex gap-4 flex-wrap">
<BgColorPreview className="bg-background" />
<BgColorPreview className="bg-secondary" />
<BgColorPreview className="bg-muted/30" />
<BgColorPreview className="bg-muted/50" />
<BgColorPreview className="bg-muted" />
<BgColorPreview className="bg-accent" />
<BgColorPreview className="bg-card" />
<BgColorPreview className="bg-popover" />
</div>
<Separator className="my-10" />
<div className="my-14" />
<h2 className="text-2xl mb-5 font-semibold tracking-tight">Buttons</h2>
<ButtonsPreview />
<div className="my-14" />
<h2 className="text-2xl mb-5 font-semibold tracking-tight">
Foreground Colors with Background
Disabled Buttons
</h2>
<ButtonsPreview disabled />
<div className="my-14" />
<h2 className="text-2xl mb-5 font-semibold tracking-tight">Badges</h2>
<div className="flex items-center gap-4">
<Badge> Default </Badge>
<Badge variant="outline"> Outline </Badge>
<Badge variant="secondary"> Secondary </Badge>
<Badge variant="destructive"> Destructive </Badge>
<Badge variant="success"> Success </Badge>
<Badge variant="warning"> Warning </Badge>
</div>
<div className="my-14" />
<h2 className="text-2xl mb-5 font-semibold tracking-tight">
Foregrounds
</h2>
<div className="flex flex-col gap-2">
<TextColorPreview className="text-foreground" />
<TextColorPreview className="text-secondary-foreground" />
<TextColorPreview className="text-muted-foreground" />
<TextColorPreview className="text-popover-foreground bg-popover" />
<TextColorPreview className="text-card-foreground bg-card" />
<TextColorPreview className="text-secondary-foreground bg-secondary" />
<TextColorPreview className="text-muted-foreground bg-muted" />
<TextColorPreview className="text-accent-foreground bg-accent" />
<TextColorPreview className="text-primary-foreground bg-primary" />
<TextColorPreview className="text-success-foreground bg-success" />
<TextColorPreview className="text-destructive-foreground bg-destructive" />
<TextColorPreview className="text-warning-foreground bg-warning" />
<TextColorPreview className="text-inverted-foreground bg-inverted" />
<TextColorPreview className="text-destructive-text" />
<TextColorPreview className="text-warning-text" />
<TextColorPreview className="text-success-text" />
</div>
<div className="my-14" />
<h2 className="text-2xl mb-5 font-semibold tracking-tight">
Chart colors
</h2>
<div className="flex-col md:flex-row flex gap-4 flex-wrap">
<ChartColorPreview name="1" />
<ChartColorPreview name="2" />
<ChartColorPreview name="3" />
<ChartColorPreview name="4" />
<ChartColorPreview name="5" />
</div>
<div className="my-14" />
<h2 className="text-2xl mb-5 font-semibold tracking-tight">Alerts</h2>
<div className="flex-col flex gap-6">
<AlertPreview variant="default" />
<AlertPreview variant="destructive" />
<AlertPreview variant="info" />
<AlertPreview variant="warning" />
</div>
<div className="my-10" />
<div className="flex-col flex gap-6">
<AlertPreview variant="default" showDescription />
<AlertPreview variant="destructive" showDescription />
<AlertPreview variant="info" showDescription />
<AlertPreview variant="warning" showDescription />
</div>
<div className="my-14" />
<h2 className="text-2xl mb-5 font-semibold tracking-tight">
Inputs + Label
</h2>
<div className="flex flex-col gap-6">
<div>
<Label className="mb-2 block"> Placeholder </Label>
<Input placeholder="placeholder" />
</div>
<div>
<Label className="mb-2 block"> No value, No placeholder </Label>
<Input />
</div>
<div>
<Label className="mb-2 block"> Value filled </Label>
<Input value="some value" />
</div>
<div>
<Label className="mb-2 block">Disabled</Label>
<Input value="some value" disabled />
</div>
</div>
<div className="my-14" />
<h2 className="text-2xl mb-5 font-semibold tracking-tight">Checkboxes</h2>
<div className="flex gap-4">
<Checkbox />
<Checkbox checked />
</div>
</div>
);
}
function ButtonsPreview(props: {
disabled?: boolean;
}) {
return (
<div className="gap-4 flex items-center">
<Button disabled={props.disabled}> Default </Button>
<Button variant="outline" disabled={props.disabled}>
Outline
</Button>
<Button variant="secondary" disabled={props.disabled}>
Secondary
</Button>
<Button variant="destructive" disabled={props.disabled}>
Destructive
</Button>
<Button variant="primary" disabled={props.disabled}>
Primary
</Button>
<Button variant="ghost" disabled={props.disabled}>
Ghost
</Button>
</div>
);
}
function AlertPreview(props: {
variant: "default" | "destructive" | "info" | "warning";
showDescription?: boolean;
}) {
return (
<Alert variant={props.variant}>
<CircleAlertIcon className="size-4" />
<AlertTitle>This is {props.variant} alert title</AlertTitle>
{props.showDescription && (
<AlertDescription>
This is the {props.variant} alert description
</AlertDescription>
)}
</Alert>
);
}
function ChartColorPreview(props: { name: string }) {
return (
<div
className={
"md:w-[100px] h-[100px] rounded-lg flex items-center justify-center text-xs text-white"
}
style={{
background: `hsl(var(--chart-${props.name}))`,
}}
>
<p className="font-semibold"> chart-{props.name}</p>
</div>
);
}
function BgColorPreview(props: { className: string }) {
return (
<div>
<div
className={cn(
"w-full md:w-[150px] h-[150px] rounded-lg border border-border flex items-center justify-center text-xs",
props.className,
)}
>
<p className="mb-1"> {props.className}</p>
<div
className={cn(
"w-full md:w-[200px] h-[100px] rounded-xl shadow-md border",
props.className,
)}
/>
</div>
);
}
function TextColorPreview(props: { className: string }) {
return (
<div className="grid grid-cols-2">
<p>{props.className}</p>
<p className={cn("text-base p-2 rounded-lg", props.className)}>
The quick brown fox jumps over the lazy dog
</p>
</div>
<p className={cn("text-base rounded-lg", props.className)}>
{props.className}
</p>
);
}
@@ -110,7 +110,7 @@ export function CreateTicket() {
}}
>
<DialogTrigger asChild>
<Button variant="primary" className="mt-6" size="lg">
<Button variant="default" className="mt-6" size="lg">
Get Support
</Button>
</DialogTrigger>

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