Skip to content

Conversation

@gregfromstl
Copy link
Contributor

@gregfromstl gregfromstl commented Nov 1, 2024

Fixes CNCT-2184


PR-Codex overview

This PR primarily focuses on refactoring various components and functions to use Promise for parameters, improving async handling, and enhancing code clarity. It also includes updates to cookie management and adjusts the handling of transaction tracking.

Detailed summary

  • Changed multiple functions to accept Promise for parameters.
  • Updated cookie handling to use await for better async management.
  • Refactored transaction tracking to include chainId.
  • Adjusted revalidate value in layout.tsx.
  • Improved component imports and type definitions across various files.
  • Enhanced error handling and redirects in async functions.
  • Updated UI components for better type safety and clarity.

The following files were skipped due to too many changes: apps/dashboard/src/app/team/[team_slug]/[project_slug]/engine/(instance)/[engineId]/metrics/page.tsx, apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/account-permissions/page.tsx, apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/claim-conditions/page.tsx, apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/accounts/page.tsx, apps/dashboard/src/app/team/[team_slug]/[project_slug]/engine/(instance)/[engineId]/configuration/page.tsx, apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/split/page.tsx, apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/page.tsx, apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/proposals/page.tsx, apps/dashboard/src/app/layout.tsx, apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/account/page.tsx, apps/portal/mdx-components.tsx, apps/dashboard/src/app/api/lib/getAuthToken.ts, apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/embed/page.tsx, apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/analytics/page.tsx, apps/dashboard/src/app/team/[team_slug]/[project_slug]/connect/account-abstraction/page.tsx, apps/dashboard/src/app/(dashboard)/published-contract/page.tsx, apps/dashboard/src/app/team/[team_slug]/[project_slug]/engine/(instance)/[engineId]/page.tsx, apps/dashboard/src/app/(dashboard)/contracts/deploy/[compiler_uri]/page.tsx, apps/playground-web/src/app/connect/sign-in/button/page.tsx, apps/dashboard/src/app/api/contact-us/route.ts, apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/_utils/getContractFromParams.ts, apps/dashboard/src/app/api/testnet-faucet/can-claim/route.ts, apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/tx/[txHash]/page.tsx, apps/dashboard/src/components/buttons/MismatchButton.tsx, apps/wallet-ui/src/app/[ecosystem]/(authed)/wallet/[address]/layout.tsx, apps/dashboard/src/app/login/auth-actions.ts, apps/dashboard/src/app/(dashboard)/trending/page.tsx, apps/dashboard/src/app/team/[team_slug]/[project_slug]/connect/in-app-wallets/layout.tsx, apps/dashboard/src/app/(dashboard)/support/create-ticket/components/create-ticket.client.tsx, apps/dashboard/src/app/(dashboard)/dashboard/connect/account-abstraction/[clientId]/page.tsx, apps/dashboard/src/app/team/[team_slug]/(team)/layout.tsx, apps/dashboard/src/app/team/[team_slug]/[project_slug]/connect/analytics/page.tsx, apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/layout.tsx, apps/dashboard/src/app/api/testnet-faucet/claim/route.ts, apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/(chainPage)/layout.tsx, apps/playground-web/package.json, apps/wallet-ui/package.json, apps/dashboard/src/app/(dashboard)/contracts/publish/[publish_uri]/page.tsx, apps/dashboard/src/app/(dashboard)/(chain)/chainlist/page.tsx, apps/dashboard/src/app/(dashboard)/published-contract/[publisher]/[contract_id]/page.tsx, packages/thirdweb/package.json, apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/[tokenId]/page.tsx, apps/dashboard/src/app/(dashboard)/explore/[category]/page.tsx, apps/playground-web/src/app/connect/auth/server/actions/auth.ts, apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/(chainPage)/popular/page.tsx, apps/portal/package.json, apps/dashboard/src/app/team/[team_slug]/[project_slug]/layout.tsx, apps/dashboard/src/app/(dashboard)/published-contract/[publisher]/[contract_id]/[version]/page.tsx, apps/portal/src/app/references/components/TDoc/PageLayout.tsx, apps/dashboard/package.json, apps/dashboard/src/app/(dashboard)/(chain)/chainlist/[chain_type]/page.tsx, apps/portal/src/app/typescript/v5/supported-wallets/[walletId]/page.tsx, pnpm-lock.yaml

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

@linear
Copy link

linear bot commented Nov 1, 2024

@vercel
Copy link

vercel bot commented Nov 1, 2024

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

Name Status Preview Comments Updated (UTC)
docs-v2 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 1, 2024 11:44pm
thirdweb_playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 1, 2024 11:44pm
thirdweb-www ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 1, 2024 11:44pm
wallet-ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 1, 2024 11:44pm

@graphite-app
Copy link
Contributor

graphite-app bot commented Nov 1, 2024

Your org has enabled 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.

@github-actions github-actions bot added Dashboard Involves changes to the Dashboard. Playground Changes involving the Playground codebase. Portal Involves changes to the Portal (docs) codebase. packages labels Nov 1, 2024
@socket-security
Copy link

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@aws-sdk/[email protected] Transitive: environment, filesystem, network, shell +74 5.98 MB amzn-oss, aws-sdk-bot, kuhe, ...2 more
npm/@aws-sdk/[email protected] Transitive: environment, filesystem, network, shell +81 6.26 MB aws-sdk-bot
npm/@aws-sdk/[email protected] Transitive: environment, filesystem, network, shell +76 4.95 MB aws-sdk-bot
npm/@hookform/[email protected] None 0 712 kB bluebill1049
npm/@next/[email protected] Transitive: environment, filesystem, network, shell +18 2.31 MB matt.straka, rauchg, timer, ...2 more
npm/@next/[email protected] Transitive: filesystem +18 587 kB matt.straka, rauchg, timer, ...2 more
npm/@next/[email protected] Transitive: filesystem, network +1 238 kB matt.straka, rauchg, timer, ...2 more
npm/@vercel/[email protected] None 0 79.5 kB vercel-release-bot
npm/[email protected] Transitive: environment, eval, filesystem, unsafe +159 15.1 MB timer, timneutkens, vercel-release-bot
npm/[email protected] Transitive: environment, filesystem, shell +49 14.9 MB react-bot
npm/[email protected] None 0 110 kB guilhermerodz
npm/[email protected] environment, eval Transitive: filesystem, shell, unsafe +86 11.8 MB webpro
npm/[email protected] environment, filesystem, network, shell, unsafe +13 122 MB vercel-release-bot
npm/[email protected] environment +1 6.45 MB fb, gnoff, react-bot, ...2 more
npm/[email protected] environment 0 239 kB react-bot
npm/[email protected] environment +39 10.9 MB arcthur, ckifer, nikolasrieble
npm/[email protected] None 0 17.7 kB eps1lon
npm/[email protected] None +1 1.63 MB eps1lon
npm/[email protected] network Transitive: environment +7 14.8 MB jmoxey

🚮 Removed packages: npm/@aws-sdk/[email protected], npm/@aws-sdk/[email protected], npm/@aws-sdk/[email protected], npm/@hookform/[email protected], npm/@next/[email protected], npm/@next/[email protected], npm/@next/[email protected], npm/@types/[email protected], npm/@types/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected]

View full report↗︎

@socket-security
Copy link

🚨 Potential security issues detected. Learn more about Socket for GitHub ↗︎

To accept the risk, merge this PR and you will not be notified again.

Alert Package NoteSourceCI
Possible typosquat attack npm/[email protected] ⚠︎

View full report↗︎

Next steps

What is a typosquat?

Package name is similar to other popular packages and may not be the package you want.

Use care when consuming similarly named packages and ensure that you did not intend to consume a different package. Malicious packages often publish using similar names as existing popular packages.

Take a deeper look at the dependency

Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support [AT] socket [DOT] dev.

Remove the package

If you happen to install a dependency that Socket reports as Known Malware you should immediately remove it and select a different dependency. For other alert types, you may may wish to investigate alternative packages or consider if there are other ways to mitigate the specific risk posed by the dependency.

Mark a package as acceptable risk

To ignore an alert, reply with a comment starting with @SocketSecurity ignore followed by a space separated list of ecosystem/package-name@version specifiers. e.g. @SocketSecurity ignore npm/[email protected] or ignore all packages with @SocketSecurity ignore-all

@github-actions
Copy link
Contributor

github-actions bot commented Nov 1, 2024

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 42.97 KB (-0.08% 🔽) 860 ms (-0.08% 🔽) 101 ms (-21.47% 🔽) 961 ms
thirdweb (cjs) 102.88 KB (+0.01% 🔺) 2.1 s (+0.01% 🔺) 175 ms (-3.28% 🔽) 2.3 s
thirdweb (minimal + tree-shaking) 4.84 KB (0%) 97 ms (0%) 6 ms (+19.79% 🔺) 102 ms
thirdweb/chains (tree-shaking) 498 B (0%) 10 ms (0%) 4 ms (-13.21% 🔽) 14 ms
thirdweb/react (minimal + tree-shaking) 17 KB (+0.01% 🔺) 341 ms (+0.01% 🔺) 19 ms (-0.75% 🔽) 359 ms

@codecov
Copy link

codecov bot commented Nov 1, 2024

Codecov Report

Attention: Patch coverage is 0% with 4 lines in your changes missing coverage. Please review.

Project coverage is 45.36%. Comparing base (004cac0) to head (86107af).
Report is 8 commits behind head on main.

Files with missing lines Patch % Lines
...irdweb/src/react/web/wallets/in-app/WalletAuth.tsx 0.00% 1 Missing ⚠️
...es/thirdweb/src/wallets/coinbase/coinbaseWebSDK.ts 0.00% 1 Missing ⚠️
packages/thirdweb/src/wallets/injected/index.ts 0.00% 1 Missing ⚠️
.../thirdweb/src/wallets/wallet-connect/controller.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5267   +/-   ##
=======================================
  Coverage   45.36%   45.36%           
=======================================
  Files        1067     1067           
  Lines       55433    55449   +16     
  Branches     3991     3989    -2     
=======================================
+ Hits        25148    25157    +9     
- Misses      29594    29601    +7     
  Partials      691      691           
Flag Coverage Δ *Carryforward flag
legacy_packages 65.68% <ø> (ø) Carriedforward from 004cac0
packages 40.41% <0.00%> (+<0.01%) ⬆️

*This pull request uses carry forward flags. Click here to find out more.

Files with missing lines Coverage Δ
...hirdweb/src/react/web/ui/ConnectWallet/Details.tsx 1.09% <ø> (-0.01%) ⬇️
...irdweb/src/react/web/wallets/in-app/WalletAuth.tsx 1.34% <0.00%> (ø)
...es/thirdweb/src/wallets/coinbase/coinbaseWebSDK.ts 6.52% <0.00%> (-0.03%) ⬇️
packages/thirdweb/src/wallets/injected/index.ts 0.83% <0.00%> (-0.01%) ⬇️
.../thirdweb/src/wallets/wallet-connect/controller.ts 6.59% <0.00%> (-0.02%) ⬇️

... and 18 files with indirect coverage changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Dashboard Involves changes to the Dashboard. packages Playground Changes involving the Playground codebase. Portal Involves changes to the Portal (docs) codebase.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants