Uh oh!
There was an error while loading. Please reload this page.
[PAY-3645] Cleanup identity and migrate some libs usage - #10670
Conversation
🦋 Changeset detectedLatest commit: 206b9f8 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
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 |
| export * from './api/playlists/types' | ||
| export * from './api/tracks/types' | ||
| export * from './api/users/types' | ||
| export * from './middleware' |
There was a problem hiding this comment.
Oops this isn't actually used. But I'm going to leave it in because it'll be needed for making the IdentityApi class anyway.
| const ownerWallet = params.wallet | ||
| // delete wallet object so it's not passed to identity | ||
| // @ts-ignore | ||
| delete params.wallet |
There was a problem hiding this comment.
is this safe? kinda feels scary. can we spread without instead?
There was a problem hiding this comment.
Oh duh, spread is a much better idea. I just moved this code without thinking about it too much. Will update.
| // delete wallet object so it's not passed to identity | ||
| // @ts-ignore | ||
| delete obj.wallet | ||
| // TODO: Use regular `fetch` and same request patterns as SDK |
There was a problem hiding this comment.
cool, yes pls no axios ... except in node lols
| audiusBackendInstance, | ||
| sdk | ||
| }) | ||
| const result = yield* call([identityService, identityService.recordIP]) |
Uh oh!
There was an error while loading. Please reload this page.
[8334ed0] [C-5508, C-5510, C-5511] Track Replace QA 2 (#10719) Kyle Shanks [c3617c1] Remove a few miscellaneous libs references (#10715) Randy Schott [3ff1c0e] [C-5524] Sync account details when guest account is created (#10709) Isaac Solo [0609c40] [QA-1864][PAY-3690] Migrate searchTags to SDK (#10706) Randy Schott [b8b3cac] [c-5523] Update inverse color, fix segmented control (#10710) Dylan Jeffers [b2b8eb7] [PAY-3675] Fix issues with scheduled releases (#10711) Sebastian Klingler [5f58ad2] [C-5509] Fix track title reset on replace track edit (#10708) Kyle Shanks [8c4ea49] Misc client analytics tweaks (#10704) JD Francis [cbcb93d] [PAY-3622] Update encryption patterns and add manager delegation (#10690) Farid Salau [e1fe442] [C-5519, C-5521] Add guest mode UI in claim rewards email (#10697) Dylan Jeffers [b0ac142] [PAY-3692] [PAY-3650] Use generate_preview endpoint to improve editing of track previews (#10703) Sebastian Klingler [7c654dc] [C-5505] Fix default track field visibility (#10702) Kyle Shanks [bd0c8ea] Feature flag fast referral signup (#10701) Dylan Jeffers [849bd9e] [C-5503, C-5506] Prevent the user from closing the mobile track replace progress drawer (#10700) Kyle Shanks [22e6fc2] [C-5466] Enable pay with anything and changing guest email (#10695) Isaac Solo [9fcea2c] [PAY-3687] Fix updateCreator wallets issue (#10692) Raymond Jacobson [dfc955d] Make getKeypair async since hedgehog init is async (#10698) Randy Schott [5753021] Fix premium modal footer for signed in users (#10694) Isaac Solo [b9870c4] Refactor profile progress to ts (#10664) Dylan Jeffers [ada3972] [C-5492] Guest sign-up copy and improvements (#10682) Dylan Jeffers [68c830a] [C-5441] Handle sign on redirects (#10683) Dylan Jeffers [2eff7e0] [PAY-3689] Migrate getRootSolanaAccount to an injected common service (#10685) Randy Schott [b12e135] [PAY-2937] Migrate remaining Identity off libs (#10684) Randy Schott [79806b4] Fix mobile lint (#10687) Reed [146ffef] [PAY-3688] Migrate buy-audio to sdk (#10680) Reed [9dafdb2] Fix syncing of guest accounts upon profile completion (#10673) Isaac Solo [015457a] Remove one-to-many-dms feature flag (#10671) Dylan Jeffers [4c89718] [PAY-3645] Cleanup identity and migrate some libs usage (#10670) Randy Schott [16743bb] Pass in ethWallet to decorateCoinflowWithdrawalTransaction (#10676) Reed [18b2d64] Fix connected wallet wAUDIO balance fetching (#10675) Reed [81a4284] [PAY-3649] Fix something went wrong on transactions page (#10679) Andrew Mendelsohn [b13e2a4] Fix buy button width (#10674) Raymond Jacobson [a92a0e6] Fix sentry mobile scope issue (#10672) Raymond Jacobson [cbd8023] Update theme-v2 matrix colors (#10669) Dylan Jeffers [4fad72d] [C-5464] Track Replace QA 1 (#10668) Kyle Shanks [b61b37f] Migrate native TextButton to PlainButton and Divider to harmony (#10666) Dylan Jeffers [4a39102] [C-5479] Add error states for track replace progress (#10656) Kyle Shanks [f28f80f] Revert "[PAY-3643] Improve feed performance (#10661)" (#10667) Raymond Jacobson [dd86ac4] [PAY-3647] Migrate getTokenAccount, createUserBankIfNeeded to sdk (#10662) Reed [dbe38e5] [C-5488] Add hit slop to vanity metrics (#10665) Dylan Jeffers [e79c926] [C-5456] Migrate guest checkout user creation to SDK (#10630) Isaac Solo [1a99df3] Migrate `getAddressWAudioBalance` to sdk (#10654) Reed [6f40973] [PAY-3641] Migrate sendWAudioTokens to sdk (#10652) Reed [09f2da9] [PAY-3643] Improve feed performance (#10661) Raymond Jacobson [6226f09] Sign Up Hardening 2.5 (#10659) JD Francis [bd2309f] C 5473 guest mode UI (#10663) Dylan Jeffers [2233145] [PAY-3637] Add sentry RN perf monitoring (#10621) Farid Salau [2c88017] [PAY-3640] Convert getAssociatedTokenAccountInfo to sdk (#10651) Reed [d4aba7b] [PAY-3632] Migrate socials code off of libs (#10657) Randy Schott [88cdd53] Sign up hardening round 2 (#10643) JD Francis [abed2fe] [C-5481] Mobile harmony-theme-v2 QA (#10653) Dylan Jeffers [7b81b57] Update harmony v2 colors (#10637) Dylan Jeffers [3062618] [PAY-3621] Add email capture after successful purchase (#10577) Farid Salau [976d53c] [C-5455] Add mobile guest checkout sign up (#10607) Dylan Jeffers [353040a] Revert "Downgrade mobile apps to 1.1.128" Dylan Jeffers [0471175] Misc libs cleanup (#10634) Raymond Jacobson [8630e5b] Downgrade mobile apps to 1.1.128 Dylan Jeffers
Description
Majority of this PR is refactoring common/identity to be constructed with the same
AudiusWalletClientthat we pass to SDK so that it can just do its own signing instead of needing a wallet as an argument to everything. This is also a half step toward making it derive from the SDKBaseAPIclass so that it behaves like any other SDK interface. I didn't want to do that full change because I suspect a lot of code calling it relies on the exact behavior and structure of the current Axios-based requests.To make this happen, I moved the parts of
IdentityServicethat are involved in Hedgehog functionality (GetFn,SetFn,SetAuthFn) intoauthServiceand duplicated some of the request code. This allows us to create theauthServicefirst, then create the Hedgehog-basedAudiusWalletClient, then use said client to initializeIdentityService.This also means that the existing functions in
IdentityServicewere updated to not take in a wallet address. And I cleaned up some of the signature logic as well.Lastly, I implemented
createStripeSessionandrecordIPand removed all the extraneous code around those two operations in favor of just calling theIdentityServicedirectly in sagas and hooks.Net negative code changed!
How Has This Been Tested?
Tested locally against staging. Will do a full runthrough of everything I changed against local identity to make sure it's working correctly before merging.