Skip to content
This repository has been archived by the owner on Jun 19, 2024. It is now read-only.

refactor: ConnectWallet via v5 #2648

Closed
wants to merge 1 commit into from
Closed

Conversation

jnsdls
Copy link
Member

@jnsdls jnsdls commented Jun 12, 2024

PR-Codex overview

This PR focuses on updating the codebase to use the useActiveAccount hook instead of useAddress for handling account-related functionality.

Detailed summary

  • Replaced uses of useAddress with useActiveAccount for account-related operations in multiple files.
  • Updated functions to utilize the fetchAuthToken function exported from useApi.ts.
  • Modified the uploadContractMetadata function to use the upload function from thirdweb/storage.
  • Refactored components to access the user's address using the useActiveAccount hook.

The following files were skipped due to too many changes: src/core-ui/nft-drawer/useNftDrawerTabs.tsx, src/components/payments/contracts/payment-contracts.tsx, src/components/contract-components/shared/contract-id-image.tsx, src/contract-ui/tabs/settings/components/primary-sale.tsx, src/contract-ui/tabs/listings/components/list-form.tsx, src/contract-ui/tabs/settings/components/metadata.tsx, src/contract-ui/tabs/tokens/components/burn-form.tsx, src/lib/v5-adapter.ts, src/contract-ui/tabs/claim-conditions/components/claim-conditions-form/index.tsx, src/components/contract-components/publisher/publisher-header.tsx, src/contract-ui/tabs/direct-listings/components/table.tsx, src/contract-ui/tabs/tokens/components/burn-button.tsx, src/contract-ui/tabs/tokens/components/airdrop-form.tsx, src/app/(dashboard)/providers.tsx, src/pages/api/moralis/balances.ts, src/components/engine/contract-subscription/contract-subscriptions-table.tsx, src/contract-ui/tabs/tokens/components/mint-form.tsx, src/contract-ui/tabs/nfts/components/claim-form.tsx, src/contract-ui/tabs/tokens/components/airdrop-button.tsx, src/contract-ui/tabs/account-permissions/components/account-signer.tsx, src/contract-ui/tabs/nfts/components/airdrop-tab.tsx, src/contract-ui/tabs/shared-components/list-button.tsx, src/contract-ui/components/primary-dashboard-button.tsx, src/contract-ui/tabs/split/page.tsx, src/contract-ui/components/solidity-inputs/address-input.tsx, src/pages/dashboard/contracts/deploy.tsx, src/contract-ui/tabs/nfts/components/mint-supply-tab.tsx, src/pages/profile/[profileAddress].tsx, src/components/contract-components/published-contract/index.tsx, src/components/contract-components/contract-deploy-form/index.tsx, src/contract-ui/tabs/nfts/components/claim-tab.tsx, src/contract-ui/tabs/settings/components/platform-fees.tsx, src/components/contract-components/contract-publish-form/index.tsx, src/pages/dashboard/contracts/publish.tsx, src/components/contract-tabs/code/ContractCode.tsx, src/@3rdweb-sdk/react/hooks/useEngine.ts, src/components/engine/engine-instances-table.tsx, src/components/cmd-k-search/index.tsx, src/@3rdweb-sdk/react/hooks/useRegistry.ts, src/contract-ui/tabs/overview/components/MarketplaceDetails.tsx, src/contract-ui/tabs/code/components/code-overview.tsx, src/pages/dashboard/index.tsx, src/components/contract-functions/interactive-abi-function.tsx, src/components/contract-components/import-contract/modal.tsx, src/components/engine/overview/backend-wallets-table.tsx, src/components/ipfs-upload/dropzone.tsx, src/@3rdweb-sdk/react/hooks/useVote.ts, src/components/selects/NetworkSelectorButton.tsx, src/components/onboarding/index.tsx, src/components/app-layouts/app.tsx, src/components/wallets/PosthogIdentifier.tsx, src/@3rdweb-sdk/react/hooks/useContractRoles.ts, src/pages/cli/login.tsx, src/components/app-layouts/providers.tsx, src/components/contract-components/hooks.ts, src/@3rdweb-sdk/react/hooks/usePayments.ts, src/components/buttons/TransactionButton.tsx, src/components/buttons/MismatchButton.tsx, src/components/app-layouts/provider-setup.tsx, src/@3rdweb-sdk/react/components/connect-wallet/index.tsx

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

Copy link

vercel bot commented Jun 12, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
thirdweb-www ✅ Ready (Inspect) Visit Preview 💬 1 unresolved Jun 19, 2024 4:05am

Copy link

graphite-app bot commented Jun 12, 2024

Your org requires the Graphite merge queue for merging into main

Add the label “merge-queue” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. Or use the label “hotfix” to add to the merge queue as a hot fix.

You must have a Graphite account and log in to Graphite in order to use the merge queue. Sign up using this link.

Copy link
Member Author

jnsdls commented Jun 12, 2024

@jnsdls jnsdls changed the title refactor: update ConnectWallet component for simplified usage and import paths refactor: ConnectWallet via v5 Jun 12, 2024
@jnsdls jnsdls added the DO NOT MERGE do not merge yet label Jun 12, 2024 — with Graphite App
@jnsdls jnsdls marked this pull request as ready for review June 12, 2024 05:26
@jnsdls jnsdls marked this pull request as draft June 12, 2024 05:26
@jnsdls jnsdls force-pushed the refactor/connect-wallet-cleanup branch from a531d80 to fbc8a54 Compare June 12, 2024 06:48
@jnsdls jnsdls force-pushed the refactor/connect-wallet-cleanup branch from fbc8a54 to da4ccc8 Compare June 13, 2024 02:10
@jnsdls
Copy link
Member Author

jnsdls commented Jun 19, 2024

moved: thirdweb-dev/js#3397

@jnsdls jnsdls closed this Jun 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
DO NOT MERGE do not merge yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant