part of DASH-388
<!-- start pr-codex -->
---
## PR-Codex overview
This PR focuses on updating the return types in the `convertFiatToCrypto` and `convertCryptoToFiat` functions to return objects instead of plain numbers. Additionally, it modifies the `SnapshotUpload` component to replace `Link` elements with `a` tags and adjusts the layout for better styling.
### Detailed summary
- Changed return type of `convertFiatToCrypto` to `{ result: 0.0000057 }`.
- Changed return type of `convertCryptoToFiat` to `{ result: 3404.11 }`.
- Replaced `Link` components with `a` tags in `SnapshotUpload`.
- Adjusted layout and styling in `SnapshotUpload` for improved design.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->
CNCT-2369
## Problem solved
Short description of the bug fixed or feature added
<!-- start pr-codex -->
---
## PR-Codex overview
This PR introduces two new functions for converting between fiat and crypto currencies in the `thirdweb` package, along with corresponding tests and endpoints.
### Detailed summary
- Added `convertFiatToCrypto` and `convertCryptoToFiat` functions.
- Created endpoints for fiat to crypto and crypto to fiat conversions.
- Implemented tests for both conversion functions, covering various scenarios and error handling.
- Updated documentation with examples for the new functions.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->
CNCT-2438
<!-- start pr-codex -->
---
## PR-Codex overview
This PR introduces enhancements to the `thirdweb` library by adding support for a new `LoyaltyCard` extension, improving event handling, and updating the `github_checks` workflow to validate PR branches for issue references.
### Detailed summary
- Added `ignore` pattern in `codecov.yml`.
- Updated `issue.yml` to check PR body and branch name for valid issue references.
- Implemented `LoyaltyCard` extension with deployment support and event handling.
- Added new functions for `TokensMinted`, `TokensUnwrapped`, and `TokensWrapped` events.
- Updated `Multiwrap` and `LoyaltyCard` ABIs.
- Added tests for deploying `LoyaltyCard` and other ERC721 types.
> The following files were skipped due to too many changes: `packages/thirdweb/src/extensions/erc721/__generated__/Multiwrap/write/unwrap.ts`, `packages/thirdweb/src/extensions/erc721/__generated__/Multiwrap/write/wrap.ts`, `packages/thirdweb/src/extensions/erc721/__generated__/LoyaltyCard/write/mintWithSignature.ts`, `packages/thirdweb/src/extensions/erc721/__generated__/Multiwrap/write/initialize.ts`, `packages/thirdweb/src/extensions/erc721/__generated__/LoyaltyCard/write/initialize.ts`
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->
CNCT-2483
<!-- start pr-codex -->
---
## PR-Codex overview
This PR focuses on removing `console.log` statements from various files to clean up the code and improve maintainability. It also modifies the linter configuration to adjust rules related to console usage.
### Detailed summary
- Removed `console.log` statements from multiple test and implementation files.
- Adjusted linter configuration to allow specific console warnings only.
- Updated `biome.json` to include new linter rules for console usage.
- Cleaned up unused imports related to `DEBUG` constants.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->
CNCT-2479
<!-- start pr-codex -->
---
## PR-Codex overview
This PR updates the `detectExtension.ts` file to change the way the `hasDecimals` variable checks for the presence of the `decimals` method in a contract. It replaces the method signature with a specific available selector.
### Detailed summary
- Replaced the method signature `"function decimals() view returns (uint8)"` with the `availableSelectors` array containing `["0x313ce567"]` in the `detectMethod` call.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->
## Problem solved
Short description of the bug fixed or feature added
<!-- start pr-codex -->
---
## PR-Codex overview
This PR introduces headless components related to blockchain chain management in the `thirdweb` library, including `ChainProvider`, `ChainIcon`, and `ChainName`. It also adds tests for these components and updates documentation to reflect their usage.
### Detailed summary
- Added headless components: `ChainProvider`, `ChainIcon`, `ChainName`.
- Introduced `TokenIconProps` interface.
- Updated `react.ts` to export new components and their props.
- Added documentation for `ChainProvider`, `ChainIcon`, and `ChainName` in `page.mdx`.
- Implemented tests for `TokenSymbol`, `ChainProvider`, `TokenProvider`, `ChainName`.
- Enhanced `ChainProvider` and `ChainIcon` components with new props and functionalities.
- Updated `ChainName` component to support custom name resolvers and formatting functions.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->
2024-11-25 10:41:55 +00:00
Jonas DanielsGitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
CNCT-2441
<!-- start pr-codex -->
---
## PR-Codex overview
This PR introduces new utility functions and enhances existing ones to improve the management of infrastructure contracts and initialization processes within the `thirdweb` framework.
### Detailed summary
- Added `getInitializeTransaction` for preparing contract initialization transactions.
- Added `getOrDeployInfraForPublishedContract` to manage infrastructure for published contracts.
- Documented various functions with detailed JSDoc comments.
- Enhanced `getDeployedCloneFactoryContract` and `getDeployedInfraContract` with clearer descriptions.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->
2024-11-23 02:51:19 +00:00
Jonas DanielsGitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
https://linear.app/thirdweb/issue/CNCT-2363/export-private-key-not-working-with-connectbutton
<!-- start pr-codex -->
---
## PR-Codex overview
This PR introduces the ability to export private keys for enclave wallets upon initial login, enhancing wallet management functionality.
### Detailed summary
- Added `connectLocale` prop to the `PrivateKey` component.
- Implemented `useEffect` to handle postMessage for private key export.
- Changed base domain retrieval to use `getThirdwebBaseUrl`.
- Updated `ModalHeader` title to use localized string.
- Set iframe ID dynamically based on wallet ID.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->
## Problem solved
Short description of the bug fixed or feature added
<!-- start pr-codex -->
---
## PR-Codex overview
This PR focuses on fixing the issue where properties were not being passed correctly to the `TokenIcon` component.
### Detailed summary
- Updated the return statement in the `Token/icon.tsx` file.
- Changed `return <img src={iconQuery.data} alt={restProps.alt} />;` to `return <img src={iconQuery.data} {...restProps} alt={restProps.alt} />;` to ensure all `restProps` are included in the rendered `img` element.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->
## Problem solved
Fixes CNCT-2431
<!-- start pr-codex -->
---
## PR-Codex overview
This PR focuses on enhancing the `thirdweb` package by exposing utilities to decode errors and function data, improving the overall functionality and usability of the library.
### Detailed summary
- Added `decodeError`, `decodeFunctionData`, and `decodeFunctionResult` utilities in `packages/thirdweb/src/utils/abi/`.
- Updated `packages/thirdweb/src/exports/utils.ts` to export new decoding utilities.
- Skipped the test for getting events by `blockHash` in `packages/thirdweb/src/event/actions/get-events.test.ts`.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->
2024-11-22 08:22:44 +00:00
Jonas DanielsGitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
<!-- start pr-codex -->
## PR-Codex overview
This PR introduces an optional `includeUsage` parameter to the `CoreServiceConfig` type and updates API URL construction to utilize this parameter, defaulting to `true`. This allows for more flexible API calls regarding usage data.
### Detailed summary
- Added optional `includeUsage` parameter to `CoreServiceConfig`.
- Updated `fetchKeyMetadataFromApi` to use `includeUsage` in the API URL.
- Updated `fetchAccountFromApi` to use `includeUsage` in the API URL for both wallet and account endpoints.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->
## Problem solved
Short description of the bug fixed or feature added
<!-- start pr-codex -->
---
## PR-Codex overview
This PR introduces new components related to token management in a React application, including `TokenProvider`, `TokenName`, `TokenSymbol`, and `TokenIcon`. These components allow users to fetch and display token-related data such as name, symbol, and icon.
### Detailed summary
- Added `Token` section in the sidebar with links to token components.
- Created `TokenProvider` for managing token data context.
- Implemented `TokenName`, `TokenSymbol`, and `TokenIcon` components for fetching and displaying token information.
- Exported new token-related types and components from `react.ts`.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->
## Problem solved
Short description of the bug fixed or feature added
<!-- start pr-codex -->
---
## PR-Codex overview
This PR focuses on refactoring the wallet connection components in the `thirdweb` package, specifically enhancing the `ConnectButton` and `ConnectedWalletDetails` components by integrating `AccountProvider` and improving the handling of wallet details.
### Detailed summary
- Updated JSDoc comment in `useConnectedWalletDetails` to indicate its limited usage.
- Wrapped `ConnectedWalletDetails` with `AccountProvider` in `ConnectButtonInner`.
- Removed `useConnectedWalletDetails` from `ConnectedWalletDetails`.
- Enhanced `ConnectedWalletDetails` to use `AccountAvatar`, `AccountName`, and `AccountBalance` components.
- Updated props handling for connected account avatar and name in `ConnectedWalletDetails`.
- Refactored balance display logic in `ConnectedWalletDetails` to use `AccountBalance`.
- Modified `DetailsModal` to utilize `AccountProvider` and improved wallet avatar handling.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->
cnct-2137
<!-- start pr-codex -->
---
## PR-Codex overview
This PR introduces a new `Account` component suite to the `thirdweb` library, enhancing user account management with features like account name, address, avatar, and balance display. It also marks existing `NFT` components as `@beta`.
### Detailed summary
- Added `Account` components: `AccountName`, `AccountAddress`, `AccountAvatar`, `AccountBalance`, and `AccountBlobbie`.
- Updated existing `NFT` components to `@beta`.
- Introduced tests for new `Account` components.
- Enhanced `AccountProvider` for context management.
- Updated documentation for new components and props.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->
## Problem solved
Short description of the bug fixed or feature added
<!-- start pr-codex -->
---
## PR-Codex overview
This PR primarily focuses on refactoring the `NFT` component and its related functionalities to improve performance, enhance control over fetching logic, and simplify usage by removing the need for `React.Suspense`. It also introduces new props for better loading and error handling.
### Detailed summary
- Deleted several test files and an unused `NFT.tsx` file.
- Introduced `NFTProvider`, `NFTMedia`, `NFTName`, and `NFTDescription` components.
- Added `loadingComponent` and `fallbackComponent` props for better handling of loading states and errors.
- Updated references in tests to use new component structure.
- Renamed and adjusted documentation comments to reflect new functionality.
- Improved sidebar organization by updating links and names for consistency.
- Enhanced utility functions and hooks for better NFT data fetching and context management.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->
CNCT-2385
<!-- start pr-codex -->
---
## PR-Codex overview
This PR focuses on improving error handling and user experience in the `BuyScreen` and `TransactionModeScreen` components of the `thirdweb` package. It adds error states for loading issues and modifies error messages for better clarity.
### Detailed summary
- Updated error message for missing account in `useBuyTxStates.ts`.
- Introduced an error state in `BuyScreen` for `supportedDestinationsQuery` failures.
- Added loading and error handling in `TransactionModeScreen` for transaction cost and chain data.
- Enhanced user feedback with `ErrorState` and `LoadingScreen` components.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->
CNCT-2230
<!-- start pr-codex -->
---
## PR-Codex overview
This PR introduces the ability to override transaction values in the `createNewPack` function within the `thirdweb` package.
### Detailed summary
- Added `WithOverrides` type to the `options` parameter in `createNewPack` and `getCreatePackParams` functions.
- Updated the function signatures to accept overrides for transaction options.
- Included `overrides` in the parameters for creating pack details.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->
https://linear.app/thirdweb/issue/CNCT-2314/consolidate-documentation-for-in-app-wallets-and-ecosystem
<!-- start pr-codex -->
---
## PR-Codex overview
This PR focuses on restructuring and updating the documentation and components related to `thirdweb` wallets, including `In-App`, `Ecosystem`, and `External Wallets`. It includes deletions of outdated files and additions of new guides and features.
### Detailed summary
- Deleted multiple outdated `.mdx` files related to `In-App Wallet` and `Ecosystem` documentation.
- Added new images and updated asset paths for wallet-related components.
- Introduced a new `AuthList` component to display various authentication methods.
- Updated wallet security documentation to reflect changes in architecture.
- Enhanced the sidebar for better navigation of wallet-related topics.
- Revised various guides to improve clarity on wallet integration and user management.
- Added detailed sections on wallet pregeneration and linking multiple identities.
- Updated the `sign-in methods` documentation with clearer instructions and links.
> The following files were skipped due to too many changes: `apps/portal/src/app/connect/sidebar.tsx`, `apps/portal/src/app/connect/wallet/faq/page.mdx`, `apps/portal/src/app/connect/wallet/user-management/get-user-profiles/page.mdx`, `apps/portal/redirects.mjs`, `apps/portal/src/app/connect/wallet/security/assets/ecosystem-scoped.svg`
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->
https://linear.app/thirdweb/project/[modular-contracts]-modules-ui-c7a2be28299d/overview
<!-- start pr-codex -->
## PR-Codex overview
This PR focuses on enhancing the `Mintable` functionality in the dashboard and improving the handling of URIs in the `MintableERC721` and `MintableERC1155` modules. It also refines role management for minting processes.
### Detailed summary
- Changed the condition in `module-instance.tsx` to check for "Mintable" instead of "Mintable-ignore".
- Updated `mintWithRole.ts` in both `MintableERC721` and `MintableERC1155` to conditionally process `nfts` and set `baseURI`.
- Simplified import statements in `Mintable.tsx`.
- Modified `hasMinterRole` and `grantRoleTx` to use a more concise syntax for role checking and granting in `Mintable.tsx`.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->
i just want my cat back
<!-- start pr-codex -->
---
## PR-Codex overview
This PR focuses on updating the styling of the `img` elements in the `DetailsModal` component to ensure they maintain aspect ratio and are responsive.
### Detailed summary
- Changed the `width` of the first `img` to `"100%"` and added `objectFit: "cover"`.
- Updated the second `img` to have `height` and `width` set to `"100%"`, along with `objectFit: "cover"`.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->
CNCT-2381
<!-- start pr-codex -->
---
## PR-Codex overview
This PR adds a new export to the `contract.ts` file, enhancing the available utilities for contract interactions.
### Detailed summary
- Added export for `prepareMethod` from `../utils/abi/prepare-method.js`.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->
## Problem solved
Short description of the bug fixed or feature added
<!-- start pr-codex -->
---
## PR-Codex overview
This PR focuses on renaming a variable for clarity in the `useSetActiveWallet` hook implementation within the `useSetActiveWallet.ts` file.
### Detailed summary
- Renamed the variable `setActiveAccount` to `setActiveWallet` for consistency with the hook name.
- Updated the usage of the variable to `await setActiveWallet(wallet);` to reflect the new name.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->
CNCT-2258
<!-- start pr-codex -->
---
## PR-Codex overview
This PR focuses on enhancing the `wallet-ui` application, introducing multi-tenancy support, updating configurations, and improving code quality with better imports and utility functions.
### Detailed summary
- Removed unused files: `erc20.ts`, `Erc20Token.ts`
- Added `isMultiTenant` utility for environment checks
- Updated `README.md` for ecosystem portal
- Enhanced routing with ecosystem ID in redirects
- Introduced new configuration files for `knip` and `biome`
- Updated ESLint rules and configurations
- Refactored image handling to use a new `Image` component
- Streamlined various imports across components and hooks
> 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 -->
CNCT-2231
<!-- start pr-codex -->
---
## PR-Codex overview
This PR introduces a validation check for the `chains` option in the WalletConnect integration, ensuring that no more than 10 chains can be specified. If more than 10 chains are provided, a warning is logged, and only the first 10 chains are used.
### Detailed summary
- Added a check for `options.chains` to limit the number of chains to a maximum of 10.
- Implemented a warning message if more than 10 chains are specified, informing the user of the truncation.
- Used `slice(0, 10)` to return only the first 10 chains if the limit is exceeded.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->
CNCT-2198
<!-- start pr-codex -->
---
## PR-Codex overview
This PR introduces `Steam` as a new authentication option across various components and files, enhancing the authentication capabilities of the application.
### Detailed summary
- Added `Steam` as an authentication option in multiple files.
- Updated `types.ts` and `oauthSignIn.ts` to include `Steam`.
- Added `STEAM_ICON` in `svgs.ts` for UI representation.
- Updated connection options in `ConnectWalletMiniPlayground.tsx`.
- Modified documentation to include `Steam` in social logins.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->
CNCT-2370
<!-- start pr-codex -->
---
## PR-Codex overview
This PR adds support for the `chain` property in the `connectOptions` object within the `ConnectWalletSocialOptions.tsx` file, enhancing the flexibility of wallet connections based on the provided chain.
### Detailed summary
- Added `chain: props.chain` to the `connectOptions` object.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->
## Problem solved
Short description of the bug fixed or feature added
<!-- start pr-codex -->
---
## PR-Codex overview
This PR focuses on enhancing error handling for `localStorage` operations across various components, ensuring that unhandled errors do not disrupt functionality.
### Detailed summary
- Wrapped `localStorage.setItem` and `localStorage.getItem` calls in `try-catch` blocks to handle potential errors.
- Updated `ThemeSwitcher`, `RightSection`, `useLocalStorage`, `Banner`, and `webLocalStorage` to ignore errors gracefully.
- Maintained existing functionality while improving robustness.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->
## Problem solved
https://linear.app/thirdweb/issue/BLOCK-412/add-api-key-scope
Added Nebula service scope to the service definitions and included it in the hidden services list.
<!-- start pr-codex -->
---
## PR-Codex overview
This PR introduces the `nebula` service scope to the project and updates the related configurations and validations accordingly. It also modifies the pull request body check to include the `BLOCK` keyword.
### Detailed summary
- Added `nebula` service scope in `packages/service-utils/src/core/services.ts` with properties: `name`, `title`, and `description`.
- Updated `HIDDEN_SERVICES` in `apps/dashboard/src/components/settings/ApiKeys/validations.ts` to include `nebula`.
- Modified the pull request body check in `.github/workflows/linear.yml` to include `BLOCK`.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->
## Problem solved
https://linear.app/thirdweb/issue/CNCT-2311/pro-cannot-sign-transaction-with-in-app-wallet
<!-- start pr-codex -->
---
## PR-Codex overview
This PR focuses on improving the transaction signing process in the `enclave-wallet` by ensuring proper type checks for various transaction properties, specifically handling cases for `bigint` and `number` types.
### Detailed summary
- Updated the handling of `tx.value`, `tx.gas`, `tx.nonce`, `tx.maxPriorityFeePerGas`, and `tx.gasPrice` to check their types before processing.
- Ensured that `tx.value`, `tx.gas`, and `tx.maxPriorityFeePerGas` are only processed if they are of type `bigint`.
- Adjusted the handling of `tx.nonce` to support both `number` and fallback to `eth_getTransactionCount`.
- Maintained a 10% buffer for `tx.gas` calculations.
- Updated the assignment of `transaction.maxFeePerGas` and `transaction.type` based on the presence of `tx.maxFeePerGas`.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->
## Problem solved
Short description of the bug fixed or feature added
<!-- start pr-codex -->
---
## PR-Codex overview
This PR modifies the test suite for resolving addresses with `Unstoppable Domain`. It updates the test structure to conditionally run based on the presence of `TW_SECRET_KEY` and retains the existing test logic.
### Detailed summary
- Changed `describe` to conditionally run with `describe.runIf(process.env.TW_SECRET_KEY)`.
- Retained the test for resolving a valid address.
- Retained the test for handling a non-existent domain name.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->