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-2389] Perform recoveries via payment router to allow indexing #7306

Merged
merged 4 commits into from
Jan 24, 2024

Conversation

schottra
Copy link
Contributor

Description

This changes sends recovery transactions through payment router so that we can leverage the indexing work added by #7249 .

I opted to split out the recovery logic and write a separate transaction generation function for this flow. Though it does lean on the same slightly quirky underlying usage of getPurchaseContentWithPaymentRouterInstructions. The other minor change is the addition of the recovery memo.

fixes PAY-2389

How Has This Been Tested?

Tested locally against production discovery.

Copy link

vercel bot commented Jan 24, 2024

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

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
audius-web-ssr ⬜️ Ignored (Inspect) Visit Preview Jan 24, 2024 3:56pm

@audius-infra
Copy link
Collaborator

Preview this change https://demo.audius.co/pay-2389-recovery-memo

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.

amen 🙌

@@ -393,7 +401,8 @@ function* recoverPurchaseIfNecessary() {
const audiusBackendInstance = yield* getContext('audiusBackendInstance')

try {
yield* call(waitForValue, getFeePayer)
const feePayerString: string = yield* call(waitForValue, getFeePayer)
Copy link
Member

Choose a reason for hiding this comment

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

type needed because the helper is not typed i assume?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Correct. Even has a comment about how it would be nice for the helper to be typed :-D

})

if (res) {
console.debug(`Recovery transaction succeeded: ${res}`)
Copy link
Member

Choose a reason for hiding this comment

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

super nit but i would throw if not res and return res if it succeeds

Copy link
Contributor Author

@schottra schottra Jan 24, 2024

Choose a reason for hiding this comment

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

We're already throwing in the 'not' case, just not using an else. I'm not sure if it makes sense to return the response here since the calling function won't need it or use it (The calling function being watchRecovery which is just watching for an action and then calling this function in response). But I suppose if you wanted to compose this function somewhere else, having access to the response returned would be useful. So I shall add it.

@audius-infra
Copy link
Collaborator

Preview this change https://demo.audius.co/pay-2389-recovery-memo

@schottra schottra merged commit ad279c9 into main Jan 24, 2024
19 of 21 checks passed
@schottra schottra deleted the pay-2389-recovery-memo branch January 24, 2024 16:42
audius-infra pushed a commit that referenced this pull request Jan 27, 2024
[a15e3d8] [PAY-2400] Break CoinflowWithdrawModal out into its own modal (#7357) Marcus Pasell
[f4fe982] Limit query length in verbose check (#7360) Raymond Jacobson
[949cdd2] [INF-650] Fix PublicSite history bug (#7356) Sebastian Klingler
[b0ce935] Run docker prune synchronously at the end of jobs (#7355) Danny
[0860c5d] [PAY-2401] Update button/copy of withdrawal (#7351) Raymond Jacobson
[bf769ec] [PAY-40] Make Rewards Modal Scrollable (#7353) Marcus Pasell
[5b0c364] Bump version to 0.6.24 audius-infra
[e693ef6] Use rendezvous when gossiping ops (#7354) Steve Perkins
[5dc8965] Fix redis hoisting in relay (#7349) Theo Ilie
[f1359a9] Update pg_restore to v15 (#7346) Theo Ilie
[07bab83] [C-3729] Move top genre query to use aggregates (#7342) Raymond Jacobson
[8d7720e] Fix docker push-ddex (#7347) Michelle Brier
[c38f442] [C-3728] Add dominant genre support to aggregate_user (#7340) Raymond Jacobson
[0513090] Fix sign up rate-limiting issues (#7344) Dylan Jeffers
[1bcc737] Don't prune most recent images (#7337) Danny
[0cad4ed] [PAY-2354] Specify quality during track download (#7341) Reed
[e73e441] DDEX cleanup and remove unused dependencies (#7339) Michelle Brier
[610fd56] [C-3641] Clear sign up data on log out (#7338) JD Francis
[4f27e83] [INF-571] Add sentry logging to SSR worker (#7331) Sebastian Klingler
[808b195] [PAY-2386] Block add to playlist for library on stream gated (#7299) Raymond Jacobson
[8a38728] [C-3234] Update today date to include time so that tracks uploaded on the same day don't mix (#7335) Kyle Shanks
[e467583] Add mongoDB to ddex webapp (#7330) Michelle Brier
[bd56e2b] Remove GA from protodash build process (#7334) Theo Ilie
[0bdf871] Fix staging web deploy (#7332) Sebastian Klingler
[e19666f] SSR Follow ups (#7318) Sebastian Klingler
[3540e14] Merge "Link SP to Audius Profile" feature branch to main (#7298) nicoback2
[c49b8fc] Bump version to 0.6.23 audius-infra
[138ed9b] TCR Updates: cron and db init (#7324) alecsavvy
[318acec] PROTO-1580: use redis to store aao state and allow initial relay (#7310) alecsavvy
[69299ad] Fix Attestations (again) (#7329) Marcus Pasell
[7d11bd8] Hide audio onramp when all supported providers are not allowed (#7302) Raymond Jacobson
[83efcbe] Misc New Sign Up Select Artist fixes (#7325) JD Francis
[88b6c6a] [PAY-2238] Improve balance display with recovery process (#7322) Randy Schott
[8e53a7f] Fix sign up saga bug on native (#7323) JD Francis
[27f6438] Fix existing discovery attestations (#7320) Marcus Pasell
[692f60a] Update cash copy (#7321) Raymond Jacobson
[c00fad8] Build openresty image on release (#7319) Theo Ilie
[7b53f91] ⚠️ [INF-547] SSR Track Page (#7213) Sebastian Klingler
[d557552] Change redis DN key (#7317) Theo Ilie
[1329083] [QA-733] Dedupe albums and playlists on profile (#7316) Andrew Mendelsohn
[dcc2f61] [PAY-2394][PAY-2391][PAY-2393] Address misc coinflow withdrawal ux (#7312) Raymond Jacobson
[6005824] Fix payment router recovery indexing using wrong address for comparison (#7314) Randy Schott
[d58ac8f] Prune the docker cache more frequently (#7315) Danny
[19ea929] Fix hash routing check in index.html (#7297) Raymond Jacobson
[6b31794] Fix all caps metric name (#7313) JD Francis
[562b388] [C-3668] Improve artist previews (#7308) Dylan Jeffers
[87803d7] [C-3722] Fix scrolling on create login details page (#7311) JD Francis
[0f96753] [PAY-2376] Stems & Downloads section UI visibility according to access (#7275) Reed
[e732d23] [PAY-2372] Web summary table header clickable (#7293) Reed
[d3c5f17] add timeout to ga for faster healthz response (#7296) alecsavvy
[e8707b8] [C-3667] Improve preview hint, remove duplicate navigation (#7307) Dylan Jeffers
[e7863e0] [C-3702 C-3672] Fix sign-up cover-photo issues (#7301) Dylan Jeffers
[ad279c9] [PAY-2389] Perform recoveries via payment router to allow indexing (#7306) Randy Schott
[3b997ca] Bump version to 0.6.22 audius-infra
[0f9430c] Increase crudr sweep interval, add caching. (#7292) Steve Perkins
[439f10b] Add ChallengesApi, RewardManager to SDK (#7026) Marcus Pasell
[3f55d5d] [C-3718] Fix follow-artist metrics (#7305) Dylan Jeffers
[66bd8ab] [C-3712, C-3719] Fix loading of suggested tracks (#7303) Andrew Mendelsohn
[79bd9bc] [C-3697, C-3713, C-3714] Copy updates; add missing overflow menu items (#7304) Andrew Mendelsohn
[8211796] Remove download progress on ios (#7300) Reed
[8c1293d] [C-3575] Moar sign up metrics (#7288) JD Francis
[17f3a6c] [Web][Libs] QA for Link Audius Profile to Dashboard Wallet feature [C-3683] [C-3686] (#7283) nicoback2
[236f571] Fix logged out state track access (#7291) Saliou Diallo
[e78dfb9] Fix logged out state track access on client (#7295) Saliou Diallo
[e87fd07] [PAY-2327] Add stem upload row (#7277) Saliou Diallo
[8e9c243] [C-3703] Reroute away from signup if user already has 3 followees (#7294) JD Francis
[9cd65c6] Re-land #2 of ts env (#7290) Raymond Jacobson
[d9300bf] [C-3710] Continuous playback (#7278) Dylan Jeffers
[460c381] [C-3707] Remove text-input font scale (#7280) Dylan Jeffers
[f401fb3] [C-3716] Update sign up recovery flow for new sign up (#7289) Kyle Shanks
[f118aeb] [PAY-2368] Add lockAmount flag to web withdrawals (#7286) Randy Schott
[4b87ece] [C-3679] Filter out unowned collections from add modal and drawer (#7244) Andrew Mendelsohn
[2245cb9] [PAY-2375] Tag @audius in purchase tweets (#7274) Reed
[3887389] Revert "[C-3510] Re-land typescript env changes (#7272)" (#7287) Raymond Jacobson
[00ca201] use abis within healthz (#7276) alecsavvy
[c75590f] Bump version to 0.6.21 audius-infra
[1023c8d] Updates deprecated vscode settings (#7273) Randy Schott
[1730644] [PAY-2238][PAY-2242][PAY-2248] Adds more robust payment router indexing support (#7249) Randy Schott
[e147d2e] [C-3510] Re-land typescript env changes (#7272) Raymond Jacobson
[4e1b7fe] Fix mobile track pages due to collection check (#7285) Dylan Jeffers
[582c37d] DDEX standalone node (#7281) Michelle Brier
[568d677] Misc Sign Up QA Fixes (#7260) JD Francis
[85061bd] [C-3699, C-3700] Edit albums on mobile (#7270) Andrew Mendelsohn
[0e88152] Use defaults for trending track checks (#7279) Theo Ilie
[20f9ebd] [C-3689] Fix follow artists not happening if you wait too long on sign up (web) (#7257) JD Francis
[a8cca23] Fix desktop track tile title width (#7269) Dylan Jeffers
[81e8c8a] [DVRL-3] optimize image assets (#7238) Sam Gutentag
[df20e33] PROTO-1607: healthz rm GA dependency (#7264) alecsavvy
[fd8929e] [C-3696] Fix lineups and recommendations (#7263) Dylan Jeffers
[bbad3fe] Revert "[C-3510] Move mobile env from system config to ts env (#6935)" (#7268) Raymond Jacobson
[ac119fe] Make ddex tRPC Dockerfile run (#7261) Theo Ilie
[87f81b6] Attempt to circumvent docker-compose regression (#7266) Danny
[b48855b] Bump version to 0.6.20 audius-infra
[739ddf8] qm sync: handle non-200 status, more tests. (#7265) Steve Perkins
[64e38bc] [PAY-2367] Add migration to repair tips (#7252) Raymond Jacobson
[1ebec24] [C-3510] Move mobile env from system config to ts env (#6935) Raymond Jacobson
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.

4 participants