Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Connect components in React Native [part 1] #3246

Merged
merged 1 commit into from
Jul 2, 2024

Conversation

joaquim-verges
Copy link
Member

@joaquim-verges joaquim-verges commented Jun 8, 2024

PR-Codex overview

This PR focuses on restructuring file paths, updating imports, adding new design system configurations, and improving wallet functionalities.

Detailed summary

  • Restructured file paths and updated imports
  • Added new design system configurations for spacing, radius, and font size
  • Updated wallet functionalities for sending tokens
  • Improved wallet connection and authentication processes

The following files were skipped due to too many changes: packages/thirdweb/src/react/web/wallets/shared/OTPLoginUI.tsx, packages/thirdweb/src/react/web/ui/ConnectWallet/WalletSelector.tsx, packages/thirdweb/src/react/web/wallets/shared/SocialLogin.tsx, packages/thirdweb/src/react/native/ui/components/TokenIcon.tsx, packages/thirdweb/src/react/web/wallets/shared/PassKeyLogin.tsx, packages/thirdweb/src/react/web/ui/PayEmbed.tsx, packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatSteps.tsx, packages/thirdweb/src/react/web/ui/ConnectWallet/Modal/SmartWalletConnectUI.tsx, packages/thirdweb/src/react/web/ui/ConnectWallet/screens/TokenSelector.tsx, packages/thirdweb/src/react/web/ui/ConnectWallet/screens/ViewFunds.tsx, packages/thirdweb/src/react/web/ui/ConnectWallet/screens/SignatureScreen.tsx, packages/thirdweb/src/react/web/ui/components/WalletImage.tsx, packages/thirdweb/src/react/web/ui/ConnectWallet/Modal/AnyWalletConnectUI.tsx, packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/swap/PayWithCrypto.tsx, packages/thirdweb/src/react/native/ui/connect/ErrorView.tsx, packages/thirdweb/src/react/web/hooks/transaction/useSendTransaction.tsx, packages/thirdweb/src/react/native/ui/connect/SuccessView.tsx, packages/react-native-adapter/README.md, packages/thirdweb/src/react/native/ui/components/text.tsx, packages/thirdweb/src/react/native/ui/components/ChainIcon.tsx, packages/thirdweb/src/react/web/ui/ConnectWallet/ConnectButton.tsx, packages/thirdweb/src/wallets/manager/index.ts, packages/thirdweb/src/react/web/wallets/shared/ConnectWalletSocialOptions.tsx, packages/thirdweb/src/react/native/ui/components/Address.tsx, packages/thirdweb/src/react/web/hooks/wallets/useAutoConnect.ts, packages/thirdweb/src/react/native/ui/components/RNImage.tsx, packages/thirdweb/src/exports/react.native.ts, packages/thirdweb/src/react/web/ui/ConnectWallet/ConnectButtonProps.ts, packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/BuyScreen.tsx, packages/thirdweb/src/react/native/ui/components/Header.tsx, packages/thirdweb/src/react/web/ui/ConnectWallet/defaultTokens.ts, packages/thirdweb/src/react/native/ui/connect/ReceiveScreen.tsx, packages/thirdweb/src/react/native/ui/components/button.tsx, packages/thirdweb/src/exports/react.ts, packages/thirdweb/src/react/native/ui/components/WalletImage.tsx, packages/thirdweb/src/react/native/ui/connect/ConnectedButton.tsx, packages/thirdweb/src/react/core/hooks/wallets/useSendToken.ts, packages/thirdweb/src/react/web/ui/ConnectWallet/screens/SendFunds.tsx, packages/thirdweb/src/react/native/ui/components/input.tsx, packages/thirdweb/src/react/core/utils/wallet.ts, packages/thirdweb/src/react/web/ui/components/ChainIcon.tsx, packages/thirdweb/src/react/native/ui/connect/ExternalWalletsList.tsx, packages/thirdweb/package.json, packages/thirdweb/src/react/native/ui/connect/TokenListScreen.tsx, packages/thirdweb/src/react/native/ui/connect/ConnectButton.tsx, packages/thirdweb/src/react/native/ui/connect/SendScreen.tsx, packages/thirdweb/src/react/web/ui/ConnectWallet/Details.tsx, packages/thirdweb/src/react/native/ui/connect/ConnectModal.tsx, packages/thirdweb/src/react/native/ui/connect/InAppWalletUI.tsx, packages/thirdweb/src/react/core/hooks/connection/ConnectEmbedProps.ts, packages/thirdweb/src/react/native/ui/connect/ConnectedModal.tsx, packages/thirdweb/src/react/web/ui/ConnectWallet/Modal/ConnectEmbed.tsx, packages/thirdweb/src/react/web/ui/ConnectWallet/icons/dataUris.ts, packages/thirdweb/src/react/native/ui/icons/svgs.ts, pnpm-lock.yaml

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

Copy link

vercel bot commented Jun 8, 2024

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

Name Status Preview Comments Updated (UTC)
thirdweb_playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 2, 2024 2:17am
thirdweb-www ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 2, 2024 2:17am
wallet-ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 2, 2024 2:17am

Copy link

changeset-bot bot commented Jun 8, 2024

⚠️ No Changeset found

Latest commit: 0077d38

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

Copy link
Member Author

joaquim-verges commented Jun 8, 2024

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @joaquim-verges and the rest of your teammates on Graphite Graphite

@joaquim-verges joaquim-verges changed the title WIP connect button [WIP] connect button for react native Jun 8, 2024
@joaquim-verges joaquim-verges marked this pull request as ready for review June 8, 2024 02:54
Copy link

codspeed-hq bot commented Jun 8, 2024

CodSpeed Performance Report

Merging #3246 will improve performances by 16.44%

Comparing joaquim/rn-ui-connect (0077d38) with main (53aa867)

Summary

⚡ 1 improvements
✅ 8 untouched benchmarks

Benchmarks breakdown

Benchmark main joaquim/rn-ui-connect Change
keccakId 1.5 ms 1.3 ms +16.44%

Copy link
Contributor

github-actions bot commented Jun 8, 2024

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 40.48 KB (+0.04% 🔺) 810 ms (+0.04% 🔺) 2.7 s (-62.44% 🔽) 3.5 s
thirdweb (cjs) 90.48 KB (+0.55% 🔺) 1.9 s (+0.55% 🔺) 6.1 s (-28.08% 🔽) 7.9 s
thirdweb (minimal + tree-shaking) 4.79 KB (0%) 96 ms (0%) 128 ms (-76.96% 🔽) 224 ms
thirdweb/chains (tree-shaking) 423 B (0%) 10 ms (0%) 298 ms (+199% 🔺) 308 ms
thirdweb/react (minimal + tree-shaking) 13.52 KB (+0.03% 🔺) 271 ms (+0.03% 🔺) 349 ms (-53.31% 🔽) 620 ms

Copy link

codecov bot commented Jun 8, 2024

Codecov Report

Attention: Patch coverage is 52.18579% with 175 lines in your changes missing coverage. Please review.

Project coverage is 62.76%. Comparing base (53aa867) to head (0077d38).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3246      +/-   ##
==========================================
+ Coverage   62.74%   62.76%   +0.02%     
==========================================
  Files         898      897       -1     
  Lines       68677    68737      +60     
  Branches     3671     3684      +13     
==========================================
+ Hits        43091    43145      +54     
- Misses      24898    24904       +6     
  Partials      688      688              
Flag Coverage Δ *Carryforward flag
legacy_packages 65.59% <ø> (ø) Carriedforward from 53aa867
packages 62.23% <52.18%> (+0.02%) ⬆️

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

Files Coverage Δ
...react/core/hooks/transaction/useSendTransaction.ts 46.81% <100.00%> (ø)
...web/src/react/core/hooks/wallets/useAutoConnect.ts 61.20% <100.00%> (ø)
...ges/thirdweb/src/react/core/utils/defaultTokens.ts 100.00% <100.00%> (ø)
...ges/thirdweb/src/react/core/utils/isSmartWallet.ts 90.00% <ø> (ø)
...kages/thirdweb/src/react/core/utils/socialIcons.ts 100.00% <100.00%> (ø)
packages/thirdweb/src/react/core/utils/storage.ts 35.29% <100.00%> (ø)
...react/web/hooks/transaction/useSendTransaction.tsx 32.03% <100.00%> (ø)
...b/src/react/web/ui/ConnectWallet/ConnectButton.tsx 56.54% <100.00%> (ø)
.../web/ui/ConnectWallet/Modal/AnyWalletConnectUI.tsx 14.96% <100.00%> (ø)
...eb/ui/ConnectWallet/Modal/SmartWalletConnectUI.tsx 10.64% <100.00%> (ø)
... and 28 more

... and 6 files with indirect coverage changes

Copy link

socket-security bot commented Jul 1, 2024

No dependency changes detected. Learn more about Socket for GitHub ↗︎

👍 No dependency changes detected in pull request

packages/thirdweb/package.json Outdated Show resolved Hide resolved
props: InAppWalletFormUIProps & { auth: InAppWalletSocialAuth },
) {
const { theme, wallet, auth, client, connectMutation } = props;
// TODO (rn) - move this onPress and state up
Copy link
Member

Choose a reason for hiding this comment

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

wen?

Copy link

graphite-app bot commented Jul 2, 2024

Merge activity

<!-- start pr-codex -->

## PR-Codex overview
This PR focuses on refactoring, updating dependencies, and improving code organization.

### Detailed summary
- Updated dependencies and file paths
- Refactored wallet-related functions
- Added default wallets for various chains
- Updated UI components and design system configurations

> The following files were skipped due to too many changes: `packages/thirdweb/src/react/web/wallets/shared/OTPLoginUI.tsx`, `packages/thirdweb/src/react/web/ui/ConnectWallet/WalletSelector.tsx`, `packages/thirdweb/src/react/web/wallets/shared/SocialLogin.tsx`, `packages/thirdweb/src/react/native/ui/components/TokenIcon.tsx`, `packages/thirdweb/src/react/web/wallets/shared/PassKeyLogin.tsx`, `packages/thirdweb/src/react/web/ui/PayEmbed.tsx`, `packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatSteps.tsx`, `packages/thirdweb/src/react/web/ui/ConnectWallet/Modal/SmartWalletConnectUI.tsx`, `packages/thirdweb/src/react/web/ui/ConnectWallet/screens/TokenSelector.tsx`, `packages/thirdweb/src/react/web/ui/ConnectWallet/screens/ViewFunds.tsx`, `packages/thirdweb/src/react/web/ui/ConnectWallet/screens/SignatureScreen.tsx`, `packages/thirdweb/src/react/web/ui/components/WalletImage.tsx`, `packages/thirdweb/src/react/web/ui/ConnectWallet/Modal/AnyWalletConnectUI.tsx`, `packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/swap/PayWithCrypto.tsx`, `packages/thirdweb/src/react/native/ui/connect/ErrorView.tsx`, `packages/thirdweb/src/react/web/hooks/transaction/useSendTransaction.tsx`, `packages/thirdweb/src/react/native/ui/connect/SuccessView.tsx`, `packages/react-native-adapter/README.md`, `packages/thirdweb/src/react/native/ui/components/text.tsx`, `packages/thirdweb/src/react/native/ui/components/ChainIcon.tsx`, `packages/thirdweb/src/react/web/ui/ConnectWallet/ConnectButton.tsx`, `packages/thirdweb/src/wallets/manager/index.ts`, `packages/thirdweb/src/react/web/wallets/shared/ConnectWalletSocialOptions.tsx`, `packages/thirdweb/src/react/native/ui/components/Address.tsx`, `packages/thirdweb/src/react/web/hooks/wallets/useAutoConnect.ts`, `packages/thirdweb/src/react/native/ui/components/RNImage.tsx`, `packages/thirdweb/src/exports/react.native.ts`, `packages/thirdweb/src/react/web/ui/ConnectWallet/ConnectButtonProps.ts`, `packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/BuyScreen.tsx`, `packages/thirdweb/src/react/native/ui/components/Header.tsx`, `packages/thirdweb/src/react/web/ui/ConnectWallet/defaultTokens.ts`, `packages/thirdweb/src/react/native/ui/connect/ReceiveScreen.tsx`, `packages/thirdweb/src/react/native/ui/components/button.tsx`, `packages/thirdweb/src/exports/react.ts`, `packages/thirdweb/src/react/native/ui/components/WalletImage.tsx`, `packages/thirdweb/src/react/native/ui/connect/ConnectedButton.tsx`, `packages/thirdweb/src/react/core/hooks/wallets/useSendToken.ts`, `packages/thirdweb/src/react/web/ui/ConnectWallet/screens/SendFunds.tsx`, `packages/thirdweb/src/react/native/ui/components/input.tsx`, `packages/thirdweb/src/react/core/utils/wallet.ts`, `packages/thirdweb/src/react/web/ui/components/ChainIcon.tsx`, `packages/thirdweb/src/react/native/ui/connect/ExternalWalletsList.tsx`, `packages/thirdweb/package.json`, `packages/thirdweb/src/react/native/ui/connect/TokenListScreen.tsx`, `packages/thirdweb/src/react/native/ui/connect/ConnectButton.tsx`, `packages/thirdweb/src/react/native/ui/connect/SendScreen.tsx`, `packages/thirdweb/src/react/web/ui/ConnectWallet/Details.tsx`, `packages/thirdweb/src/react/native/ui/connect/ConnectModal.tsx`, `packages/thirdweb/src/react/native/ui/connect/InAppWalletUI.tsx`, `packages/thirdweb/src/react/core/hooks/connection/ConnectEmbedProps.ts`, `packages/thirdweb/src/react/native/ui/connect/ConnectedModal.tsx`, `packages/thirdweb/src/react/web/ui/ConnectWallet/Modal/ConnectEmbed.tsx`, `packages/thirdweb/src/react/web/ui/ConnectWallet/icons/dataUris.ts`, `packages/thirdweb/src/react/native/ui/icons/svgs.ts`, `pnpm-lock.yaml`

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

<!-- end pr-codex -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
TS SDK Involves changes to the v5 TypeScript SDK.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants