Skip to content

Conversation

@MananTank
Copy link
Member

@MananTank MananTank commented May 11, 2024

PR-Codex overview

This PR enhances the wallet connection and chain switching functionalities in the codebase.

Detailed summary

  • Added switchChain function to components for seamless chain switching
  • Updated components to receive activeChain and account props
  • Refactored use of useActiveWalletChain and useActiveAccount hooks

The following files were skipped due to too many changes: packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/tx-history/FiatDetailsScreen.tsx, packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/fiat/PostOnRampSwap.tsx, packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/tx-history/BuyTxHistory.tsx, packages/thirdweb/src/react/web/ui/PayEmbed.tsx, packages/thirdweb/src/react/web/ui/PayEmbedUI.tsx, packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/swap/ConfirmationScreen.tsx, packages/thirdweb/src/react/web/ui/ConnectWallet/Details.tsx, packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/BuyScreen.tsx

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

@changeset-bot
Copy link

changeset-bot bot commented May 11, 2024

⚠️ No Changeset found

Latest commit: e55b6ba

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@codspeed-hq
Copy link

codspeed-hq bot commented May 11, 2024

CodSpeed Performance Report

Merging #2998 will not alter performance

Comparing mnn/adapter-payembed (e55b6ba) with main (523cd1e)

Summary

✅ 9 untouched benchmarks

@github-actions
Copy link
Contributor

github-actions bot commented May 11, 2024

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 39.07 KB (0%) 782 ms (0%) 508 ms (+57.28% 🔺) 1.3 s
thirdweb (cjs) 87.87 KB (0%) 1.8 s (0%) 1.8 s (+80.33% 🔺) 3.5 s
thirdweb (minimal + tree-shaking) 4.71 KB (0%) 95 ms (0%) 161 ms (+517.31% 🔺) 255 ms
thirdweb/chains (tree-shaking) 400 B (0%) 10 ms (0%) 60 ms (+776.89% 🔺) 70 ms
thirdweb/react (minimal + tree-shaking) 16.38 KB (0%) 328 ms (0%) 181 ms (+264.97% 🔺) 509 ms

@codecov
Copy link

codecov bot commented May 11, 2024

Codecov Report

Attention: Patch coverage is 29.77099% with 92 lines in your changes are missing coverage. Please review.

Project coverage is 64.56%. Comparing base (02c0319) to head (e55b6ba).
Report is 7 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2998      +/-   ##
==========================================
- Coverage   64.58%   64.56%   -0.03%     
==========================================
  Files         758      758              
  Lines       52966    53057      +91     
  Branches     3092     3093       +1     
==========================================
+ Hits        34208    34254      +46     
- Misses      18093    18138      +45     
  Partials      665      665              
Flag Coverage Δ *Carryforward flag
legacy_packages 65.66% <ø> (ø) Carriedforward from 9d2df4d
packages 64.27% <29.77%> (-0.03%) ⬇️

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

Files Coverage Δ
...b/src/react/web/ui/ConnectWallet/ConnectButton.tsx 58.95% <88.88%> (+0.76%) ⬆️
...dweb/src/react/web/ui/components/SwitchNetwork.tsx 16.21% <0.00%> (-2.21%) ⬇️
...web/ui/ConnectWallet/screens/Buy/swap/SwapFlow.tsx 24.34% <50.00%> (+1.41%) ⬆️
...screens/Buy/tx-history/useBuyTransactionsToShow.ts 14.35% <50.00%> (+0.67%) ⬆️
.../ConnectWallet/screens/Buy/fiat/PostOnRampSwap.tsx 12.76% <25.00%> (+0.26%) ⬆️
...nectWallet/screens/Buy/fiat/PostOnRampSwapFlow.tsx 23.43% <25.00%> (+0.22%) ⬆️
...allet/screens/Buy/tx-history/FiatDetailsScreen.tsx 12.67% <25.00%> (+0.73%) ⬆️
...tWallet/screens/Buy/tx-history/TxDetailsScreen.tsx 16.66% <25.00%> (+1.66%) ⬆️
...hirdweb/src/react/web/hooks/useSendTransaction.tsx 40.18% <35.29%> (-0.34%) ⬇️
...nectWallet/screens/Buy/tx-history/BuyTxHistory.tsx 17.79% <22.22%> (-0.71%) ⬇️
... and 2 more

... and 2 files with indirect coverage changes

@MananTank MananTank changed the title Use wallet info, switch chain via props in PayEmbed PayEmbed context cleanup, Add PayEmbedUI May 11, 2024
@MananTank
Copy link
Member Author

question: should we add a new component PayEmbedUI?

@MananTank MananTank marked this pull request as draft May 11, 2024 00:43
@MananTank
Copy link
Member Author

TODO: test this

Copy link
Member

@jnsdls jnsdls left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM lets get tests in

@MananTank MananTank closed this May 30, 2024
@jnsdls jnsdls deleted the mnn/adapter-payembed branch September 17, 2024 03:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants