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

Add a loading state for rampLastCryptoSelection #5782

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 1 commit into develop from sam/fix-auto-switching
Oct 17, 2025

Conversation

@samholmes
Copy link
Contributor

@samholmes samholmes commented Oct 16, 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

Introduce useRampLastCryptoSelection to await wallet readiness and update RampCreateScene to show a spinner and disable crypto input until selection loads.

  • UI:
    • Update src/components/scenes/RampCreateScene.tsx to use useRampLastCryptoSelection instead of local memoized selection.
    • Handle loading state: hide select-wallet button until loaded, show ActivityIndicator in crypto dropdown, and disable crypto amount input while loading.
  • Hooks:
    • Add src/hooks/useRampLastCryptoSelection.ts using React Query to await account.waitForAllWallets() and return a validated selection with isLoading.

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


cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

Copy link
Contributor

@swansontec swansontec left a comment

Choose a reason for hiding this comment

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

Could optionally make AI happy, but not super important.

{isLoadingPersistedCryptoSelection ? (
<ActivityIndicator />
) : selectedCrypto == null ||
selectedWallet == null ? null : (
Copy link
Contributor

@swansontec swansontec Oct 16, 2025

Choose a reason for hiding this comment

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

I see Cursor's point, but it shouldn't happen because selectedCrypto != null also implies selectedCryptoCurrencyCode != null, and so there's no case where this could happen.

If we want to be paranoid, we could put an extra || selectedCryptoCurrencyCode == null clause to make this explicit.

@samholmes samholmes merged commit 58a2bfc into develop Oct 17, 2025
3 checks passed
@samholmes samholmes deleted the sam/fix-auto-switching branch October 17, 2025 18:28
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 によって変換されたページ (->オリジナル) /