Skip to content

fix: do not fetch payment methods until a user has selected a token#8342

Open
georgeweiler wants to merge 3 commits intomainfrom
fix/ramps-token-selection
Open

fix: do not fetch payment methods until a user has selected a token#8342
georgeweiler wants to merge 3 commits intomainfrom
fix/ramps-token-selection

Conversation

@georgeweiler
Copy link
Copy Markdown
Contributor

@georgeweiler georgeweiler commented Mar 30, 2026

Explanation

Fixes a small bug where payment methods were fetched and set prematurely.

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
  • I've introduced breaking changes in this PR and have prepared draft pull requests for clients and consumer packages to resolve them

Note

Low Risk
Low risk bug fix that only tightens the conditions for when getPaymentMethods is triggered, with updated tests and changelog entry to match.

Overview
Prevents setSelectedProvider from calling getPaymentMethods unless a token is selected and that token isn’t explicitly excluded by the provider, avoiding unfiltered payment-method fetches with an empty crypto parameter.

Updates unit tests to require a selected token for the “no supportedCryptoCurrencies field” case and adds a new test asserting the fetch is skipped when no token is selected, plus a changelog entry documenting the fix.

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

@georgeweiler georgeweiler requested a review from a team as a code owner March 30, 2026 21:33
@georgeweiler georgeweiler requested a review from a team as a code owner March 30, 2026 21:34
@georgeweiler
Copy link
Copy Markdown
Contributor Author

@cursoragent fix the changelog

@cursor
Copy link
Copy Markdown

cursor bot commented Mar 31, 2026

Excellent! I've successfully fixed the changelog by replacing the placeholder #TBD with the actual PR number #8342. The changelog validation now passes, which should resolve the CI failure.

Summary

Fixed the changelog validation error by updating the PR reference in /workspace/packages/ramps-controller/CHANGELOG.md from #TBD to the actual PR number #8342. The changelog validation now passes successfully, which should fix the failing CI check.

Open in Web Open in Cursor 

Co-authored-by: George Weiler <georgejweiler@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants