10 Commits
Author SHA1 Message Date
MananTank 783e448e2e Stricter correctness rules in biome (#4216)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

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

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

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

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

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

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

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

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

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

<!-- end pr-codex -->
2024-08-21 01:11:23 +00:00
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
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
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
Joaquim VergesandGitHub 3a1fd985fc Align inAppWallet secret sharing implementation with web and previous RN SDK (#3271) 2024-06-11 23:45:10 +00:00
5031e44d92 Adds delayed reveal extensions for ERC721 contracts (#3127)
Co-authored-by: Jonas Daniels <[email protected]>
2024-05-23 23:09:02 +00:00
Jonas DanielsandGitHub 9d46fce50f extensions(permissions): add support for initial permissions (#2757) 2024-04-11 16:47:30 -07:00
Jonas DanielsandGitHub 1d4fdd6753 feat: Add chain Metadata type (#2731) 2024-04-08 16:42:03 -07:00
Jonas DanielsandGitHub 703cb6ae3c chore: update dependencies (#2701) 2024-04-07 10:09:20 -07:00