Skip to content

Conversation

@matthewwalsh0
Copy link
Member

@matthewwalsh0 matthewwalsh0 commented Oct 31, 2025

Explanation

Ensure isLoading is also cleared after refreshing quotes.

References

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've communicated my changes to consumers by updating changelogs for packages I've changed, highlighting breaking changes as necessary
  • I've prepared draft pull requests for clients and consumer packages to resolve any breaking changes

Note

Centralizes isLoading lifecycle in updateQuotes to avoid infinite loading after quote refresh, updates controller logic, tests, and changelog.

  • Quotes Utils (src/utils/quotes.ts):
    • Set transactionData.isLoading = true at start of updateQuotes, and always clear it in finally.
    • Move getStrategy call inside try; wrap quote fetching in try/catch and proceed with empty quotes on failure.
    • Maintain batch transaction sync and totals calculation; update quotes, quotesLastUpdated, and totals.
  • Controller (src/TransactionPayController.ts):
    • Remove manual isLoading toggling around updateQuotes; rely on quotes util.
  • Refresh Logic (refreshQuotes):
    • Stop setting isLoading directly; delegate to updateQuotes.
  • Tests:
    • Update expectations to reflect new isLoading handling and additional update callbacks (e.g., expect 3 calls, apply all callbacks).
    • Adjust state assertions to expect isLoading: false after updates.
  • Changelog:
    • Add Unreleased fix: prevent infinite loading after quotes are refreshed.

Written by Cursor Bugbot for commit 5d42563. This will update automatically on new commits. Configure here.

@matthewwalsh0 matthewwalsh0 marked this pull request as ready for review October 31, 2025 12:48
@matthewwalsh0 matthewwalsh0 requested review from a team as code owners October 31, 2025 12:48
@matthewwalsh0 matthewwalsh0 enabled auto-merge (squash) October 31, 2025 12:49
cursor[bot]

This comment was marked as outdated.

@matthewwalsh0 matthewwalsh0 merged commit 9063409 into main Oct 31, 2025
259 checks passed
@matthewwalsh0 matthewwalsh0 deleted the fix/pay-quote-refresh branch October 31, 2025 13:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants