2296 Commits
Author SHA1 Message Date
joaquim-verges c6741b42cd feat(pay): add async ERC20 value property to transaction options (#3661)
### TL;DR

This PR introduces support for ERC20 tokens in the transaction flow, allowing users to seamlessly interact with contracts that require ERC20 token payments.

### What changed?

1. Added ERC20 token handling in the `useSendTransaction` hook to check balance and prompt users to buy ERC20 if needed.
2. Integrated ERC20 token fields, such as `erc20Value`, into the transaction preparation and cost estimation processes.
3. Updated various contract-writing scripts to include `erc20Value` overrides where necessary.
4. Enhanced the UI in `TxModal` and `BuyScreen` to display and process ERC20 token transactions.
5. Added tests for ERC20 token transactions in the `drop721.test.ts` file.
6. Extended documentation and examples to include ERC20 token use cases in transaction flows.

### How to test?

1. Run the unit tests in the `drop721.test.ts` file to ensure ERC20 transactions are correctly processed.
2. Use the `useSendTransaction` hook in a sample component and attempt transactions with both native and ERC20 tokens.
3. Verify that the ERC20 token purchase prompt appears when balance is insufficient.

### Why make this change?

Adding ERC20 support enhances the flexibility and functionality of the transaction flow, making it easier for users to interact with a wider range of smart contracts that require different types of token payments.

---

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on handling ERC20 transaction values in Pay components.

### Detailed summary
- Added `tokenDecimals` in `types.ts`
- Modified `title` in `PayEmbed.tsx` and `transferBatch.ts`
- Added `overrides` in `transfer.ts`, `transferFrom.ts`, `approve.ts`
- Added `erc20Value` in various transaction files
- Updated `prepare-transaction.ts` with `erc20Value`
- Added `erc20Value` in generated files for different ERC20 transactions

> The following files were skipped due to too many changes: `packages/thirdweb/src/extensions/common/__generated__/IMulticall/write/multicall.ts`, `packages/thirdweb/src/extensions/erc20/__generated__/IMintableERC20/write/mintTo.ts`, `packages/thirdweb/src/extensions/erc721/__generated__/IBurnableERC721/write/burn.ts`, `packages/thirdweb/src/extensions/erc721/__generated__/IStaking721/write/withdraw.ts`, `packages/thirdweb/src/extensions/farcaster/__generated__/IBundler/write/register.ts`, `packages/thirdweb/src/extensions/airdrop/__generated__/Airdrop/write/airdropERC20.ts`, `packages/thirdweb/src/extensions/airdrop/__generated__/Airdrop/write/claimERC1155.ts`, `packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/write/addStake.ts`, `packages/thirdweb/src/extensions/erc721/__generated__/IDelayedReveal/write/reveal.ts`, `packages/thirdweb/src/extensions/erc721/__generated__/IERC721A/write/transferFrom.ts`, `packages/thirdweb/src/extensions/farcaster/__generated__/IKeyGateway/write/addFor.ts`, `packages/thirdweb/src/extensions/marketplace/__generated__/IMarketplace/write/buy.ts`, `packages/thirdweb/src/extensions/airdrop/__generated__/Airdrop/write/airdropERC721.ts`, `packages/thirdweb/src/extensions/airdrop/__generated__/Airdrop/write/setMerkleRoot.ts`, `packages/thirdweb/src/extensions/erc1155/__generated__/IBurnableERC1155/write/burn.ts`, `packages/thirdweb/src/extensions/erc1155/__generated__/IStaking1155/write/withdraw.ts`, `packages/thirdweb/src/extensions/erc20/__generated__/IBurnableERC20/write/burnFrom.ts`, `packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/write/depositTo.ts`, `packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/write/handleOps.ts`, `packages/thirdweb/src/extensions/erc721/__generated__/IClaimableERC721/write/claim.ts`, `packages/thirdweb/src/extensions/erc721/__generated__/IMintableERC721/write/mintTo.ts`, `packages/thirdweb/src/extensions/farcaster/__generated__/IIdGateway/write/register.ts`, `packages/thirdweb/src/extensions/farcaster/__generated__/IIdRegistry/write/recover.ts`, `packages/thirdweb/src/extensions/farcaster/__generated__/IKeyRegistry/write/remove.ts`, `packages/thirdweb/src/extensions/marketplace/__generated__/IOffers/write/makeOffer.ts`, `packages/thirdweb/src/extensions/airdrop/__generated__/Airdrop/write/airdropERC1155.ts`, `packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/write/withdrawTo.ts`, `packages/thirdweb/src/extensions/farcaster/__generated__/IIdRegistry/write/transfer.ts`, `packages/thirdweb/src/extensions/marketplace/__generated__/IMarketplace/write/offer.ts`, `packages/thirdweb/src/extensions/modular/__generated__/ModularCore/write/grantRoles.ts`, `packages/thirdweb/src/extensions/prebuilts/__generated__/DropERC20/write/initialize.ts`, `packages/thirdweb/src/extensions/uniswap/__generated__/ISwapRouter/write/exactInput.ts`, `packages/thirdweb/src/extensions/erc1155/__generated__/IClaimableERC1155/write/claim.ts`, `packages/thirdweb/src/extensions/erc1155/__generated__/IMintableERC1155/write/mintTo.ts`, `packages/thirdweb/src/extensions/erc4337/__generated__/IAccount/write/validateUserOp.ts`, `packages/thirdweb/src/extensions/erc721/__generated__/IDrop/write/setClaimConditions.ts`, `packages/thirdweb/src/extensions/erc721/__generated__/INFTMetadata/write/setTokenURI.ts`, `packages/thirdweb/src/extensions/farcaster/__generated__/IStorageRegistry/write/rent.ts`, `packages/thirdweb/src/extensions/marketplace/__generated__/IOffers/write/acceptOffer.ts`, `packages/thirdweb/src/extensions/marketplace/__generated__/IOffers/write/cancelOffer.ts`, `packages/thirdweb/src/extensions/modular/__generated__/ModularCore/write/revokeRoles.ts`, `packages/thirdweb/src/extensions/prebuilts/__generated__/DropERC721/write/initialize.ts`, `packages/thirdweb/src/extensions/prebuilts/__generated__/TokenERC20/write/initialize.ts`, `packages/thirdweb/src/extensions/uniswap/__generated__/IQuoter/write/quoteExactInput.ts`, `packages/thirdweb/src/extensions/uniswap/__generated__/ISwapRouter/write/exactOutput.ts`, `packages/thirdweb/src/extensions/erc1155/__generated__/INFTMetadata/write/setTokenURI.ts`, `packages/thirdweb/src/extensions/erc20/__generated__/IAirdropERC20/write/airdropERC20.ts`, `packages/thirdweb/src/extensions/erc721/__generated__/IERC721A/write/safeTransferFrom.ts`, `packages/thirdweb/src/extensions/farcaster/__generated__/IIdGateway/write/registerFor.ts`, `packages/thirdweb/src/extensions/farcaster/__generated__/IIdRegistry/write/recoverFor.ts`, `packages/thirdweb/src/extensions/farcaster/__generated__/IKeyRegistry/write/removeFor.ts`, `packages/thirdweb/src/extensions/multicall3/__generated__/IMulticall3/write/aggregate.ts`, `packages/thirdweb/src/extensions/prebuilts/__generated__/DropERC1155/write/initialize.ts`, `packages/thirdweb/src/extensions/prebuilts/__generated__/Marketplace/write/initialize.ts`, `packages/thirdweb/src/extensions/prebuilts/__generated__/TokenERC721/write/initialize.ts`, `packages/thirdweb/src/extensions/thirdweb/__generated__/IRulesEngine/write/deleteRule.ts`, `packages/thirdweb/src/extensions/uniswap/__generated__/IQuoter/write/quoteExactOutput.ts`, `packages/thirdweb/src/extensions/erc1155/__generated__/IERC1155/write/safeTransferFrom.ts`, `packages/thirdweb/src/extensions/erc1155/__generated__/IStaking1155/write/claimRewards.ts`, `packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/write/withdrawStake.ts`, `packages/thirdweb/src/extensions/erc721/__generated__/IERC721A/write/setApprovalForAll.ts`, `packages/thirdweb/src/extensions/farcaster/__generated__/IIdRegistry/write/transferFor.ts`, `packages/thirdweb/src/extensions/modular/__generated__/ModularCore/write/renounceRoles.ts`, `packages/thirdweb/src/extensions/multicall3/__generated__/IMulticall3/write/aggregate3.ts`, `packages/thirdweb/src/extensions/prebuilts/__generated__/TokenERC1155/write/initialize.ts`, `packages/thirdweb/src/extensions/airdrop/__generated__/Airdrop/write/airdropNativeToken.ts`, `packages/thirdweb/src/extensions/common/__generated__/IRoyaltyPayments/write/getRoyalty.ts`, `packages/thirdweb/src/extensions/erc1155/__generated__/IBurnableERC1155/write/burnBatch.ts`, `packages/thirdweb/src/extensions/erc1155/__generated__/IERC1155/write/setApprovalForAll.ts`, `packages/thirdweb/src/extensions/erc20/__generated__/IAirdropERC20Claimable/write/claim.ts`, `packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/write/incrementNonce.ts`, `packages/thirdweb/src/extensions/permissions/__generated__/IPermissions/write/grantRole.ts`, `packages/thirdweb/src/extensions/thirdweb/__generated__/ITWMultichainRegistry/write/add.ts`, `packages/thirdweb/src/extensions/uniswap/__generated__/IUniswapV3Factory/write/setOwner.ts`, `packages/thirdweb/src/extensions/erc20/__generated__/IDropERC20/write/setClaimConditions.ts`, `packages/thirdweb/src/extensions/erc721/__generated__/DropERC721/write/setMaxTotalSupply.ts`, `packages/thirdweb/src/extensions/erc721/__generated__/IAirdropERC721/write/airdropERC721.ts`, `packages/thirdweb/src/extensions/multicall3/__generated__/IMulticall3/write/tryAggregate.ts`, `packages/thirdweb/src/extensions/permissions/__generated__/IPermissions/write/revokeRole.ts`, `packages/thirdweb/src/extensions/erc1155/__generated__/IDrop1155/write/setClaimConditions.ts`, `packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/write/getSenderAddress.ts`, `packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/write/simulateHandleOp.ts`, `packages/thirdweb/src/extensions/erc721/__generated__/DropERC721/write/freezeBatchBaseURI.ts`, `packages/thirdweb/src/extensions/erc721/__generated__/DropERC721/write/updateBatchBaseURI.ts`, `packages/thirdweb/src/extensions/erc721/__generated__/IAirdropERC721Claimable/write/claim.ts`, `packages/thirdweb/src/extensions/erc721/__generated__/INFTStake/write/depositRewardTokens.ts`, `packages/thirdweb/src/extensions/farcaster/__generated__/IStorageRegistry/write/batchRent.ts`, `packages/thirdweb/src/extensions/marketplace/__generated__/IMarketplace/write/acceptOffer.ts`, `packages/thirdweb/src/extensions/modular/__generated__/ModularCore/write/installExtension.ts`, `packages/thirdweb/src/extensions/uniswap/__generated__/ISwapRouter/write/exactInputSingle.ts`, `packages/thirdweb/src/extensions/uniswap/__generated__/IUniswapV3Factory/write/createPool.ts`, `packages/thirdweb/src/extensions/common/__generated__/IRoyalty/write/setDefaultRoyaltyInfo.ts`, `packages/thirdweb/src/extensions/erc1155/__generated__/DropERC1155/write/setMaxTotalSupply.ts`, `packages/thirdweb/src/extensions/erc20/__generated__/ITokenStake/write/depositRewardTokens.ts`, `packages/thirdweb/src/extensions/erc4337/__generated__/IAccountFactory/write/createAccount.ts`, `packages/thirdweb/src/extensions/erc4337/__generated__/IAccountFactory/write/onSignerAdded.ts`, `packages/thirdweb/src/extensions/erc721/__generated__/INFTStake/write/withdrawRewardTokens.ts`, `packages/thirdweb/src/extensions/marketplace/__generated__/IMarketplace/write/closeAuction.ts`, `packages/thirdweb/src/extensions/modular/__generated__/IModularCore/write/installExtension.ts`, `packages/thirdweb/src/extensions/modular/__generated__/ModularCore/write/transferOwnership.ts`, `packages/thirdweb/src/extensions/permissions/__generated__/IPermissions/write/renounceRole.ts`, `packages/thirdweb/src/extensions/thirdweb/__generated__/ITWMultichainRegistry/write/remove.ts`, `packages/thirdweb/src/extensions/uniswap/__generated__/IQuoter/write/quoteExactInputSingle.ts`, `packages/thirdweb/src/extensions/uniswap/__generated__/ISwapRouter/write/exactOutputSingle.ts`, `packages/thirdweb/src/extensions/common/__generated__/IPlatformFee/write/setPlatformFeeInfo.ts`, `packages/thirdweb/src/extensions/common/__generated__/IRoyalty/write/setRoyaltyInfoForToken.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__/IAirdropERC1155/write/airdropERC1155.ts`, `packages/thirdweb/src/extensions/erc1155/__generated__/IAirdropERC1155Claimable/write/claim.ts`, `packages/thirdweb/src/extensions/erc1155/__generated__/IERC1155/write/safeBatchTransferFrom.ts`, `packages/thirdweb/src/extensions/erc20/__generated__/ITokenStake/write/withdrawRewardTokens.ts`, `packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/write/simulateValidation.ts`, `packages/thirdweb/src/extensions/marketplace/__generated__/IMarketplace/write/createListing.ts`, `packages/thirdweb/src/extensions/marketplace/__generated__/IMarketplace/write/updateListing.ts`, `packages/thirdweb/src/extensions/modular/__generated__/ModularCore/write/uninstallExtension.ts`, `packages/thirdweb/src/extensions/multicall3/__generated__/IMulticall3/write/aggregate3Value.ts`, `packages/thirdweb/src/extensions/prebuilts/__generated__/OpenEditionERC721/write/initialize.ts`, `packages/thirdweb/src/extensions/uniswap/__generated__/IQuoter/write/quoteExactOutputSingle.ts`, `packages/thirdweb/src/extensions/common/__generated__/IContractMetadata/write/setContractURI.ts`, `packages/thirdweb/src/extensions/erc4337/__generated__/IAccountFactory/write/onSignerRemoved.ts`, `packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/write/handleAggregatedOps.ts`, `packages/thirdweb/src/extensions/erc721/__generated__/IERC721Receiver/write/onERC721Received.ts`, `packages/thirdweb/src/extensions/marketplace/__generated__/IMarketplace/write/setContractURI.ts`, `packages/thirdweb/src/extensions/modular/__generated__/IModularCore/write/uninstallExtension.ts`, `packages/thirdweb/src/extensions/common/__generated__/IRoyaltyPayments/write/setRoyaltyEngine.ts`, `packages/thirdweb/src/extensions/erc721/__generated__/ISharedMetadata/write/setSharedMetadata.ts`, `packages/thirdweb/src/extensions/multicall3/__generated__/IMulticall3/write/blockAndAggregate.ts`, `packages/thirdweb/src/extensions/airdrop/__generated__/Airdrop/write/airdropERC20WithSignature.ts`, `packages/thirdweb/src/extensions/erc1155/__generated__/IEditionStake/write/depositRewardTokens.ts`, `packages/thirdweb/src/extensions/marketplace/__generated__/IDirectListings/write/cancelListing.ts`, `packages/thirdweb/src/extensions/marketplace/__generated__/IDirectListings/write/createListing.ts`, `packages/thirdweb/src/extensions/marketplace/__generated__/IDirectListings/write/updateListing.ts`, `packages/thirdweb/src/extensions/marketplace/__generated__/IEnglishAuctions/write/bidInAuction.ts`, `packages/thirdweb/src/extensions/thirdweb/__generated__/IRulesEngine/write/createRuleThreshold.ts`, `packages/thirdweb/src/extensions/thirdweb/__generated__/IThirdwebContract/write/setContractURI.ts`, `packages/thirdweb/src/extensions/uniswap/__generated__/IUniswapV3Factory/write/enableFeeAmount.ts`, `packages/thirdweb/src/extensions/airdrop/__generated__/Airdrop/write/airdropERC721WithSignature.ts`, `packages/thirdweb/src/extensions/erc1155/__generated__/IERC1155Receiver/write/onERC1155Received.ts`, `packages/thirdweb/src/extensions/erc1155/__generated__/IEditionStake/write/withdrawRewardTokens.ts`, `packages/thirdweb/src/extensions/erc4337/__generated__/IPaymaster/write/validatePaymasterUserOp.ts`, `packages/thirdweb/src/extensions/marketplace/__generated__/IDirectListings/write/buyFromListing.ts`, `packages/thirdweb/src/extensions/marketplace/__generated__/IEnglishAuctions/write/cancelAuction.ts`, `packages/thirdweb/src/extensions/marketplace/__generated__/IEnglishAuctions/write/createAuction.ts`, `packages/thirdweb/src/extensions/airdrop/__generated__/Airdrop/write/airdropERC1155WithSignature.ts`, `packages/thirdweb/src/extensions/common/__generated__/IPrimarySale/write/setPrimarySaleRecipient.ts`, `packages/thirdweb/src/extensions/erc20/__generated__/ISignatureMintERC20/write/mintWithSignature.ts`, `packages/thirdweb/src/extensions/farcaster/__generated__/IIdRegistry/write/changeRecoveryAddress.ts`, `packages/thirdweb/src/extensions/marketplace/__generated__/IMarketplace/write/setPlatformFeeInfo.ts`, `packages/thirdweb/src/extensions/multicall3/__generated__/IMulticall3/write/tryBlockAndAggregate.ts`, `packages/thirdweb/src/extensions/thirdweb/__generated__/IContractPublisher/write/publishContract.ts`, `packages/thirdweb/src/extensions/erc1155/__generated__/DropERC1155/write/setSaleRecipientForToken.ts`, `packages/thirdweb/src/extensions/marketplace/__generated__/IMarketplace/write/cancelDirectListing.ts`, `packages/thirdweb/src/extensions/permissions/__generated__/IPermissionsEnumerable/write/grantRole.ts`, `packages/thirdweb/src/extensions/thirdweb/__generated__/IRulesEngine/write/setRulesEngineOverride.ts`, `packages/thirdweb/src/extensions/erc721/__generated__/ISharedMetadataBatch/write/setSharedMetadata.ts`, `packages/thirdweb/src/extensions/erc721/__generated__/ISignatureMintERC721/write/mintWithSignature.ts`, `packages/thirdweb/src/extensions/modular/__generated__/ModularCore/write/completeOwnershipHandover.ts`, `packages/thirdweb/src/extensions/permissions/__generated__/IPermissionsEnumerable/write/revokeRole.ts`, `packages/thirdweb/src/extensions/thirdweb/__generated__/IContractPublisher/write/unpublishContract.ts`, `packages/thirdweb/src/extensions/erc1155/__generated__/IPackVRFDirect/write/openPackAndClaimRewards.ts`, `packages/thirdweb/src/extensions/farcaster/__generated__/IIdRegistry/write/changeRecoveryAddressFor.ts`, `packages/thirdweb/src/extensions/thirdweb/__generated__/IRulesEngine/write/createRuleMultiplicative.ts`, `packages/thirdweb/src/extensions/erc1155/__generated__/IERC1155Receiver/write/onERC1155BatchReceived.ts`, `packages/thirdweb/src/extensions/erc1155/__generated__/ISignatureMintERC1155/write/mintWithSignature.ts`, `packages/thirdweb/src/extensions/farcaster/__generated__/IIdRegistry/write/transferAndChangeRecovery.ts`, `packages/thirdweb/src/extensions/permissions/__generated__/IPermissionsEnumerable/write/renounceRole.ts`, `packages/thirdweb/src/extensions/erc721/__generated__/ISharedMetadataBatch/write/deleteSharedMetadata.ts`, `packages/thirdweb/src/extensions/marketplace/__generated__/IEnglishAuctions/write/collectAuctionPayout.ts`, `packages/thirdweb/src/extensions/marketplace/__generated__/IEnglishAuctions/write/collectAuctionTokens.ts`, `packages/thirdweb/src/extensions/farcaster/__generated__/IIdRegistry/write/transferAndChangeRecoveryFor.ts`, `packages/thirdweb/src/extensions/marketplace/__generated__/IDirectListings/write/approveBuyerForListing.ts`, `packages/thirdweb/src/extensions/thirdweb/__generated__/IContractPublisher/write/setPublisherProfileUri.ts`, `packages/thirdweb/src/extensions/erc4337/__generated__/IAccountPermissions/write/setPermissionsForSigner.ts`, `packages/thirdweb/src/extensions/common/__generated__/IClaimConditionsSinglePhase/write/setClaimConditions.ts`, `packages/thirdweb/src/extensions/marketplace/__generated__/IDirectListings/write/approveCurrencyForListing.ts`, `packages/thirdweb/src/extensions/thirdweb/__generated__/IContractFactory/write/deployProxyByImplementation.ts`, `packages/thirdweb/src/extensions/erc20/write/sigMint.ts`, `packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/main/useBuyTxStates.ts`, `packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/BuyTxHistory.tsx`, `packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/TxDetailsScreen.tsx`, `packages/thirdweb/src/react/web/ui/ConnectWallet/TransactionsScreen.tsx`, `packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/FiatDetailsScreen.tsx`, `packages/thirdweb/src/extensions/erc20/write/deposit.ts`, `packages/thirdweb/src/utils/extensions/drops/get-claim-params.ts`, `packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/PayTokenIcon.tsx`, `packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/BuyScreen.tsx`, `packages/thirdweb/src/extensions/erc20/write/getApprovalForTransaction.ts`, `apps/playground-web/src/components/pay/transaction-button.tsx`, `packages/thirdweb/src/extensions/erc721/drop721.test.ts`, `packages/thirdweb/src/react/core/hooks/transaction/useSendTransaction.ts`, `packages/thirdweb/src/react/web/hooks/transaction/useSendTransaction.tsx`

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

<!-- end pr-codex -->
2024-07-19 01:57:06 +00:00
Jonas DanielsGitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>GitHub Action
26ca958b55 Version Packages (#3722)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: GitHub Action <[email protected]>
2024-07-19 07:16:46 +12:00
joaquim-verges 6cc3038298 fix(thirdweb): add optional 'from' in readContract method (#3735)
Fixes #3683

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to add an optional 'from' parameter in the `readContract()` function and update default max block wait times to 100 in various files.

### Detailed summary
- Added optional 'from' parameter in `readContract()`
- Updated default max block wait times to 10 in specific files
- Increased default max block wait times to 100 in other files

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

<!-- end pr-codex -->
2024-07-18 07:55:17 +00:00
Manan TankandGitHub db2cadfc4b Increased Transaction cost buffer for Pay Modal (#3730) 2024-07-18 07:54:10 +00:00
gregfromstl 6bda057306 feat(connect-wallet): add transaction history page to connect modal UI (#3718)
This pull request introduces new features and modifications to the transaction history feature within the connect modal UI. Key changes include:

- Addition of a transaction history page accessible from the connect modal's main menu, allowing users to view and manage their transaction history more effectively.
- Refactoring of transaction-related components to enhance code maintainability and readability. Specifically, renaming components related to 'BuyTxHistory' to 'PayTxHistory' to better reflect their functionality.
- Updates to locale files to include new translations for added labels such as 'payTransactions' and 'walletTransactions'.
- Integration of new navigation options within the connect modal, enabling seamless switching between different transaction views, including 'Fiat Transactions' and 'Wallet Transactions'.
- Ensuring that the transaction history page supports multiple languages, with updated English, Spanish, Japanese, and Vietnamese locale files.
- Improvements to UI components to ensure consistent styling and user experience across the transaction history pages.

These enhancements aim to provide users with an improved interface for managing their transaction histories, thereby enhancing overall user experience.

---

<!-- start pr-codex -->

---

## PR-Codex overview
This PR adds a transaction history page to the connect modal UI.

### Detailed summary
- Added transaction history page to connect modal UI
- Renamed "pending-tx" to "transactions"
- Updated text and components related to transactions and fiat transactions
- Reorganized file structure for transaction-related screens and components

> The following files were skipped due to too many changes: `packages/thirdweb/src/react/web/ui/ConnectWallet/TransactionsScreen.tsx`, `packages/thirdweb/src/react/web/ui/ConnectWallet/screens/WalletTransactionHistory.tsx`, `packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/tx-history/BuyTxHistory.tsx`

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

<!-- end pr-codex -->
2024-07-18 00:25:12 +00:00
0a5af48f70 Fix custom chain RPC not used if passed via chains prop (#3728)
Co-authored-by: MananTank <[email protected]>
2024-07-17 18:44:19 +00:00
joaquim-verges 05df89cb61 feat(smart): ERC20 paymaster support (#3719)
### TL;DR

Adds support for using an ERC20 paymaster in smart accounts. This includes functionality to check and approve ERC20 allowances as needed.

### What changed?

- Introduced support for ERC20 paymasters in smart accounts.
- Added logic to check and approve ERC20 allowances.
- Updated the `defaultTokens` list to include a new token for testing purposes.

### How to test?

1. Ensure that the smart account can interact with ERC20 paymasters.
2. Verify that the account approval for ERC20 paymasters works as expected.
3. Check that the default tokens list reflects the new token and can be utilized appropriately.

### Why make this change?

To enable smart accounts to use ERC20 tokens for paymaster functionalities, enhancing versatility and use-case scenarios for smart accounts.

---

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to add support for ERC20 paymaster for smart accounts.

### Detailed summary
- Added ERC20 paymaster support for smart accounts
- Implemented functions for approving ERC20 transactions
- Modified smart account creation to handle ERC20 paymasters

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

<!-- end pr-codex -->
2024-07-17 08:25:38 +00:00
Jonas DanielsGitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>GitHub Action
080903e3a9 Version Packages (#3675)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: GitHub Action <[email protected]>
2024-07-17 19:23:27 +12:00
Farhan KhwajaandGitHub c5b97407b0 updates: UserOp example + receipt retrieval function (#3712) 2024-07-16 22:32:35 -07:00
joaquim-verges 8e1a24a60e feat(pay): add recipient address support to PayEmbed (#3662)
<!-- start pr-codex -->

## PR-Codex overview
This PR adds the recipient address feature to PayEmbed and refactors recipient address handling in various components.

### Detailed summary
- Added recipient address to PayEmbed for sending purchased tokens
- Refactored handling of recipient address in different screens and hooks
- Updated logic for onramp and swap processes based on recipient address

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

<!-- end pr-codex -->
2024-07-16 15:24:08 +00:00
Joaquim VergesandGitHub aadbd33e9d fix(thirdweb): make client and chain mandatory in useWalletBalance (#3706) 2024-07-16 20:19:18 +12:00
joaquim-verges 1a09f46f24 feat(RN): support auth in React Native (#3708) 2024-07-16 05:55:45 +00:00
gregfromstl f8f6790da7 fix(auth): resolve typed data signatures issue in in-app wallet (#3707)
### TL;DR

- Added domain data for typed data signatures.
- Updated hooks and utilities to use `account` instead of `signer`.

### What changed?

- Modified `useRegistry.ts`, `hooks.ts`, and `utils.ts` to replace `signer` with `account` for signing transactions.
- Updated `in-app-account.ts` to correctly handle domain data for typed data signatures.

### How to test?

1. Deploy a contract using the dashboard and ensure that `account` is used correctly instead of `signer`.
2. Validate that typed data signatures are correctly generated in the in-app wallet.

### Why make this change?

To improve the accuracy and reliability of in-app wallet typed data signatures by ensuring the correct handling of domain data and consistent use of `account` across the application.

---

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to fix in-app wallet typed data signatures and optimize contract-related functions.

### Detailed summary
- Fixed in-app wallet typed data signatures
- Updated contract-related functions for better optimization and clarity

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

<!-- end pr-codex -->
2024-07-16 05:38:11 +00:00
gregfromstl 73c74f11d4 feat(airdrop): add fetchProofsERC methods for ERC20, ERC721, and ERC1155 (#3709)
This update introduces new methods for fetching proofs for ERCXX tokens (specifically ERC20, ERC721, and ERC1155). The methods `fetchProofsERC20`, `fetchProofsERC721`, and `fetchProofsERC1155` have been added to the airdrop extension. These methods allow users to retrieve claim Merkle proofs for the specified address and tokens, ensuring that users in the allowlist can claim their airdrop. Additionally, example usage and detailed docstrings have been included to guide developers on how to implement these methods in their projects.

---

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to add `fetchProofsERCXX` methods for ERC721, ERC20, and ERC1155 airdrop contracts.

### Detailed summary
- Added `fetchProofsERC721`, `fetchProofsERC20`, and `fetchProofsERC1155` methods
- Updated `claimERC20` to use `fetchProofsERC20`
- Added detailed documentation for each method
- Renamed `fetchProofsrERC20` to `fetchProofsERC20`

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

<!-- end pr-codex -->
2024-07-16 05:27:46 +00:00
kien-ngo 3479117b28 Add Vietnamese locale (#3681)
<!-- start pr-codex -->

## PR-Codex overview
This PR adds Vietnamese locale support for the ConnectButton components and updates various language files for the ConnectWallet feature.

### Detailed summary
- Added Vietnamese locale for ConnectButton components
- Updated language files for ConnectWallet screens and wallets with Vietnamese translations

> The following files were skipped due to too many changes: `packages/thirdweb/src/react/web/wallets/local/locale/vi.ts`, `packages/thirdweb/src/react/web/wallets/shared/locale/vi.ts`, `packages/thirdweb/src/react/web/ui/ConnectWallet/locale/vi.ts`

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

<!-- end pr-codex -->
2024-07-16 03:38:43 +00:00
joaquim-verges baec85f6b4 fix(thirdweb): update TransactionError constructor to correctly set message property (#3704) 2024-07-16 00:44:17 +00:00
iuwqyir d780bff72f new fields for usage event schema (#3692)
## Problem solved

Adds 2 new optional fields to usage event schema:
* evmRequestParams
* providerIp

Allows a new possible source for the event - `rpcV2`

## Changes made

- [x] service-utils: Update usage tracker schema

## 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 the schema for the usage tracker event in the `service-utils` package to include new fields `evmRequestParams` and `providerIp`.

### Detailed summary
- Added `evmRequestParams` field to the usage event schema
- Added `providerIp` field to the usage event schema

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

<!-- end pr-codex -->
2024-07-15 22:17:53 +00:00
Manan TankandGitHub 817a778a17 Fix Network Selector only showing 1 search result (#3694) 2024-07-16 01:48:17 +05:30
81751d3e08 Fix "add custom network" button not closing details modal (#3690)
Signed-off-by: Jonas Daniels <[email protected]>
Co-authored-by: Jonas Daniels <[email protected]>
2024-07-15 18:25:59 +00:00
7e416c0f6b Add queryOptions for useWalletBalance hook (#3688)
Co-authored-by: MananTank <[email protected]>
2024-07-15 18:07:46 +00:00
MananTank 6ad65e234c Add type prop for TransactionButton (#3689)
<!-- start pr-codex -->

## PR-Codex overview
The focus of this PR is to add a `type` prop for the `TransactionButton` component in the `thirdweb` package.

### Detailed summary
- Added `type` prop for `TransactionButton`
- Updated `TransactionButton` component to include `type` attribute for button element

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

<!-- end pr-codex -->
2024-07-15 17:38:47 +00:00
Joaquim VergesandGitHub a3fb673e50 fix(thirdweb): handle universal links on ios for coinbase wallet connection (#3677) 2024-07-15 14:30:47 +12:00
kien-ngo aee7aef76f Export getClaimParams for thirdweb Drop contracts (#3685)
Initially this is for interacting with other frameworks like frog.fm
Might be useful elsewhere idk

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on exporting a new utils method `getClaimParams` for thirdweb Drop contracts.

### Detailed summary
- Added export for `getClaimParams` method in `utils/extensions/drops/get-claim-params.js`
- Exported type `GetClaimParamsOptions` for thirdweb Drop contracts

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

<!-- end pr-codex -->
2024-07-15 02:10:44 +00:00
kien-ngo eabb2150a9 Add support for Zora1155 in ERC1155 > getOwned (#3659)
<!-- start pr-codex -->

## PR-Codex overview
The focus of this PR is to add support for Zora1155 in ERC1155 > getOwned.

### Detailed summary
- Added support for Zora1155 contract in ERC1155 > getOwned function
- Updated functions to handle Zora1155 contract methods
- Introduced new functions for Zora1155 contract interaction

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

<!-- end pr-codex -->
2024-07-12 21:09:23 +00:00
Joaquim VergesandGitHub 9f3fb7d1ee feat(smart): respect accountAddress override (#3673) 2024-07-13 05:59:47 +12:00
Jonas DanielsGitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>GitHub Action
a629ae53f1 Version Packages (#3658)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: GitHub Action <[email protected]>
2024-07-12 08:23:22 +12:00
joaquim-verges 3d14162a69 fix(core): correct extension detection (#3657)
<!-- start pr-codex -->

## PR-Codex overview
This PR focuses on fixing extension contract detection and enhancing ownership function detection for ERC721 contracts.

### Detailed summary
- Fixed extension contract detection in `detectExtension.ts`
- Added ownership function detection in `getOwnedNFTs.test.ts`
- Updated imports for test clients and contract utils

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

<!-- end pr-codex -->
2024-07-11 19:32:30 +00:00
Jonas DanielsGitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
12f829f4f1 Version Packages (#3643)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-07-12 06:44:19 +12:00
77d7dd135f fix(thirdweb): resolve autoconnect issue for phone number sign-in on React Native (#3656)
Co-authored-by: joaquim-verges <[email protected]>
2024-07-12 06:27:34 +12:00
Manan TankandGitHub 9dd7b4de79 Ensure account address is checksum encoded (#3655) 2024-07-11 23:25:26 +05:30
kien-ngo f239d09eae MediaRenderer: only render video poster if it's an image (#3642)
<!-- start pr-codex -->

## PR-Codex overview
This PR focuses on updating the `MediaRenderer` component to only render the video poster if it's an image.

### Detailed summary
- Updated `MediaRenderer` to conditionally render video poster based on MIME type
- Improved handling of poster rendering for better compatibility

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

<!-- end pr-codex -->
2024-07-10 03:44:29 +00:00
Jonas DanielsGitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>GitHub Action
133eae1384 Version Packages (#3635)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: GitHub Action <[email protected]>
2024-07-10 09:01:31 +12:00
joaquim-verges 02fff7d9e8 fix(thirdweb): loosen react native peer dep version restriction (#3637) 2024-07-09 17:36:29 +00:00
Manan TankandGitHub 4d24208099 Fix smart wallet connection not updating connection manager properly (#3634) 2024-07-09 21:34:52 +05:30
Jonas DanielsGitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
f8016071e2 Version Packages (#3612)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-07-09 19:34:41 +12:00
Joaquim VergesandGitHub 636fe40779 fix(storage): correct directory handling for mobile file uploads (#3633) 2024-07-09 19:21:00 +12:00
MananTank 41b9a53e35 Fix search in Network selector (#3630)
<!-- start pr-codex -->

## PR-Codex overview
The focus of this PR is to fix the search functionality in the Network Selector screen by optimizing chain queries and improving user experience.

### Detailed summary
- Added `useChainsQuery` and `useChainQuery` functions for chain data retrieval
- Improved search functionality by optimizing chain queries and handling loading states
- Updated dependencies and imports for better code organization

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

<!-- end pr-codex -->
2024-07-08 22:35:37 +00:00
Joaquim VergesandGitHub 95c9d3d924 chore(sdk): export smart wallet and bundler utilities (#3622) 2024-07-09 08:34:53 +12:00
gregfromstl 325416ea19 feat(chain): add Blast chain definition and export (#3619)
### TL;DR

Added a new chain definition for the 'Blast' chain.

### What changed?

- Added a new file `blast.ts` in `chain-definitions`
- Defined the Blast chain with ID 81457, name 'Blast', and native currency 'Ether'.
- Added Blastscan as the block explorer with corresponding URL and API URL.
- Updated `chains.ts` to export the `blast` chain.

### How to test?

1. Verify that the `blast.ts` file exists in the `chain-definitions` directory.
2. Check that the chain ID, name, and native currency are correctly defined.
3. Ensure the block explorer details are accurate.
4. Confirm that `chains.ts` exports the `blast` chain.

### Why make this change?

This change adds support for the Blast chain, which may be required for upcoming features or integrations. Including it ensures that the system can recognize and interact with the Blast blockchain.

---

<!-- start pr-codex -->

---

## PR-Codex overview
This PR adds the `blast` chain preset to `thirdweb` package.

### Detailed summary
- Added `blast` chain definition in `blast.ts`
- Exported `blast` in `chains.ts` for use in `thirdweb` package

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

<!-- end pr-codex -->
2024-07-08 19:41:36 +00:00
Manan TankandGitHub 5470dd9cf8 Pay UI improvements - Token amount rounding (#3621) 2024-07-09 00:38:42 +05:30
jnsdls 21aaec802f [Refactor] Improve MediaRenderer component and update token components (#3602)
<!-- start pr-codex -->

## PR-Codex overview
This PR enhances ERC20 functionality and token details display.

### Detailed summary
- Added `transferBatch()` extension to `erc20.ts`
- Updated `TokenDetails` component to include `chainId`
- Improved ERC20 contract handling in `useTxNotifications`
- Updated `TokenBurnButton` and `TokenAirdropButton` components to use V5 contract handling

> The following files were skipped due to too many changes: `apps/dashboard/src/contract-ui/tabs/tokens/components/airdrop-button.tsx`, `apps/dashboard/src/contract-ui/tabs/tokens/components/transfer-button.tsx`, `apps/dashboard/src/contract-ui/tabs/tokens/components/supply.tsx`, `apps/dashboard/src/contract-ui/tabs/tokens/components/airdrop-form.tsx`, `apps/dashboard/src/contract-ui/tabs/tokens/components/transfer-form.tsx`, `apps/dashboard/src/contract-ui/tabs/tokens/components/burn-form.tsx`

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

<!-- end pr-codex -->
2024-07-08 08:26:40 +00:00
jnsdls 342d74efff api proxy (#3603)
<!-- start pr-codex -->

## PR-Codex overview
This PR focuses on enhancing JWT utils, updating API host paths, and optimizing user authentication handling.

### Detailed summary
- Export JWT utils, fix naming of `decodeJWT`
- Update API host paths to use relative paths
- Optimize user authentication handling in various components

> The following files were skipped due to too many changes: `apps/dashboard/src/app/(dashboard)/dashboard/connect/ecosystem/[slug]/(active)/hooks/use-delete-partner.ts`, `apps/dashboard/src/components/app-layouts/app.tsx`, `apps/dashboard/src/components/buttons/TransactionButton.tsx`, `apps/dashboard/src/pages/dashboard/settings/notifications.tsx`, `apps/dashboard/src/components/engine/overview/transaction-timeline.tsx`, `apps/dashboard/src/pages/dashboard/settings/devices.tsx`, `apps/dashboard/src/app/(dashboard)/dashboard/connect/ecosystem/[slug]/(active)/hooks/use-add-partner.ts`, `apps/dashboard/src/app/(dashboard)/dashboard/connect/ecosystem/[slug]/(active)/hooks/use-update-ecosystem.ts`, `apps/dashboard/src/app/(dashboard)/dashboard/connect/pay/page.tsx`, `apps/dashboard/src/pages/dashboard/engine/index.tsx`, `apps/dashboard/src/pages/dashboard/settings/billing.tsx`, `apps/dashboard/src/components/engine/engine-instances-table.tsx`, `apps/dashboard/src/pages/dashboard/settings/usage.tsx`, `apps/dashboard/src/pages/dashboard/settings/gas-credits.tsx`, `apps/dashboard/src/pages/dashboard/settings/api-keys/index.tsx`, `apps/dashboard/src/pages/api/server-proxy/api/[...paths].tsx`, `apps/dashboard/src/pages/dashboard/connect/analytics.tsx`, `apps/dashboard/src/components/storage/your-files.tsx`, `apps/dashboard/src/pages/api/server-proxy/pay/[...paths].tsx`, `apps/dashboard/src/components/engine/engine-list.tsx`, `apps/dashboard/src/components/pay/PayAnalytics/hooks/usePayVolume.ts`, `apps/dashboard/src/components/pay/PayAnalytics/hooks/usePayNewCustomers.ts`, `apps/dashboard/src/components/pay/PayAnalytics/hooks/usePayPurchases.ts`, `apps/dashboard/src/pages/dashboard/connect/in-app-wallets.tsx`, `apps/dashboard/src/middleware.ts`, `apps/dashboard/src/components/pay/PayAnalytics/hooks/usePayCustomers.ts`, `apps/dashboard/src/pages/dashboard/connect/account-abstraction.tsx`, `apps/dashboard/src/app/login/page.tsx`, `apps/dashboard/src/app/components/ThirdwebMiniLogo.tsx`, `apps/dashboard/src/app/api/auth/ensure-login/route.ts`, `apps/dashboard/src/app/login/auth-actions.ts`, `apps/dashboard/src/components/buttons/MismatchButton.tsx`, `apps/dashboard/src/@3rdweb-sdk/react/hooks/useLoggedInUser.ts`, `apps/dashboard/src/@3rdweb-sdk/react/components/connect-wallet/index.tsx`, `apps/dashboard/src/@3rdweb-sdk/react/hooks/useApi.ts`, `apps/dashboard/src/@3rdweb-sdk/react/hooks/useEngine.ts`

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

<!-- end pr-codex -->
2024-07-08 06:17:38 +00:00
gregfromstl d253bad72f feature(ts): adds verifyTypedData and verifyHash (#3613) 2024-07-08 04:18:01 +00:00
gregfromstl f6ff5a78fc feat(connect-modal): Integrate NFT support into connect modal (#3585)
This PR introduces the ability to add NFTs to the connect modal in the thirdweb package. By using the `supportedNFTs` configuration, users can customize which NFTs are shown in the 'View Funds' section within the details modal. This update includes modifications to several TypeScript files to support the new functionality, adjustments in the UI components to handle NFT displays, and updates to hooks and utility functions to fetch and display owned NFTs.

---

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to add support for NFTs in the connect modal and customize the NFTs shown in the "View Funds" screen.

### Detailed summary
- Added support for NFTs in the connect modal with `supportedNFTs`
- Customized NFTs shown in the "View Funds" screen with `supportedNFTs`
- Updated components and types to handle NFTs
- Added NFT customization examples in documentation

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

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

<!-- end pr-codex -->
2024-07-05 06:06:20 +00:00
MananTank f103a902f3 Fix TransactionButton callbacks not called when sending tx from pay modal (#3611)
<!-- start pr-codex -->

## PR-Codex overview
This PR focuses on fixing Transaction Button callbacks not being called when a transaction is executed in the Pay Modal.

### Detailed summary
- Added `rejectTx` parameter with reason in `useSendTransaction.ts`
- Added `resolveTx` parameter in `useSendTransaction.ts`
- Updated `useSendTransaction` in `useSendTransaction.tsx` to handle `rejectTx` and `resolveTx`
- Added `onTxSent` callback in `TxModal` and `ExecutingTxScreen` to handle transaction data

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

<!-- end pr-codex -->
2024-07-05 05:19:20 +00:00
Jonas DanielsGitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>GitHub Action
0191e8dbad Version Packages (#3610)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: GitHub Action <[email protected]>
2024-07-05 16:48:57 +12:00
Manan TankandGitHub 2ab8b3ca78 reset selection data on wallet button click (no custom selection UI) (#3608) 2024-07-05 03:24:00 +00:00
gregfromstl 9faa8fc112 feat(auth): add ERC-6492 utilities and verification compatibility (#3609) 2024-07-05 01:46:21 +00:00
gregfromstl 34b9bbe77f fix(wallet): ensure disconnect events are emitted (#3597)
Introducing a patch in the `thirdweb` library to address wallet disconnect events. The main changes involve making the `onDisconnect` function asynchronous and ensuring that it correctly emits disconnect events. Affected files include `coinbaseWebSDK.ts` and `index.ts` in the `thirdweb/src/wallets` directory.

---

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on fixing wallet disconnect events not being emitted in the `thirdweb` package.

### Detailed summary
- Added `async` keyword to `onDisconnect` function in `injected/index.ts` and `coinbaseWebSDK.ts`
- Replaced `disconnect` with `onDisconnect` in `onConnect` functions in both files

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

<!-- end pr-codex -->
2024-07-05 01:30:32 +00:00
Jonas DanielsGitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
4b72c1174c Version Packages (#3606)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-07-04 21:39:31 +12:00