Skip to content

Conversation

@gregfromstl
Copy link
Contributor

@gregfromstl gregfromstl commented Oct 9, 2024

PR-Codex overview

This PR introduces error handling improvements and a new function for managing device shares in the wallet system. It enhances user feedback for invalid device shares and ensures proper cleanup of device share data when errors occur.

Detailed summary

  • Added INVALID_DEVICE_SHARE_MESSAGE constant to provide a specific error message for invalid device shares.
  • Implemented removeDeviceShare function to remove device shares based on clientId.
  • Updated error handling in getWalletPrivateKeyFromShares to use the new error message.
  • Modified getAccountFromShares to call removeDeviceShare when an invalid device state is detected.

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

@gregfromstl gregfromstl added Bug Something isn't working as intended in a provided reproduction. React Native SDK Involves changes to the React Native SDK. labels Oct 9, 2024
@gregfromstl gregfromstl self-assigned this Oct 9, 2024
@changeset-bot
Copy link

changeset-bot bot commented Oct 9, 2024

⚠️ No Changeset found

Latest commit: abbe430

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

@graphite-app
Copy link
Contributor

graphite-app bot commented Oct 9, 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.

@vercel
Copy link

vercel bot commented Oct 9, 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 Oct 9, 2024 10:46pm
thirdweb_playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 9, 2024 10:46pm
thirdweb-www ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 9, 2024 10:46pm
wallet-ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 9, 2024 10:46pm

@gregfromstl gregfromstl changed the title [React Native SDK] Fix: Fallback to recreate device share if private key recovery fails WIP [React Native SDK] Fix: Fallback to recreate device share if private key recovery fails Oct 9, 2024
@gregfromstl gregfromstl marked this pull request as draft October 9, 2024 19:04
@gregfromstl gregfromstl added the DO NOT MERGE This pull request is still in progress and is not ready to be merged. label Oct 9, 2024
@github-actions
Copy link
Contributor

github-actions bot commented Oct 9, 2024

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 42.07 KB (0%) 842 ms (0%) 427 ms (+33.32% 🔺) 1.3 s
thirdweb (cjs) 101.66 KB (0%) 2.1 s (0%) 842 ms (+3.18% 🔺) 2.9 s
thirdweb (minimal + tree-shaking) 4.84 KB (0%) 97 ms (0%) 24 ms (+8.34% 🔺) 121 ms
thirdweb/chains (tree-shaking) 498 B (0%) 10 ms (0%) 7 ms (-67.22% 🔽) 17 ms
thirdweb/react (minimal + tree-shaking) 17.24 KB (0%) 345 ms (0%) 106 ms (+46.05% 🔺) 451 ms

@codecov
Copy link

codecov bot commented Oct 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 47.68%. Comparing base (6a4b776) to head (abbe430).
Report is 5 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4976      +/-   ##
==========================================
+ Coverage   47.67%   47.68%   +0.01%     
==========================================
  Files        1057     1058       +1     
  Lines       57277    57290      +13     
  Branches     3940     3943       +3     
==========================================
+ Hits        27307    27320      +13     
  Misses      29279    29279              
  Partials      691      691              
Flag Coverage Δ *Carryforward flag
legacy_packages 65.68% <ø> (ø) Carriedforward from 6a4b776
packages 43.46% <ø> (+0.01%) ⬆️

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

see 1 file with indirect coverage changes

@gregfromstl gregfromstl changed the title WIP [React Native SDK] Fix: Fallback to recreate device share if private key recovery fails WIP [React Native SDK] Fix: Remove device share if recovering private key fails Oct 9, 2024
@gregfromstl gregfromstl changed the title WIP [React Native SDK] Fix: Remove device share if recovering private key fails [React Native SDK] Fix: Remove device share if recovering private key fails Oct 9, 2024
@gregfromstl gregfromstl removed the DO NOT MERGE This pull request is still in progress and is not ready to be merged. label Oct 9, 2024
@gregfromstl gregfromstl force-pushed the fix/reset-device-share-if-invalid branch 2 times, most recently from 0336925 to 9e0b675 Compare October 9, 2024 22:27
@gregfromstl gregfromstl marked this pull request as ready for review October 9, 2024 22:28
Copy link
Member

@joaquim-verges joaquim-verges left a comment

Choose a reason for hiding this comment

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

lil changeset for this?

@ElasticBottle ElasticBottle added the merge-queue Adds the pull request to Graphite's merge queue. label Oct 10, 2024
Copy link
Contributor

Merge activity

  • Oct 9, 10:27 PM EDT: The merge label 'merge-queue' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.

@joaquim-verges joaquim-verges merged commit ec0f8d2 into main Oct 10, 2024
30 checks passed
@joaquim-verges joaquim-verges deleted the fix/reset-device-share-if-invalid branch October 10, 2024 02:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Something isn't working as intended in a provided reproduction. merge-queue Adds the pull request to Graphite's merge queue. packages React Native SDK Involves changes to the React Native SDK.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants