8878 Commits
Author SHA1 Message Date
jnsdls d320777eea [Fix] Address ESLint issues in BasisPointsInput component (#3432) 2024-06-20 23:20:32 +00:00
jnsdls e8dc81d431 [Chore] Remove unused packages and files (#3425)
### TL;DR

This pull request removes several obsolete API routes and the associated Airtable package from the dashboard app.

### What changed?

- Removed Airtable package from `package.json` and `pnpm-lock.yaml`
- Deleted several unused API routes (`airtable.ts`, `check-verification-status.ts`, `etherscan-fetch.ts`, `verify.ts`)
- Minor codebase cleanup for consistent styling and formatting

### How to test?

Ensure the dashboard app builds and runs without any issues. Verify that removed API routes are no longer accessible.

### Why make this change?

These API routes and the Airtable package are no longer needed for the functionality of the dashboard app, and their removal simplifies the codebase.

---

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to update dependencies, fix function parameters, and improve code consistency.

### Detailed summary
- Updated dependencies in `package.json`
- Fixed function parameter formatting in multiple files
- Improved code consistency by adjusting function calls and declarations

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

<!-- end pr-codex -->
2024-06-20 22:00:10 +00:00
gregfromstl 6429acc1f7 feat(wallets): Adds dawn wallet support (#3381)
Adds Dawn Wallet since it's WC settings filter it out
2024-06-20 20:55:05 +00:00
jnsdls 1fb60a65be format with biome (#3415)
## Problem solved

Short description of the bug fixed or feature added

## Changes made

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

## How to test

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

## Contributor NFT

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

```Address: ```

<!-- start pr-codex -->

---

## PR-Codex overview
This PR updates formatting scripts to use `biome` instead of `prettier`.

### Detailed summary
- Updated formatting scripts in multiple package.json files
- Replaced `prettier` with `biome` for code formatting
- Minor code formatting changes in various files

> The following files were skipped due to too many changes: `legacy_packages/sdk/src/evm/common/any-evm-utils/deployCreate2Factory.ts`, `apps/dashboard/src/contract-ui/tabs/overview/components/LatestEvents.tsx`, `apps/dashboard/src/pages/[chain_id]/[...paths].tsx`, `legacy_packages/sdk/src/evm/core/classes/contract-roles.ts`, `legacy_packages/sdk/src/core/schema/properties.ts`, `legacy_packages/wallets/src/evm/connectors/blocto/index.ts`, `legacy_packages/sdk/src/evm/common/any-evm-utils/getCreate2FactoryAddress.ts`, `legacy_packages/sdk/src/evm/core/classes/erc-20.ts`, `legacy_packages/react/src/payments/additional.d.ts`, `legacy_packages/sdk/src/evm/core/classes/internal/marketplace/marketplace-auction.ts`, `legacy_packages/react-core/src/evm/hooks/async/roles.ts`, `legacy_packages/react/src/wallet/ConnectWallet/screens/Buy/swap/pendingSwapTx.ts`, `legacy_packages/sdk/src/evm/core/classes/erc-721.ts`, `legacy_packages/sdk/src/evm/common/any-evm-utils/getCreate2FactoryDeploymentInfo.ts`, `legacy_packages/sdk/src/evm/common/claim-conditions/processClaimConditionInputs.ts`, `legacy_packages/sdk/src/evm/core/classes/erc-1155.ts`, `legacy_packages/sdk/src/evm/integrations/thirdweb-checkout.ts`, `legacy_packages/sdk/src/evm/core/classes/contract-royalty.ts`, `legacy_packages/wallets/src/evm/wallets/abstract.ts`, `legacy_packages/auth/src/next/router-pages/types/index.ts`, `apps/dashboard/src/contract-ui/tabs/events/components/events-feed.tsx`, `legacy_packages/wallets/src/evm/connectors/smart-wallet/lib/erc4337-provider.ts`, `legacy_packages/merkletree/src/merkletree/MerkleTree.ts`, `legacy_packages/sdk/src/evm/core/classes/internal/erc1155/erc-1155-standard.ts`, `legacy_packages/sdk/src/evm/core/classes/extension-manager.ts`, `legacy_packages/cli/src/core/types/sync-disk-cache.d.ts`, `legacy_packages/auth/src/next/router-app/routes/switch-account.ts`, `legacy_packages/sdk/src/evm/contracts/prebuilt-implementations/pack.ts`, `legacy_packages/auth/src/next/index.ts`, `legacy_packages/react/src/wallet/ConnectWallet/screens/Buy/PaymentSelection.tsx`, `legacy_packages/react/src/components/modalElements.tsx`, `legacy_packages/wallets/src/evm/connectors/gcp-kms/signer.ts`, `legacy_packages/auth/src/next/router-app/routes/login.ts`, `legacy_packages/auth/src/next/router-app/types/index.ts`, `legacy_packages/sdk/src/evm/core/classes/internal/contract-wrapper.ts`, `legacy_packages/sdk/src/evm/core/classes/marketplacev3-english-auction.ts`, `legacy_packages/wallets/src/evm/index.ts`, `legacy_packages/react/src/wallet/ConnectWallet/screens/SwapTransactionsScreen.tsx`, `legacy_packages/cli/src/generate/command.ts`, `legacy_packages/sdk/src/evm/core/classes/marketplacev3-direct-listings.ts`, `legacy_packages/wallets/src/evm/wallets/aws-kms.ts`, `legacy_packages/wallets/src/evm/connectors/wallet-connect/qrModalOptions.d.ts`, `apps/dashboard/src/pages/api/og/chain/[chainId].tsx`, `legacy_packages/react/src/wallet/wallets/embeddedWallet/ExportPrivateKey.tsx`, `apps/dashboard/src/pages/api/og/contract.tsx`, `legacy_packages/sdk/src/evm/common/modular/compatibleExtensions.ts`, `legacy_packages/crypto/src/utils/uint8array-extras.d.ts`, `apps/dashboard/src/pages/api/og/profile.tsx`, `apps/dashboard/src/pages/api/og/publishedContract.tsx`, `legacy_packages/react/src/wallet/wallets/magicEden/magicEdenWallet.tsx`, `apps/dashboard/src/graphql/generated.ts`

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

<!-- end pr-codex -->
2024-06-20 20:36:16 +00:00
kumaryash90 6abdb45f6a Override contract publish id on CLI (#3424)
<!-- start pr-codex -->

## PR-Codex overview
This PR focuses on adding the ability to override contract names with custom IDs in the CLI.

### Detailed summary
- Added option `--customid` to CLI for overriding contract names
- Added prompt for entering custom contract IDs
- Updated contract names based on user input

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

<!-- end pr-codex -->
2024-06-20 20:28:20 +00:00
Jonas Daniels fab5cd43be Update changesets and dependencies (#3428) 2024-06-20 12:06:37 -07:00
Jonas Daniels 5b8471355c [Chore] Remove unused changesets: chilly-phones-sort.md, khaki-penguins-swim.md (#3427) 2024-06-20 11:08:20 -07:00
gregfromstl b24e9b2320 feat(wallet): add support for ecosystem wallets (#3270)
This PR adds a new wallet type called `ecosystemWallet` to the thirdweb SDK.

### TL;DR

- New `ecosystemWallet` added to `thirdweb` SDK.

### What changed?

- `wallets.ts`: Added new export for `ecosystemWallet`
- `ConnectButtonProps.ts`: Adjusted types to account for new wallet.
- `create-wallet.ts`: Added new case for handling `ecosystemWallet` in the `createWallet` function.
- `types.ts`: Defined new types for `ecosystemWallet`.
- Updated various internal files to integrate `ecosystemWallet` functionality.

### How to test?

- Ensure the `ecosystemWallet` can be created and connected using different account types (smart account, direct connection, etc.)
- Test the new `integratorId` feature, which allows integration with a designated ecosystem.
- Validate that autoConnect functionality works as expected with `ecosystemWallet`.

### Why make this change?

This change aims to facilitate the integration of third-party ecosystem wallets into the thirdweb SDK, improving the overall flexibility and usability of the SDK for different blockchain ecosystems.

---

<!-- start pr-codex -->

---

## PR-Codex overview
This PR introduces a minor update to `thirdweb` by adding ecosystem wallet UI and integrating ecosystemWallet to TS SDK.

### Detailed summary
- Added ecosystem wallet UI
- Integrated ecosystemWallet to TS SDK
- Updated wallet details for various platforms
- Refactored wallet locale types
- Improved wallet connection handling
- Added ecosystem partner permissions functionality

> The following files were skipped due to too many changes: `packages/thirdweb/src/wallets/ecosystem/is-ecosystem-wallet.ts`, `packages/thirdweb/src/wallets/__generated__/wallet/com.payperless/index.ts`, `packages/thirdweb/src/wallets/in-app/web/lib/auth/base-login.ts`, `packages/thirdweb/src/wallets/__generated__/wallet/fun.tobi/index.ts`, `apps/playground-web/src/components/code/code-example.tsx`, `packages/thirdweb/src/wallets/in-app/core/wallet/types.ts`, `packages/thirdweb/src/react/web/ui/components/WalletImage.tsx`, `packages/thirdweb/src/react/web/wallets/in-app/useInAppWalletLocale.ts`, `packages/thirdweb/scripts/wallets/generate.ts`, `packages/thirdweb/src/react/web/ui/ConnectWallet/screens/ManageWalletScreen.tsx`, `packages/thirdweb/src/wallets/__generated__/wallet/com.safemoon/index.ts`, `packages/thirdweb/src/wallets/__generated__/wallet-ids.ts`, `packages/thirdweb/src/wallets/ecosystem/is-ecosystem-wallet.test.ts`, `packages/thirdweb/src/wallets/in-app/core/wallet/in-app-core.ts`, `packages/thirdweb/src/wallets/in-app/web/types.ts`, `packages/thirdweb/src/react/web/wallets/in-app/InAppWalletSelectionUI.tsx`, `packages/thirdweb/src/react/web/wallets/in-app/InAppWalletSocialLogin.tsx`, `packages/thirdweb/src/wallets/in-app/web/lib/auth/abstract-login.ts`, `packages/thirdweb/src/react/web/wallets/ecosystem/EcosystemWalletHeader.tsx`, `packages/thirdweb/src/wallets/ecosystem/get-ecosystem-wallet-info.test.ts`, `packages/thirdweb/src/wallets/in-app/core/authentication/type.ts`, `packages/thirdweb/src/wallets/native/create-wallet.ts`, `packages/thirdweb/src/wallets/__generated__/wallet/app.clot/image.ts`, `packages/thirdweb/src/wallets/__generated__/wallet/co.lifedefi/image.ts`, `packages/thirdweb/src/utils/fetch.ts`, `packages/thirdweb/src/wallets/__generated__/wallet-infos.ts`, `packages/thirdweb/src/wallets/in-app/web/utils/iFrameCommunication/IframeCommunicator.ts`, `packages/thirdweb/src/wallets/ecosystem/get-ecosystem-wallet-info.ts`, `packages/thirdweb/src/wallets/in-app/web/lib/auth/iframe-auth.ts`, `packages/thirdweb/src/react/web/ui/ConnectWallet/screens/PrivateKey.tsx`, `packages/thirdweb/src/wallets/in-app/web/ecosystem.ts`, `packages/thirdweb/src/wallets/in-app/web/lib/auth/index.ts`, `packages/thirdweb/src/wallets/wallet-types.ts`, `packages/thirdweb/src/wallets/create-wallet.ts`, `packages/thirdweb/src/wallets/in-app/core/constants/settings.ts`, `packages/thirdweb/src/wallets/__generated__/wallet/fun.tobi/image.ts`, `packages/thirdweb/src/react/web/utils/usePreloadWalletProviders.ts`, `packages/thirdweb/src/wallets/in-app/web/utils/iFrameCommunication/InAppWalletIframeCommunicator.ts`, `packages/thirdweb/src/react/web/wallets/ecosystem/EcosystemWalletFormUI.tsx`, `packages/thirdweb/src/react/web/wallets/ecosystem/EcosystemWalletConnectUI.tsx`, `packages/thirdweb/src/react/web/wallets/in-app/InAppWalletConnectUI.tsx`, `packages/thirdweb/src/react/web/wallets/in-app/InAppWalletPassKeyLogin.tsx`, `packages/thirdweb/src/wallets/__generated__/wallet/me.komet/image.ts`, `packages/thirdweb/src/wallets/in-app/core/wallet/index.ts`, `packages/thirdweb/src/react/web/ui/ConnectWallet/Modal/AnyWalletConnectUI.tsx`, `packages/thirdweb/src/wallets/in-app/core/wallet/ecosystem-core.ts`, `packages/thirdweb/src/wallets/__generated__/wallet/com.payperless/image.ts`, `packages/thirdweb/src/wallets/in-app/web/lib/web-connector.ts`, `packages/thirdweb/src/react/web/wallets/in-app/InAppWalletOTPLoginUI.tsx`, `packages/thirdweb/src/wallets/in-app/web/lib/in-app-account.ts`, `packages/thirdweb/src/wallets/in-app/web/utils/Storage/LocalStorage.ts`, `packages/thirdweb/src/wallets/in-app/web/lib/auth/passkeys.ts`, `packages/thirdweb/src/wallets/__generated__/getWalletInfo.ts`, `packages/thirdweb/src/react/web/wallets/shared/ConnectWalletSocialOptions.tsx`, `packages/thirdweb/src/wallets/__generated__/wallet/xyz.bonuz/image.ts`, `packages/thirdweb/src/react/web/wallets/in-app/InAppWalletFormUI.tsx`, `pnpm-lock.yaml`

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

<!-- end pr-codex -->
2024-06-20 16:46:37 +00:00
6e6ab8753d Version Packages (#3423)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: GitHub Action <[email protected]>
2024-06-20 09:29:11 -07:00
Manan Tank de354305ee Fix Connect UI not able to connect to unknown injected wallet + Fix icon, autoConnect (#3422) 2024-06-20 20:57:44 +05:30
b5a7b9d6d9 Version Packages (#3379)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: GitHub Action <[email protected]>
2024-06-20 18:01:58 +12:00
joaquim-verges 6818c1194b refactor: update mobile upload to use getClientFetch for fetching (#3417)
<!-- start pr-codex -->

## PR-Codex overview
The focus of this PR is to fix the `uploadMobile` function in the `thirdweb` package to properly handle the `bundleId` parameter.

### Detailed summary
- Updated `UploadFile` type in `types.ts` to include a generic object
- Modified `uploadMobile` function in `uploadMobile.ts` to handle options parameter correctly
- Refactored `uploadBatchMobile` function in `mobile.ts` to use `getClientFetch` for fetching

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

<!-- end pr-codex -->
2024-06-20 03:57:30 +00:00
joaquim-verges 59a846283b fix: always use CustomThemeProvider's theme prop in React (#3416)
### Main issue

StyledComponents come with their own `theme` prop, overriding our own `theme` prop. So instead of trying to use the `theme` prop in our Button component, always use the `CustomThemeProvider` one.

### TL;DR
This PR introduces a change to ensure that the `CustomThemeProvider` and related components respect an undefined `theme` prop. This is achieved by removing the default fallback to the `dark` theme when the `theme` prop is not provided.

### What changed?
- Updated `CustomThemeProvider` to accept `undefined` as a valid `theme` value.
- Modified components that use `CustomThemeProvider` to pass the `theme` prop directly without defaulting to `dark`.
- Replaced direct import and usage of `parseTheme` in `TransactionButton` with wrapping the button in `CustomThemeProvider`.
- Removed unnecessary imports and streamlined theme handling in the `Button` component to utilize `useCustomTheme`.
- Updated `dev:dashboard` script to also filter `./packages/thirdweb`.

### How to test?
- Verify the application operates correctly when the `theme` prop is explicitly set to `undefined` or not provided.
- Ensure all components render with the default theme correctly without any regressions.

### Why make this change?
This change ensures more flexible theme handling in the application and reduces the assumption that a `dark` theme should always be the fallback. This is particularly useful for dynamic theming use cases where the theme might not always be determinable upfront.

---
2024-06-20 03:39:27 +00:00
gregfromstl e117ab34e0 fix(dashboard): renames NFT Properties to Attributes in UI to match metadata (#3404)
<!-- start pr-codex -->

## PR-Codex overview
This PR renames 'Properties' to 'Attributes' in the dashboard UI components for consistency and clarity.

### Detailed summary
- Renamed 'Properties' to 'Attributes' in dashboard UI components for consistency.
- Updated labels and headings in multiple files to reflect the change.

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

<!-- end pr-codex -->
2024-06-20 03:27:56 +00:00
gregfromstl 7a5d9bc6b8 fix(wallets): add error handling to WalletConnectReceiverScreen and related modules (#3412)
<!-- start pr-codex -->

## PR-Codex overview
This PR refactors error messages and exports for better readability in the Wallet Connect module.

### Detailed summary
- Refactored error messages in Wallet Connect module for clarity.
- Updated exports for Wallet Connect client and session.
- Modified handling of session proposal and request errors.
- Improved error handling in session request fulfillment.
- Updated dependencies and imports for better organization.

> The following files were skipped due to too many changes: `packages/thirdweb/src/wallets/wallet-connect/receiver/session-request.test.ts`, `packages/thirdweb/src/wallets/wallet-connect/receiver/index.ts`

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

<!-- end pr-codex -->
2024-06-20 02:58:26 +00:00
jnsdls 5ca9094e26 update dependencies: (#3414)
<!-- start pr-codex -->

## PR-Codex overview
This PR updates dependencies, enables linter rules, and refactors styled components in various files.

### Detailed summary
- Updated `ora` dependency to version `^8.0.1`
- Added `"@typescript-eslint/no-unused-vars": "warn"` to ESLint config
- Updated `@swc/cli` dependency to version `0.3.12`
- Enabled linter rules in `biome.json`
- Refactored styled components in multiple files

> The following files were skipped due to too many changes: `packages/thirdweb/src/react/web/ui/components/formElements.tsx`, `packages/thirdweb/src/react/web/ui/components/modalElements.tsx`, `legacy_packages/unity-js-bridge/package.json`, `legacy_packages/react/src/wallet/ConnectWallet/screens/Buy/swap/SwapScreen.tsx`, `legacy_packages/react/src/wallet/ConnectWallet/Modal/ConnectModalInline.tsx`, `packages/thirdweb/src/react/web/ui/ConnectWallet/Modal/ConnectModalInline.tsx`, `legacy_packages/crypto/package.json`, `legacy_packages/chains/package.json`, `legacy_packages/merkletree/package.json`, `packages/thirdweb/src/react/web/ui/ConnectWallet/MenuButton.tsx`, `packages/thirdweb/src/react/web/wallets/in-app/LinkButton.tsx`, `legacy_packages/react/src/wallet/wallets/embeddedWallet/LinkButton.tsx`, `packages/thirdweb/src/react/web/ui/components/Overlay.tsx`, `packages/thirdweb/src/react/web/ui/components/OTPInput.tsx`, `legacy_packages/react/src/components/OTPInput.tsx`, `legacy_packages/react/src/wallet/wallets/safe/SelectAccount.tsx`, `legacy_packages/react/src/wallet/ConnectWallet/Details.tsx`, `legacy_packages/eslint-config-thirdweb/package.json`, `.changeset/khaki-apricots-turn.md`, `legacy_packages/react/src/components/Drawer.tsx`, `legacy_packages/react/src/components/text.tsx`, `packages/thirdweb/src/react/web/ui/components/Drawer.tsx`, `packages/thirdweb/src/react/web/ui/components/text.tsx`, `legacy_packages/wallets/package.json`, `legacy_packages/react/src/wallet/ConnectWallet/screens/SwapTransactionsScreen.tsx`, `packages/thirdweb/src/react/web/ui/components/buttons.tsx`, `legacy_packages/auth/package.json`, `legacy_packages/react/src/components/basic.tsx`, `legacy_packages/storage/package.json`, `.vscode/settings.json`, `packages/thirdweb/src/react/web/ui/components/basic.tsx`, `legacy_packages/react-core/package.json`, `packages/thirdweb/src/react/web/ui/ConnectWallet/NetworkSelector.tsx`, `legacy_packages/react/src/wallet/ConnectWallet/NetworkSelector.tsx`, `legacy_packages/react/src/components/buttons.tsx`, `packages/react-native-adapter/package.json`, `legacy_packages/react/src/components/modalElements.tsx`, `packages/service-utils/package.json`, `legacy_packages/cli/package.json`, `apps/playground-web/src/icons/sdks/UnityIcon.tsx`, `legacy_packages/sdk/package.json`, `legacy_packages/react/package.json`, `apps/playground-web/src/icons/sdks/TypeScriptIcon.tsx`, `apps/playground-web/src/components/ui/button.tsx`, `packages/thirdweb/src/react/web/ui/ConnectWallet/Modal/ConnectEmbed.tsx`, `apps/playground-web/package.json`, `apps/playground-web/src/icons/sdks/SolidityIcon.tsx`, `package.json`, `apps/dashboard/package.json`, `apps/playground-web/src/icons/thirdweb.tsx`, `packages/thirdweb/package.json`, `apps/playground-web/src/icons/sdks/PythonIcon.tsx`, `apps/playground-web/src/icons/sdks/DotNetIcon.tsx`, `apps/playground-web/src/icons/sdks/GoIcon.tsx`, `apps/playground-web/src/icons/products/contracts/ContractBuildIcon.tsx`, `apps/playground-web/src/icons/products/payments/PaymentsNFTCheckoutIcon.tsx`, `apps/playground-web/src/icons/products/payments/PayIcon.tsx`, `apps/playground-web/src/icons/products/contracts/ContractPublishIcon.tsx`, `apps/playground-web/src/icons/products/wallets/WalletsAuthIcon.tsx`, `apps/playground-web/src/icons/products/contracts/ContractExploreIcon.tsx`, `apps/playground-web/src/icons/solutions/GamingIcon.tsx`, `apps/playground-web/src/icons/products/wallets/WalletsConnectIcon.tsx`, `apps/playground-web/src/icons/products/contracts/ContractDeployIcon.tsx`, `apps/playground-web/src/icons/products/wallets/WalletsInAppIcon.tsx`, `apps/playground-web/src/icons/products/contracts/ContractInteractIcon.tsx`, `apps/playground-web/src/icons/products/infra/InfraRPCIcon.tsx`, `apps/playground-web/src/icons/products/infra/InfraStorageIcon.tsx`, `apps/playground-web/src/icons/products/payments/PaymentsSponsoredIcon.tsx`, `apps/playground-web/src/icons/products/wallets/WalletsSmartIcon.tsx`, `apps/playground-web/src/icons/products/infra/InfraEngineIcon.tsx`, `apps/playground-web/src/components/ui/dropdown-menu.tsx`, `apps/playground-web/src/icons/sdks/ReactIcon.tsx`, `pnpm-lock.yaml`

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

<!-- end pr-codex -->
2024-06-20 02:01:29 +00:00
gregfromstl 29a643df2c fix(wallets): always pass a string for in-app wallet signatures (#3411)
### TL;DR

Updated the in-app wallet's `signMessage` function to properly handle different message formats. The function now decodes a message from a string, a `Uint8Array`, or a hex format into a string before signing.

### What changed?

- Imported `uint8ArrayToString` and `hexToString` utilities.
- Updated the `signMessage` method to decode messages from multiple formats (string, `Uint8Array`, and hex).
- Adjusted the type annotations and added in-line comments for clarity.

### How to test?

1. Attempt to sign a message with the in-app wallet using different message formats.
2. Verify that the message is correctly signed in each case without errors.

### Why make this change?

This update ensures that the in-app wallet can handle and correctly process various message formats, improving interoperability and user experience.

---

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on fixing hex-based signatures for in-app wallets by ensuring messages are properly decoded before signing.

### Detailed summary
- Fixed hex-based signatures for in-app wallets
- Added `uint8ArrayToString` import
- Updated `signMessage` method to handle different message types
- Ensured `message` parameter is always passed as a string for signing

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

<!-- end pr-codex -->
2024-06-20 01:32:14 +00:00
d88203a981 feat(react): add useWalletDetailsModal.open.onDisconnect prop to respond to disconnections (#3387)
Co-authored-by: Manan Tank <[email protected]>
Co-authored-by: Jonas Daniels <[email protected]>
2024-06-20 13:28:58 +12:00
gregfromstl 33777df88f fix(dashboard): can update image when no existing one (#3406)
### TL;DR
Fixes an issue where NFT image updates were not being applied if there was no existing image.

### What changed?
- Modified the `mint-form.tsx` to only disable the submit button if the form is not dirty and the image URL has not changed.

### How to test?
1. Open the mint form for an NFT without an existing image.
2. Attempt to update the image.
3. Ensure the submit button is enabled and the image update is successful.

### Why make this change?
This change ensures that users can update the image for NFTs that do not have an existing image without unnecessary restrictions.

---

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on fixing NFT image updates when no existing image is present.

### Detailed summary
- Updated `mint-form.tsx` to disable submit button only when form is dirty and image URL is the same as existing NFT image.

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

<!-- end pr-codex -->
2024-06-19 22:47:22 +00:00
kien-ngo 9f5d472797 More unit tests (#3354)
<!-- start pr-codex -->

## PR-Codex overview
This PR adds test cases for ERC721 minting and ERC1155 claiming extensions in the Thirdweb project.

### Detailed summary
- Added test cases for ERC721 `mintTo` extension
- Added test cases for ERC1155 `claimTo` extension
- Imported necessary functions and constants for testing

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

<!-- end pr-codex -->
2024-06-19 22:25:21 +00:00
Jonas Daniels 98d0afe7f6 [Chore] Add Vercel configuration for auto job cancelation in dashboard and playground-web apps (#3409) 2024-06-19 14:35:14 -07:00
kien-ngo 11423125fa Small typos in docs (#3405)
<!-- start pr-codex -->

## PR-Codex overview
This PR updates the method signature in `read-contract.ts` and adds an event filter in `useContractEvents.ts`.

### Detailed summary
- Updated method signature in `read-contract.ts` to include full function signature
- Added event filter for `tokensClaimedEvent` in `useContractEvents.ts`

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

<!-- end pr-codex -->
2024-06-19 21:13:54 +00:00
jnsdls 8ff1344332 [Feature] Add comprehensive CI workflow with build, lint, test, e2e, benchmark, and size jobs (#3407)
### TL;DR

This pull request updates the CI configuration and removes the merge group workflow triggers.

### What changed?

- Added new CI configuration file `.github/workflows/CI.yml` with enhanced jobs for building, linting, testing, and benchmarking.
- Removed merge group workflow triggers from the legacy CI file `.github/workflows/CI_legacy.yml`.

### How to test?

- Verify that the new CI workflow runs successfully on push and pull request events.
- Ensure all jobs (build, lint, test, e2e, benchmark, size) complete without errors.
- Check that merge group workflow triggers are no longer present in the legacy CI configuration.

### Why make this change?

This change aims to improve the CI process by adding more comprehensive job steps, including concurrency control and better separation of tasks. Removing the merge group triggers from the legacy CI helps to declutter and refine the workflow definitions.

---

<!-- start pr-codex -->

---

## PR-Codex overview
This PR updates the GitHub Actions workflow to enhance CI with new jobs, tests, and environment variables.

### Detailed summary
- Replaced legacy CI workflow with a new comprehensive CI workflow
- Added jobs for linting, testing, E2E testing, benchmarks, and bundle size reporting
- Updated triggers for push, pull requests, and workflow dispatch
- Added concurrency settings and environment variables
- Enhanced E2E testing with multiple package managers and bundlers
- Improved code coverage reporting with Codecov
- Enabled remote caching for faster workflows

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

<!-- end pr-codex -->
2024-06-19 20:51:32 +00:00
Manan Tank 65c8853b2b Dashboard: Fix AA configuration form not updated on APIKey change (#3400) 2024-06-19 12:00:22 -07:00
github-actions[bot] 316b99e39e chore(chains): update chains (#3401)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-06-19 10:52:03 -07:00
omahs 988e10e755 fix: typos (#3399)
Signed-off-by: omahs <[email protected]>
2024-06-19 10:51:41 -07:00
Jonas Daniels ba46653bef [Chore] Add labeler workflow configuration (#3402) 2024-06-19 10:05:54 -07:00
github-actions[bot] 3318e58dc3 chore(chains): update chains (#3389)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-06-19 09:51:44 -07:00
Jonas Daniels 00f3fb506f testing deployment (#3398) 2024-06-19 03:43:05 -07:00
Jonas Daniels 5c6f7387e0 [Chore] Update auto import file exclude patterns for TypeScript in .vscode settings (#3390) 2024-06-19 02:31:02 -07:00
jnsdls db6d2520e7 [Dependencies] Chore: Update dependencies and refactor code consistency (#3392)
The PR primarily focuses on updating the versions of several npm dependencies, notably React, React-DOM, and Zod, ensuring compatibility with their latest major versions. Additionally, various code enhancements were made for better TypeScript type usage, specifically replacing manual type declarations with more precise React types. Unnecessary imports and redundant code blocks were removed to streamline the codebase.

### TL;DR
Updated package versions for React, React-DOM, and Zod, improved TypeScript type safety, and cleaned up the codebase.

### What changed?
- Updated React and React-DOM versions from specific sub-versions to any version within major version 18.
- Changed Zod versioning from specific sub-versions to any version within major version 3.
- Replaced manual React type declarations with standard React types for components and props.
- Removed unnecessary imports and redundant type definitions.
- Updated the `pnpm-lock.yaml` file accordingly.

### How to test?
1. Run `pnpm install` to update the dependencies to their latest versions.
2. Run the test suite to ensure all unit tests pass with the new versions.
3. Manually test the application to verify that no runtime issues occur due to these dependency upgrades.
4. Pay special attention to areas that heavily rely on React types and Zod schemas.

### Why make this change?
To ensure the codebase remains up-to-date with the latest versions of crucial libraries and to improve overall type safety and code quality.

---

<!-- start pr-codex -->

---

## PR-Codex overview
This PR updates package versions, switches linter settings, and refactors type imports in various files.

### Detailed summary
- Updated linter settings to disable `enabled` flag in `biome.json`
- Updated package versions in multiple `package.json` files
- Refactored type imports in various files to use `^18` version for `@types/react`

> 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-06-19 09:24:03 +00:00
Jonas Daniels b20a6080db Merge pull request #3391 from thirdweb-dev/merge-dashboard
[massive] - dashboard
2024-06-18 23:28:35 -07:00
Jonas Daniels 46b2482511 Merge branch 'main' into merge-dashboard 2024-06-18 23:27:33 -07:00
Jonas Daniels 3586394d34 update react version 2024-06-18 23:17:38 -07:00
Jonas Daniels 1b927e7d93 move dashboard into js monorepo 2024-06-18 22:42:01 -07:00
gregfromstl ff75450c11 feat(wallets): add watchAsset functionality to wallet API (#3388)
### TL;DR
This pull request introduces the `watchAsset` functionality to the injected wallets in the thirdweb package.

### What changed?
A new method `watchAsset` is added to the `createAccount` function and `Account` type. This method allows users to add an ERC-20 asset to their wallet's watchlist.

### How to test?
1. Create an account using the `createAccount` function.
2. Call the `watchAsset` method with appropriate parameters to watch an ERC-20 asset.
3. Verify if the asset is added to the wallet's watchlist.

### Why make this change?
This change is made to enhance the functionality of the injected wallets by allowing users to easily add ERC-20 assets to their watchlist, improving the user experience and making asset management more convenient.

---

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to add `watchAsset` support in injected wallet accounts.

### Detailed summary
- Added `watchAsset` method in injected wallet accounts
- Defined `WatchAssetParams` type for asset watching
- Provided example usage for `watchAsset` method

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

<!-- end pr-codex -->
2024-06-19 03:15:45 +00:00
jnsdls 1ad5bf5005 chore: update package.json dependencies (#2687)
<!-- start pr-codex -->

## PR-Codex overview
This PR updates various dependencies across the project, including `@apollo/client`, `@thirdweb-dev/react`, `@thirdweb-dev/sdk`, `@thirdweb-dev/wallets`, `graphql`, and `@typescript-eslint/parser`.

### Detailed summary
- Updated `@apollo/client` to version `3.10.5`
- Updated `@thirdweb-dev/react` to version `4.9.4`
- Updated `@thirdweb-dev/react-core` to version `4.9.4`
- Updated `@thirdweb-dev/sdk` to version `4.0.99`
- Updated `@thirdweb-dev/wallets` to version `2.5.39`
- Updated `graphql` to version `16.8.2`
- Updated `@typescript-eslint/parser` to version `7.13.1`

> 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-06-19 02:59:29 +00:00
jnsdls ea0ae2231e feat: integrate theme synchronization using useTheme from next-themes (#2688)
<!-- start pr-codex -->

## PR-Codex overview
The focus of this PR is to add a `SyncTheme` component to keep the theme in sync with `useTheme` in the `TailwindTheme` function.

### Detailed summary
- Added `SyncTheme` component to sync theme with `useTheme`
- Utilized `useEffect` to update theme based on `colorMode`
- Set initial theme based on `colorMode`

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

<!-- end pr-codex -->
2024-06-19 02:46:22 +00:00
gregfromstl c238caf4c5 feat(connect-wallet): support custom chains in WalletConnect (#3372)
Allows use of chains not explicitly specified on the connecting app but specified by the receiver.

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to enhance the Wallet Connect feature by adding support for custom chains and improving session handling.

### Detailed summary
- Added support for custom chains in Wallet Connect feature.
- Enhanced session handling with custom chains in session proposals.
- Updated session proposal tests to include custom chains.
- Improved chain handling in session proposal functions.

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

<!-- end pr-codex -->
2024-06-19 02:40:14 +00:00
gregfromstl d931436036 feat(wallets): add support for wallet_addEthereumChain and wallet_switchEthereumChain (#3371)
<!-- start pr-codex -->

## PR-Codex overview
This PR enhances the WalletConnect functionality by adding support for switching Ethereum chains and adding new chains.

### Detailed summary
- Updated `sign.ts` to include raw message in `account.signMessage`
- Added `checksumAddress` validation in `validateAccountAddress`
- Implemented `handleSwitchChain` for switching Ethereum chains
- Added support for `wallet_addEthereumChain` and `wallet_switchEthereumChain` requests
- Updated types and interfaces for wallet interactions

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

<!-- end pr-codex -->
2024-06-19 02:40:09 +00:00
gregfromstl 9266254199 fix(wallets): cache walletConnectClient (#3310)
### TL;DR

Implemented a caching mechanism for WalletConnect clients to improve performance and added error messaging for failed connections.

### What changed?

- Introduced a caching mechanism for WalletConnect clients using a WeakMap to store instances.
- Removed redundant console.log error message in WalletConnectReceiverScreen.tsx.
- Updated disconnect message to "Disconnected".

### How to test?

1. Trigger multiple WalletConnect sessions and ensure that the client is retrieved from the cache after the initial creation.
2. Test error handling by forcing a connection failure and verifying that the error message is set correctly.
3. Disconnect a WalletConnect session and ensure the disconnect message is accurate.

### Why make this change?

This change enhances the performance by reducing redundant WalletConnect client creations and improves the clarity of error and disconnect messages.

<!-- start pr-codex -->

---

## PR-Codex overview
This PR optimizes WalletConnect client caching and error handling.

### Detailed summary
- Added caching mechanism for WalletConnect clients
- Improved error message handling during connection establishment
- Updated disconnect message to "Disconnected"

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

<!-- end pr-codex -->
2024-06-19 02:40:04 +00:00
gregfromstl ac5bb56a2d refactor: update icon usage in ConnectWallet component (#3309)
Replace usage of WalletIcon with new and more specific wallet and coin icons. New icons include GenericWalletIcon, OutlineWalletIcon, and CoinsIcon.

<!-- start pr-codex -->

---

## PR-Codex overview
This PR updates the Connect Modal icons in the `thirdweb` package.

### Detailed summary
- Renamed `WalletIcon` component to `GenericWalletIcon`
- Added new `CoinsIcon` component
- Added `OutlineWalletIcon` component
- Updated icon imports in various files

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

<!-- end pr-codex -->
2024-06-19 02:39:59 +00:00
gregfromstl b5a71a3eed feat(react): Adds WalletConnect Receiver (#3294)
### TL;DR

Simplified the `ConnectWallet` modal by removing unused icons/components and migrate `wallet-connect` functionalities to receiver.

### What changed?
- Updated wallet-connect imports to use the `receiver` directory instead of the `consumer` directory.
- Removed unused icons and components (`ShuffleIcon`, `KeyIcon`, `SwitchMetamaskAccount`, etc.) from `Details.tsx`.
- Added new `ManageWalletScreen` and `WalletConnectReceiverScreen` components.
- Refactored `MenuButton` into a separate component file.

### How to test?
1. Open the `ConnectWallet` modal.
2. Ensure that the removed components are no longer present in the UI.
3. Test Manage Wallet functionalities by navigating to the new `ManageWalletScreen` and `WalletConnectReceiverScreen`.
4. Verify that wallet-connect functionalities work seamlessly after the migration.

### Why make this change?
To streamline the UI by removing redundant elements and improving the organization of wallet-connect functionalities.

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to refactor the wallet connect functionality, introduce new screens, and improve UI components.

### Detailed summary
- Added new `WalletDetailsModalScreen` options
- Updated imports for wallet connect files
- Modified UI components for better user experience
- Introduced new icons and screens for wallet management

> The following files were skipped due to too many changes: `packages/thirdweb/src/react/web/ui/ConnectWallet/screens/ManageWalletScreen.tsx`, `packages/thirdweb/src/react/web/ui/ConnectWallet/screens/WalletConnectReceiverScreen.tsx`, `packages/thirdweb/src/react/web/ui/ConnectWallet/Details.tsx`

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

<!-- end pr-codex -->
2024-06-19 00:59:03 +00:00
github-actions[bot] 991cb72bdb chore(chains): update chains (#3382)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-06-18 16:12:55 -07:00
Alec AnanianandManan Tank 8d7f8db39a fix(react): return type on useConnectModal.connect (#3385)
Co-authored-by: Manan Tank <[email protected]>
2024-06-19 11:07:43 +12:00
kien-ngo 4484fd02bb Edition Drop extension: updateMetadata + few others (#3376)
<!-- start pr-codex -->

## PR-Codex overview
This PR adds an `updateMetadata` extension for Edition Drop (DropERC1155).

### Detailed summary
- Added `updateMetadata` extension for DropERC1155
- Updated generated files for BatchMetadataUpdate event
- Added functions for decoding and calling `getBaseURICount`
- Implemented logic for updating metadata in ERC1155 collections

> The following files were skipped due to too many changes: `packages/thirdweb/src/extensions/erc1155/drops/write/updateMetadata.test.ts`, `packages/thirdweb/src/extensions/erc1155/__generated__/BatchMintMetadata/read/getBatchIdAtIndex.ts`, `packages/thirdweb/src/extensions/erc1155/__generated__/DropERC1155/write/freezeBatchBaseURI.ts`, `packages/thirdweb/src/extensions/erc1155/__generated__/DropERC1155/write/updateBatchBaseURI.ts`, `packages/thirdweb/src/extensions/erc1155/__generated__/DropERC1155/write/setMaxTotalSupply.ts`, `packages/thirdweb/src/extensions/erc1155/__generated__/DropERC1155/write/setSaleRecipientForToken.ts`

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

<!-- end pr-codex -->
2024-06-18 23:02:35 +00:00
Jonas Daniels e314363ec4 [Chore] Remove pnpm-lock.yaml file from playground-web app (#3383) 2024-06-18 14:28:00 -07:00
gregfromstl 48569fb15e fix(wallets): fix walletconnect mobile modal (#3386)
<!-- start pr-codex -->

## PR-Codex overview
This PR focuses on fixing the mobile Wallet Connect connection flow by ensuring the correct display of the QR modal and wallet information.

### Detailed summary
- Updated condition to show QR modal based on session request handler
- Added check to exclude Wallet Connect wallet from default session handler usage

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

<!-- end pr-codex -->
2024-06-18 21:24:32 +00:00
jnsdls 6296bc1ec1 refactor: remove unused VerifiedIcon and clean up related code (#2686)
### TL;DR

This pull request removes support for the verification of chains across the dashboard layouts and chain list components.

### What changed?

- Deleted all instances of the `VerifiedIcon` and its corresponding logic from the dashboard layout and chain list components.

### How to test?

1. Navigate to the dashboard layout.
2. Ensure no verified badge or icon appears for any chain.
3. Check the chain list components to confirm they no longer display the verified icon or associated logic.

### Why make this change?

This change simplifies the UI by removing the verified chain feature, which is no longer in use.

---

<!-- start pr-codex -->

## PR-Codex overview
The focus of this PR is to remove the `VerifiedIcon` component and related logic from chain-related components.

### Detailed summary
- Removed `VerifiedIcon` component import and references from `layout.tsx`, `chainlist-row.tsx`, and `chainlist-card.tsx`
- Updated conditional rendering logic related to `VerifiedIcon` in `chainlist-row.tsx` and `chainlist-card.tsx`

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

<!-- end pr-codex -->
2024-06-18 21:18:08 +00:00
MananTank 85b12c7a69 Fix React warning when clicking copy address button (#3384)
<!-- start pr-codex -->

## PR-Codex overview
This PR fixes a React warning and layout shift issue when clicking the copy address button.

### Detailed summary
- Introduces a `showCheckIcon` variable to handle showing the check icon conditionally based on `hasCopied` state
- Updates the rendering logic inside the `CopyIcon` component to address the React warning and layout shift issue

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

<!-- end pr-codex -->
2024-06-18 20:54:02 +00:00