Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Sam/fix sell ramps max #5790

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

Merged
samholmes merged 2 commits into develop from sam/fix-sell-ramps-max
Oct 22, 2025
Merged

Sam/fix sell ramps max #5790

samholmes merged 2 commits into develop from sam/fix-sell-ramps-max
Oct 22, 2025

Conversation

@samholmes
Copy link
Contributor

@samholmes samholmes commented Oct 17, 2025
edited by cursor bot
Loading

CHANGELOG

Does this branch warrant an entry to the CHANGELOG?

  • Yes
  • No

Dependencies

none

Requirements

If you have made any visual changes to the GUI. Make sure you have:

  • Tested on iOS device
  • Tested on Android device
  • Tested on small-screen device (iPod Touch)
  • Tested on large-screen device (tablet)

Note

Implements proper sell Max by using wallet max spend and passes an optional max cap to providers; updates UI and quote handling to use this and simplifies input disabling.

  • UI/Scenes:
    • RampCreateScene: Implement async Max for sell by computing wallet max spend (getMaxSpendExchangeAmount) and setting exchangeAmount.max to a string cap; choose last-used input by direction. Replace sortedQuotes with allQuotes usages; simplify display logic and input disabling; support showing crypto amount from exchangeAmount.max when applicable.
  • Types:
    • RampExchangeAmount.max now accepts string | true with docs (optional upper bound for provider max).
  • Providers:
    • Banxa, Bity, Moonpay, Paybis, Revolut, Simplex: Treat max as a request flag and honor optional max cap; clamp computed max amounts to cap and adjust requests/quotes accordingly (including re-quoting for Revolut).

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


Copy link
Contributor Author

This PR changed from using balance to using the max-spendable for a wallet for max sell feature. This is because the max amount that can be sold should account for fees.

cursor[bot]

This comment was marked as outdated.

export type RampExchangeAmount =
| {
max: true
max: string|true
Copy link
Contributor

@swansontec swansontec Oct 21, 2025

Choose a reason for hiding this comment

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

It would be nice to add a comment explaining the difference between the two.

amount = maxAmountLimit
}
}
}
Copy link

@cursor cursor bot Oct 21, 2025

Choose a reason for hiding this comment

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

Bug: Crypto Limits Applied Incorrectly to Fiat

The maxAmountLimit, which represents a crypto amount, is incorrectly applied to fiat amounts within the fetchQuotes function for both Moonpay and Paybis. This causes fiat transactions to be limited by crypto maximums, even when the amountType is 'fiat'.

Additional Locations (1)

Fix in Cursor Fix in Web

Copy link
Contributor Author

@samholmes samholmes Oct 22, 2025

Choose a reason for hiding this comment

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

This is a corner-cut. We're assuming this API is only used for sell quotes for now (which it is). Maybe some TODO comments are warranted, but time is the constaint.

@samholmes samholmes merged commit e951e7d into develop Oct 22, 2025
3 checks passed
@samholmes samholmes deleted the sam/fix-sell-ramps-max branch October 22, 2025 00:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@cursor cursor[bot] cursor[bot] left review comments

@swansontec swansontec swansontec approved these changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /