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

[PAY-3748] Fix logged out SDK initialization #10873

Merged
merged 3 commits into from
Jan 2, 2025
Merged

Conversation

rickyrombo
Copy link
Contributor

Description

Alternate fix for PAY-3748 to fix logged out users compared to #10871

This change doesn't resort to dummy wallets and maintains the throwing behavior of AudiusWalletClient, which feels correct.

AudiusWalletClient throws when the user is not logged in and tries to sign something, so catch that when initializing the signature for the Eth relay.

There's an additional bug here in that the eth relay won't have its signature reinitialized on log in. That will require a separate fix.

How Has This Been Tested?

Trending loads.

Copy link

changeset-bot bot commented Dec 31, 2024

⚠️ No Changeset found

Latest commit: e911fec

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

@raymondjacobson raymondjacobson left a comment

Choose a reason for hiding this comment

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

Are we confident that this is the only place where this will catch potential issues? I like this change more, but it feels like a feature change rather than a migration

@rickyrombo
Copy link
Contributor Author

@raymondjacobson Not 100% confident there's no other places, would have to check for direct usage of the signMessage and ilk. And yeah agreed that it's not a pure migration change

@raymondjacobson
Copy link
Member

@raymondjacobson Not 100% confident there's no other places, would have to check for direct usage of the signMessage and ilk. And yeah agreed that it's not a pure migration change

I'm down to let this go in and see what we find

const signature = await audiusWalletClient
.signMessage({ message })
.catch((e) => {
console.warn(e)
Copy link
Member

Choose a reason for hiding this comment

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

probably should not be a warn. will make for a really messy console

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah fwiw this was a quick and dirty impl. I think doing this "right" would be throwing a specific error type and filtering for that specific error before swallowing it (w/o log)

@pull-request-size pull-request-size bot added size/M and removed size/XS labels Jan 2, 2025
@raymondjacobson raymondjacobson enabled auto-merge (squash) January 2, 2025 19:48
@raymondjacobson raymondjacobson merged commit 3c1ce7c into main Jan 2, 2025
9 checks passed
@raymondjacobson raymondjacobson deleted the mjp-fix-logged-out branch January 2, 2025 19:55
audius-infra pushed a commit that referenced this pull request Jan 4, 2025
[6928844] Revert tan-query changes on main (#10907) Andrew Mendelsohn
[0f13539] [PAY-3750] Remove unused exports and dead code - part 4 (#10903) Farid Salau
[fd2da0c] Switch react-lottie for lottie-react (#10905) Raymond Jacobson
[4d79dda] [PAY-3750] Remove unused exports and dead code - part 3 (#10902) Farid Salau
[3f3cc26] [PAY-3750] Remove unused exports and dead code - part 2 (#10901) Farid Salau
[f5fc67b] Fix wrong data getting written to queryClient (#10900) Andrew Mendelsohn
[0a000c7] [PAY-3750] Remove dead code in web - part 1 (#10897) Farid Salau
[3074cc2] [PAY-3729] Fix issues with cover photos and challenges (#10891) Randy Schott
[81f9d83] [C-5588] Replace useGetTrackById usages with useTrack (#10889) Andrew Mendelsohn
[b6c0d5f] [PAY-3741] Fix playback immediately after purchase (#10895) Raymond Jacobson
[f882ea1] Refactor primeData helpers (#10893) Andrew Mendelsohn
[eeaa32d] Fix cache syncing (#10894) Dylan Jeffers
[954e931] Misc web package cleanup (#10885) Raymond Jacobson
[cf1aff3] [C-5589] Migrate collections to react query (#10886) Dylan Jeffers
[6c82c79] Fix mobile prettier (#10888) Dylan Jeffers
[067a5ec] [PAY-3740] Stop propagation on gated conditions pill (#10887) Raymond Jacobson
[5301258] Fix SSR rendering issues (#10884) Randy Schott
[ffdf3bd] [PAY-3739] Fix folder expansion (#10883) Raymond Jacobson
[99dc254] [C-5587] Migrate users hooks to react query (#10881) Dylan Jeffers
[3c1ce7c] [PAY-3748] Fix logged out SDK initialization (#10873) Marcus Pasell
[496e3b4] Fix various console warnings (#10872) Dylan Jeffers
[5e8699b] Small fix to mobile edit trackform to show artwork on upload (#10880) Kyle Shanks
[553e251] [C-5582] Fix icon fill warning (#10861) Dylan Jeffers
[614ece7] [C-5581] Remove default props (#10860) Dylan Jeffers
[3ba3784] Fix web tests due to redux-first-history migration (#10874) Dylan Jeffers
[2e4ff12] [C-5578] Replace connected-react-router with redux-first-history (#10858) Dylan Jeffers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants