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

[SDK] Fix: Track chain ID on transaction events #5272

Merged
merged 1 commit into from
Nov 2, 2024
Merged

Conversation

gregfromstl
Copy link
Member

@gregfromstl gregfromstl commented Nov 2, 2024

Fixes CNCT-2184


PR-Codex overview

This PR focuses on adding chainId tracking to various transaction handling functions across multiple files in the thirdweb package.

Detailed summary

  • Added chainId: tx.chainId to trackTransaction calls in:
    • packages/thirdweb/src/wallets/injected/index.ts
    • packages/thirdweb/src/wallets/in-app/core/wallet/enclave-wallet.ts
    • packages/thirdweb/src/wallets/in-app/web/lib/iframe-wallet.ts
    • packages/thirdweb/src/wallets/coinbase/coinbaseWebSDK.ts
    • packages/thirdweb/src/wallets/wallet-connect/controller.ts

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

Copy link

linear bot commented Nov 2, 2024

Copy link

vercel bot commented Nov 2, 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 2, 2024 1:52am
thirdweb_playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 2, 2024 1:52am
thirdweb-www ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 2, 2024 1:52am
wallet-ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 2, 2024 1:52am

Copy link

changeset-bot bot commented Nov 2, 2024

🦋 Changeset detected

Latest commit: 0391117

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
thirdweb Patch

Not sure what this means? Click here to learn what changesets are.

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

Copy link

graphite-app bot commented Nov 2, 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.

Copy link
Contributor

github-actions bot commented Nov 2, 2024

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 43 KB (0%) 861 ms (0%) 950 ms (+23.47% 🔺) 1.9 s
thirdweb (cjs) 102.88 KB (0%) 2.1 s (0%) 1.8 s (-14.95% 🔽) 3.9 s
thirdweb (minimal + tree-shaking) 4.84 KB (0%) 97 ms (0%) 119 ms (+173.11% 🔺) 216 ms
thirdweb/chains (tree-shaking) 498 B (0%) 10 ms (0%) 91 ms (+58.78% 🔺) 101 ms
thirdweb/react (minimal + tree-shaking) 17 KB (0%) 341 ms (0%) 155 ms (-44.46% 🔽) 495 ms

@gregfromstl gregfromstl force-pushed the fix/track-chains branch 2 times, most recently from 4e94bec to 0391117 Compare November 2, 2024 01:08
@gregfromstl gregfromstl added TS SDK Involves changes to the v5 TypeScript SDK. and removed Dashboard Involves changes to the Dashboard. labels Nov 2, 2024
Copy link
Member Author

gregfromstl commented Nov 2, 2024

Merge activity

  • Nov 1, 9:14 PM EDT: The merge label 'merge-queue' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Nov 1, 9:20 PM EDT: A user added this pull request to the Graphite merge queue.
  • Nov 1, 9:53 PM EDT: A user merged this pull request with the Graphite merge queue.

Copy link

codecov bot commented Nov 2, 2024

Codecov Report

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

Project coverage is 45.36%. Comparing base (6679888) to head (e3c0af2).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...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    #5272      +/-   ##
==========================================
- Coverage   45.37%   45.36%   -0.01%     
==========================================
  Files        1067     1067              
  Lines       55446    55449       +3     
  Branches     3989     3989              
==========================================
  Hits        25157    25157              
- Misses      29598    29601       +3     
  Partials      691      691              
Flag Coverage Δ *Carryforward flag
legacy_packages 65.68% <ø> (ø) Carriedforward from 6679888
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 Δ
...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%) ⬇️

Fixes [CNCT-2184](https://linear.app/thirdweb/issue/CNCT-2184)

<!-- start pr-codex -->

---

## PR-Codex overview
This PR introduces modifications to the `trackTransaction` function across multiple files in the `thirdweb` package, adding support for `chainId` in transaction tracking.

### Detailed summary
- Added `chainId: tx.chainId` to `trackTransaction` in:
  - `packages/thirdweb/src/wallets/injected/index.ts`
  - `packages/thirdweb/src/wallets/in-app/core/wallet/enclave-wallet.ts`
  - `packages/thirdweb/src/wallets/in-app/web/lib/iframe-wallet.ts`
  - `packages/thirdweb/src/wallets/coinbase/coinbaseWebSDK.ts`
  - `packages/thirdweb/src/wallets/wallet-connect/controller.ts`

> ✨ 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
merge-queue Adds the pull request to Graphite's merge queue. packages TS SDK Involves changes to the v5 TypeScript SDK.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants