Adds the ability to hide certain wallets in the wallet switcher
```tsx
<ConnectButton
client={client}
detailsModal={{
// We hide the in-app wallet so they can't switch to it
hiddenWallets: ["inApp"],
}}
accountAbstraction={{
chain: baseSepolia,
sponsorGas: true,
}}
/>
```
<!-- start pr-codex -->
---
## PR-Codex overview
The focus of this PR is to add the ability to hide specific wallets in the wallet switcher UI component.
### Detailed summary
- Added `hiddenWallets` prop to `ConnectButton`, `DetailsModal`, `WalletSwitcherConnectionScreen`, `BuyScreen`, and `PayEmbed` components.
- Implemented filtering of connected wallets based on `hiddenWallets` in `WalletManagerScreen` and `WalletSwitcherDrawerContent`.
- Updated types to include `WalletId` for consistency across components.
> ✨ 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 adds authentication support for a new provider 'X' across various components and modules.
### Detailed summary
- Added 'X' authentication provider
- Updated authentication types and components
- Implemented 'X' authentication in multiple files
> ✨ 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 adds `parseAvatarRecord` and `parseNftUri` utilities for ENS avatars and NFT URIs. Detailed summary:
### Detailed summary
- Added `parseAvatarRecord` and `parseNftUri` functions for ENS avatars and NFT URIs
- Updated `common.ts` and `ens.ts` with new exports
- Created `parseNftUri` function in `parseNft.ts`
- Added `parseAvatarRecord` function in `avatar.ts`
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->
2024-09-12 22:12:44 +00:00
Jonas DanielsGitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
## Problem solved
Short description of the bug fixed or feature added
<!-- start pr-codex -->
---
## PR-Codex overview
This PR focuses on enabling smart wallet transactions to be sent in parallel.
### Detailed summary
- Added the ability to execute 2 transactions in parallel in smart wallets
- Implemented functions to handle account deployment in parallel transactions
> ✨ 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 adds functionality to display social profiles for linked accounts in the `LinkedProfilesScreen`.
### Detailed summary
- Added a new `LinkedProfile` component to display social profiles
- Used `useSocialProfiles` hook to fetch social profiles data
- Updated rendering logic for linked profiles
- Improved UI for displaying linked profiles
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->
This replaces https://portal.thirdweb.com/connect/in-app-wallet/how-to/get-in-app-wallet-details-on-server
<!-- start pr-codex -->
---
## PR-Codex overview
This PR adds a `getUser` function to query users on the server and updates related files with necessary exports and type definitions.
### Detailed summary
- Added `getUser` function to query users on the server
- Updated exports in `thirdweb.ts` and `wallets.ts`
- Added type definitions for `GetUserResult`
- Implemented `getUser` function in `getUser.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 exposes `toFunctionSelector` and updates its usage in the dashboard component for better navigation.
### Detailed summary
- Exposed `toFunctionSelector` in `thirdweb/utils.ts`
- Updated `ContractFunctionsPanel` to use `toFunctionSelector` for navigation based on function selector
- Improved function selection logic in `FunctionsOrEventsListItem` to use `toFunctionSelector`
> ✨ 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 adding support for deterministic contract deployment using a salt parameter.
### Detailed summary
- Added support for passing a `salt` parameter for deterministic contract deployment
- Updated functions to handle the `salt` parameter for deterministic deploys
- Modified tests to include deterministic deployment scenarios
> The following files were skipped due to too many changes: `packages/thirdweb/src/extensions/prebuilts/deploy-published.ts`, `packages/thirdweb/src/contract/deployment/deploy-with-abi.ts`, `packages/thirdweb/test/src/abis/proxy.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 updating contract initializer parameters from arrays to objects for better clarity and consistency.
### Detailed summary
- Updated contract initializer params from arrays to objects for improved readability
- Refactored multiple files to use object-based contract params
- Added normalization function for function parameters in zkDeployContract file
> The following files were skipped due to too many changes: `packages/thirdweb/src/contract/deployment/zksync/zkDeployContract.ts`, `packages/thirdweb/src/utils/abi/normalizeFunctionParams.ts`, `packages/thirdweb/src/extensions/prebuilts/deploy-published.test.ts`, `packages/thirdweb/test/src/chains.ts`, `packages/thirdweb/src/contract/deployment/zksync/zkDeployDeterministic.ts`, `packages/thirdweb/src/extensions/prebuilts/deploy-marketplace.ts`, `packages/thirdweb/src/utils/any-evm/compute-published-contract-address.ts`, `packages/thirdweb/src/utils/any-evm/compute-published-contract-deploy-info.ts`, `packages/thirdweb/src/contract/deployment/deploy-deterministic.test.ts`, `packages/thirdweb/src/extensions/prebuilts/get-required-transactions.test.ts`, `packages/thirdweb/src/extensions/prebuilts/get-required-transactions.ts`, `packages/thirdweb/src/extensions/prebuilts/deploy-modular-core.test.ts`, `packages/thirdweb/src/contract/deployment/utils/infra.ts`, `packages/thirdweb/src/extensions/prebuilts/deploy-modular.ts`, `packages/thirdweb/src/contract/deployment/utils/bootstrap.ts`, `packages/thirdweb/src/extensions/prebuilts/deploy-published.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 fixes an error related to ERC721 delayed reveal simulation.
### Detailed summary
- Fixed error in ERC721 delayed reveal simulation
- Added tests for `reveal` function
- Added `createAndReveal` function for batch creation and reveal
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->
2024-09-10 18:09:39 +00:00
Jonas DanielsGitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
## Problem solved
Add another storage slot for proxy resolution:
keccak256("org.zeppelinos.proxy.implementation")
ref: https://basescan.org/address/0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913#code
<!-- start pr-codex -->
---
## PR-Codex overview
The focus of this PR is to enhance proxy resolution in the `thirdweb` package by adding more storage slots for implementation addresses.
### Detailed summary
- Added more storage slots for proxy resolution in `resolveImplementation.test.ts`
- Updated global setup in `globalSetup` function in `globalSetup.ts`
- Added base chain definitions and RPC URL in `chains.ts`
- Improved implementation address extraction in `resolveImplementation.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
The focus of this PR is to export additional social functions and types in the `thirdweb` package.
### Detailed summary
- Exported `SocialProfiles`, `EnsProfile`, `FarcasterProfile`, and `LensProfile` from `social/types.js`
- Added paths for social types in `package.json` under `social` section
> ✨ 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
The focus of this PR is to fix the common icons theme in React Native components.
### Detailed summary
- Updated icons in `WalletImage.tsx` and `ConnectModal.tsx`
- Refactored `getAuthProviderImage` function
- Added new `PASSKEY_ICON` in `svgs.ts`
> The following files were skipped due to too many changes: `packages/thirdweb/src/react/core/utils/walletIcon.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 exposes a new utility function `createAndSignUserOp` in `thirdweb` package.
### Detailed summary
- Added `createAndSignUserOp` utility function
- Imported `toSerializableTransaction`
- Updated function `getAccountNonce`
- Added `createAndSignUserOp` function with detailed documentation
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->
2024-09-07 09:17:29 +00:00
Jonas DanielsGitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
## 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 options for hiding buttons on the details modal in the `ConnectWallet` feature.
### Detailed summary
- Added options to hide "Send Funds," "Receive Funds," and "Buy Funds" buttons in the details modal
- Updated `ConnectButton.tsx` and `Details.tsx` to include new hide options
- Modified `UseWalletDetailsModalOptions` type to support new hide options
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->
FIXES: DASH-210
<!-- start pr-codex -->
## PR-Codex overview
The focus of this PR is to fix the baseURI extraction logic in the `lazy-mint-form.tsx` file.
### Detailed summary
- Removed unnecessary `upload` function calls for image and animation URLs
- Updated data processing logic in `LazyMintNftForm`
- Refactored `getBaseUriFromBatch` function for URI extraction
- Added tests for `getBaseUriFromBatch` function
> ✨ 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 improves React Query caching performance by optimizing structural sharing in the `ThirdwebProviderCore`.
### Detailed summary
- Added `structuralSharing` function to optimize caching performance
- Implemented `deepEqual` function for deep comparison
- Updated `ThirdwebProviderCore` to use `structuralSharing` for better caching efficiency
> ✨ 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 adds support for fetching social profiles for Farcaster, Lens, and ENS.
### Detailed summary
- Added functions to fetch social profiles for different protocols
- Updated components to use social profile data
- Updated types for social profiles and profiles metadata
> The following files were skipped due to too many changes: `packages/thirdweb/src/react/web/ui/ConnectWallet/Details.tsx`
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->
## Problem solved
Short description of the bug fixed or feature added
<!-- start pr-codex -->
---
## PR-Codex overview
This PR updates `getFunctionId` in `function-id.ts` to use `randomBytesHex` instead of `uint8ArrayToHex`.
### Detailed summary
- Replaced `uint8ArrayToHex` with `randomBytesHex` function
- Changed `functionIdCache` from WeakMap to Map
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->
## Problem solved
Let's say I need a list of owned tokenids for rendering a list of <NFT.Media />. Using getOwnedNFTs is a waste of requests, so I split the code from the current getOwnedNFTs to make a new function
<!-- start pr-codex -->
---
## PR-Codex overview
This PR adds a new function `getOwnedTokenIds` to retrieve ERC1155 tokenIds and their balances for a wallet address, along with related tests.
### Detailed summary
- Added `getOwnedTokenIds` function to retrieve ERC1155 tokenIds and balances
- Updated `getOwnedNFTs` to use `getOwnedTokenIds`
- Added tests for `getOwnedTokenIds`
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->
2024-09-05 09:58:46 +00:00
Jonas DanielsGitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
<!-- start pr-codex -->
## PR-Codex overview
This PR enhances ERC1155 Drop ClaimCondition functionality.
### Detailed summary
- Added `isGetActiveClaimConditionSupported` function
- Updated `getActiveClaimCondition` and `claimTo` methods
- Added `isClaimToSupported` function
- Updated `lazyMint` method and added `isLazyMintSupported` function
> The following files were skipped due to too many changes: `packages/thirdweb/src/extensions/erc1155/drops/write/setClaimConditions.ts`, `packages/thirdweb/src/extensions/erc20/drops/write/setClaimConditions.ts`, `packages/thirdweb/src/extensions/erc20/drops/write/claimTo.ts`, `packages/thirdweb/src/extensions/erc1155/drops/read/getClaimConditions.ts`, `packages/thirdweb/src/extensions/erc1155/drops/write/resetClaimEligibility.ts`, `packages/thirdweb/src/extensions/erc1155/__generated__/IDrop1155/read/claimCondition.ts`, `packages/thirdweb/src/extensions/erc1155/drop1155.test.ts`
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->
<!-- start pr-codex -->
## PR-Codex overview
This PR removes unusable single-phase claim condition extensions for ERC20, ERC721, and ERC1155 tokens.
### Detailed summary
- Removed unused single-phase claim condition extensions for ERC20, ERC721, and ERC1155 tokens
- Updated export functions for ERC20, ERC721, and ERC1155 tokens
- Refactored `getActiveClaimCondition` functions for ERC1155 and ERC721 tokens to handle unknown phase types
> The following files were skipped due to too many changes: `packages/thirdweb/src/extensions/erc20/drops/read/getActiveClaimCondition.ts`
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->
<!-- start pr-codex -->
## PR-Codex overview
The focus of this PR is to enhance the ERC20 Drop ClaimCondition feature by adding metadata support and improving claim condition retrieval.
### Detailed summary
- Added `metadata` field to `setClaimConditions` function in ERC20 Drop
- Updated function selectors and inputs in ERC20 Drop
- Renamed `ById` to `MultiById` for clarity
- Improved claim condition retrieval logic
- Added support for `resetClaimEligibility` in ERC20 Drop
- Updated exports and imports for clarity
> The following files were skipped due to too many changes: `packages/thirdweb/src/extensions/erc20/drops/read/getClaimConditions.ts`, `packages/thirdweb/src/extensions/erc20/drop20.test.ts`
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->
## Problem solved
keccak256("matic.network.proxy.implementation") - used in polygon USDT proxy: https://polygonscan.com/address/0xc2132d05d31c914a87c6611c10748aeb04b58e8f#code
<!-- start pr-codex -->
---
## PR-Codex overview
This PR focuses on enhancing the Matic (Polygon) proxy contract implementation resolution in the codebase.
### Detailed summary
- Added resolution for Matic proxy contract implementation slot
- Updated test cases for Matic proxy contract implementation
- Added support for Polygon chain in test setup
- Defined Polygon chain constants and RPC URLs
- Updated Ethereum and Polygon chain definitions
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->
<!-- start pr-codex -->
## PR-Codex overview
This PR enhances ERC721 Drop ClaimCondition functionality by adding new methods and improving existing ones.
### Detailed summary
- Added `claimCondition` method to `IDrop.json`
- Updated `getClaimParams` in `get-claim-params.ts` to use `ZERO_ADDRESS`
- Added `isClaimToSupported` and `isLazyMintSupported` functions
- Updated `lazyMint` and `claimTo` functions
- Added support check functions for various methods
> The following files were skipped due to too many changes: `packages/thirdweb/src/extensions/erc721/__generated__/IDrop/read/claimCondition.ts`, `packages/thirdweb/src/extensions/erc721/drops/read/getActiveClaimCondition.ts`, `packages/thirdweb/src/extensions/erc721/drops/read/getClaimConditions.ts`, `packages/thirdweb/src/extensions/erc721/drop721.test.ts`
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->
2024-09-04 23:19:30 +00:00
Jonas DanielsGitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
## 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 -->
## 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 -->
### 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 -->
## 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>
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 -->
## 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 -->