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

RampCreateScene not auto-populating a 500ドル buy amount #5807

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
Jon-edge merged 1 commit into develop from jon/fix/ramps-default-amount
Oct 24, 2025

Conversation

@Jon-edge
Copy link
Collaborator

@Jon-edge Jon-edge commented Oct 23, 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

Fixes initial fiat auto-fill to only run for buys and when no amount is entered, and updates dependencies accordingly.

  • RampCreateScene:
    • Adjust initial fiat amount logic to apply only on buy and only when exchangeAmount is empty.
    • Fix guard condition to not override when user has started input; correct 'empty' check.
    • Update effect dependencies to include direction.

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


chatgpt-codex-connector[bot] reacted with thumbs up emoji
let abort = false
const applyInitial = async (): Promise<void> => {
if (abort) return
if (abort||direction!=='buy') return
Copy link
Contributor

@samholmes samholmes Oct 24, 2025

Choose a reason for hiding this comment

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

Why are we adding this constraint? Why not have this default amount for sell too?

Copy link
Collaborator Author

@Jon-edge Jon-edge Oct 24, 2025
edited
Loading

Choose a reason for hiding this comment

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

That makes no UX sense. The amount is completely dependent on your balance and what you choose to sell. The buy flow's 500ドル default is an effort to improve our revenue.

Also, it was the task's ask and pretty sure aligns with our legacy behavior.

Copy link
Contributor

@samholmes samholmes Oct 24, 2025

Choose a reason for hiding this comment

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

So the fix is:

const maxSpendExchangeAmount = await getMaxSpendExchangeAmount(
 selectedWallet,
 selectedCrypto.tokenId,
 denomination
)
 
setExchangeAmount({ amount: Math.min(initialFiat, maxSpendExchangeAmount) })

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@Jon-edge Jon-edge force-pushed the jon/fix/ramps-default-amount branch from a153892 to 97e2250 Compare October 24, 2025 20:56
Copy link
Contributor

@samholmes samholmes left a comment

Choose a reason for hiding this comment

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

Please don't remove the default for sell, instead fix it properly

Copy link
Contributor

@samholmes samholmes left a comment

Choose a reason for hiding this comment

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

Please make a new task to add the auto populate to sell and assign it to me in develop sprint

Copy link
Collaborator Author

@Jon-edge Jon-edge merged commit 7daa697 into develop Oct 24, 2025
3 checks passed
@Jon-edge Jon-edge deleted the jon/fix/ramps-default-amount branch October 24, 2025 22:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@samholmes samholmes samholmes 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 によって変換されたページ (->オリジナル) /