Skip to content

[PAY-3572] Wait for recovery transaction to finalize before polling balance change#10283

Merged
schottra merged 1 commit intomainfrom
pay-3572
Oct 30, 2024
Merged

[PAY-3572] Wait for recovery transaction to finalize before polling balance change#10283
schottra merged 1 commit intomainfrom
pay-3572

Conversation

@schottra
Copy link
Contributor

Description

There's an edge case with the recovery flow that will cause balance to show zero.

  1. Start the withdrawal flow. Once the Coinflow modal opens, click outside immediately.
  2. Optionally, click again to close the withdrawal modal with the loading spinner
  3. Watch the spinner where the USDC balance would normally be.

Sometimes it will refresh and show an empty balance. This is due to the fact that we don't wait for the recovery transaction to finalize before starting balance polling and balance polling was set to 3 retries spaces 1 second apart. It's possible during certain parts of the day that a Solana transaction that has been confirmed is not yet reflected in the RPC after 3 seconds. So you would poll thrice and then exit the saga, resulting in the balance showing as zero.

To solve this I added a step to wait for finalization on the recovery transaction and also removed the override for retry count so we use the default (120 tries 😅 ). Should be nearly impossible to end up reflecting the wrong balance now.

Although if the transaction fails after multiple retires, we will probably still end up in a bad state. Should be rare though!

How Has This Been Tested?

Local client against staging.

@changeset-bot
Copy link

changeset-bot bot commented Oct 30, 2024

⚠️ No Changeset found

Latest commit: a11766d

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

@audius-infra
Copy link
Collaborator

Preview this change https://demo.audius.co/pay-3572

@schottra schottra merged commit db1979d into main Oct 30, 2024
@schottra schottra deleted the pay-3572 branch October 30, 2024 20:32
samgutentag pushed a commit that referenced this pull request Nov 1, 2024
audius-infra pushed a commit that referenced this pull request Nov 2, 2024
[2c174f7] Update dapp-store build artifacts audius-infra
[980b3a3] Upgrade react to 18.3.1 (#10315) Dylan Jeffers
[6a8368d] [PAY-3564][PAY-3567][PAY-3566] Rights attribution enhancements (#10307) Farid Salau
[d59b743] Add fast crypto patch (#10313) Dylan Jeffers
[ae6d881] [C-5342] Upgrade react-native to 0.75 (#10301) Dylan Jeffers
[9cf8e42] Use skeletons for track and collection screens (#10310) Andrew Mendelsohn
[0d9359b] Fix react-native patch (#10309) Dylan Jeffers
[2bf8d52] [QA-1807] Fix Profile Page: Add entry to totalTileHeight map of 140 for grid lineup variant (#10308) Marcus Pasell
[5a8730a] Add react-native patch to fix animation error (#10306) Dylan Jeffers
[dacd66a] Fix fastlane version number check (#10296) Dylan Jeffers
[0915236] [C-5360] Bottom bar screens deferred loading perf improvement (#10305) Andrew Mendelsohn
[4fe0ff1] Trim whitespace in discovery node block list (#10303) Sebastian Klingler
[cf7cb61] [C-5301] Update track and collectino unfurl string order (#10300) Kyle Shanks
[61dc74d] [C-5305] Fix profile page tile text overflowing (#10298) JD Francis
[dbee776] Add reply comment animation to web (#10292) Kyle Shanks
[0667d35] [PAY-3560] Add cover attribution and publishing rights to RN (#10272) Farid Salau
[6806bff] [C-5347] Speed up CollectionScreen transition and first render (#10288) Andrew Mendelsohn
[6745685] Make is_stream_gated and is_download_gated nullable in upload schema (#10293) Sebastian Klingler
[e3eec4b] [C-5430] Make mobile CTA preferred over sign up CTA (mobile web) (#10281) JD Francis
[d569acc] Cleanup TrackScreen snappiness (#10284) Reed
[a0ff433] [C-5294] Fix mobile bio description links positioning (#10287) Sebastian Klingler
[2e24795] Make track description text selectable on web (#10260) Sebastian Klingler
[cd2cda2] [C-5283] Fix comment count bugs + add tests (#10275) JD Francis
[27df795] Undo temp hack used during account endpoint migration (#10285) Randy Schott
[db1979d] [PAY-3572] Wait for recovery transaction to finalize before polling balance change (#10283) Randy Schott
[575515d] [C-5061] Add fade in animation to comments (#10276) Kyle Shanks
[182cb49] Upgrade cocoapods to 1.15.2 (#10278) Dylan Jeffers
[1c01b35] Fix track updates missing userId (#10280) Randy Schott
[6912333] [QA-1794] Reset padding for Safari buttons (#10279) Sebastian Klingler
[a20d6b8] Update ios mobile app icons (#10273) Dylan Jeffers
[018ad17] [PAY-3414] Remove UserStateManager and switch to loading account from v1 endpoint (#9673) Randy Schott
[c812dae] [C-5338] Increase comment page size from 5->15 (#10253) JD Francis
[63bb78d] [PAY-3562] Remove sanity checks code (#10261) Raymond Jacobson
[8a307c8] [C-5317] Make TrackScreen FAST (#10267) Andrew Mendelsohn
[24dfcfa] [C-5311] Upgrade react-native to 0.74 (#10245) Dylan Jeffers
[6f1c0fa] [QA-1797] Fix double $ (#10270) Raymond Jacobson
[ab3fcf2] [C-5308] Fix react crash in UserGeneratedText (#10266) Sebastian Klingler
[2ea69d0] Blur on submit for comments but not DMs (#10265) Isaac Solo
[d407b4f] Remove SEARCH_V2 feature flag (#10264) Reed
[5e4c963] [C-5309] Reset comment form text on location change (#10263) Kyle Shanks
[c23e92d] [PAY-3545] Add cover attribution and song ownership to track upload (#10184) Farid Salau
[b0fe062] [C-5314] Add load states for comment display names & avatars (#10255) JD Francis
[05dc945] Fix mobile harmony button xs size (#10243) Dylan Jeffers
[2ffb5cd] Bump max audio size to 500mb (#10252) Raymond Jacobson
[4337866] Upgrade mobile version to 1.1.121 (#10254) Dylan Jeffers
[a2803dd] [PAY-3469] Reapply "Update DN to use shortened rewards challenge IDs and specifiers (#9803)" (#10099) (#10158) Marcus Pasell
[c805724] Make Text component respect theme typography (#10086) Marcus Pasell
[af1cca1] Not hardcoded file limit error message (#10247) JD Francis
[1bbba4b] [C-5306] Update UserGeneratedText Links to show url on fetch fail (#10248) Kyle Shanks
[da3cc8e] [QA-1789] Fix more by artist width (#10241) Andrew Mendelsohn
[2ab68ed] [C-5310] Fix comment notification deep links (#10240) 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.

5 participants