Skip to content

refactor: improve UTXOPicker sheet UX#3949

Open
ajaysehwal wants to merge 3 commits intoZeusLN:masterfrom
ajaysehwal:refactor-utxo-picker
Open

refactor: improve UTXOPicker sheet UX#3949
ajaysehwal wants to merge 3 commits intoZeusLN:masterfrom
ajaysehwal:refactor-utxo-picker

Conversation

@ajaysehwal
Copy link
Copy Markdown
Contributor

@ajaysehwal ajaysehwal commented Apr 6, 2026

Description

Relates to issue: ZEUS-0000

Please enter a description and screenshots, if appropriate, of the work covered in this PR

Before After

This pull request is categorized as a:

  • New feature
  • Bug fix
  • Code refactor
  • Configuration change
  • Locales update
  • Quality assurance
  • Other

Checklist

  • I’ve run yarn run tsc and made sure my code compiles correctly
  • I’ve run yarn run lint and made sure my code didn’t contain any problematic patterns
  • I’ve run yarn run prettier and made sure my code is formatted correctly
  • I’ve run yarn run test and made sure all of the tests pass

Testing

If you modified or added a utility file, did you add new unit tests?

  • No, I’m a fool
  • Yes
  • N/A

I have tested this PR on the following platforms (please specify OS version and phone model/VM):

  • Android
  • iOS

I have tested this PR with the following types of nodes (please specify node version and API version where appropriate):

On-device

  • LDK Node
  • Embedded LND

Remote

  • LND (REST)
  • LND (Lightning Node Connect)
  • Core Lightning (CLNRest)
  • Nostr Wallet Connect
  • LndHub

Locales

  • I’ve added new locale text that requires translations
  • I’m aware that new translations should be made on the ZEUS Transfix page and not directly to this repo

Third Party Dependencies and Packages

  • Contributors will need to run yarn after this PR is merged in
  • 3rd party dependencies have been modified:
    • verify that package.json and yarn.lock have been properly updated
    • verify that dependencies are installed for both iOS and Android platforms

Other:

  • Changes were made that require an update to the README
  • Changes were made that require an update to onboarding

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request refactors the UTXOPicker component by replacing the standard Modal with a ModalBox styled as a bottom sheet and improving state management for UTXO selection. Key changes include adding a draft state for modal selections, implementing mount checks for asynchronous label loading, and enhancing type safety. The review feedback suggests performance optimizations such as parallelizing label fetching with Promise.all and moving the renderItem function to a class method to prevent unnecessary re-renders, as well as simplifying the keyExtractor logic to avoid redundant fallback code.

Comment thread components/UTXOPicker.tsx Outdated
Comment thread components/UTXOPicker.tsx Outdated
Comment thread components/UTXOPicker.tsx
@ajaysehwal ajaysehwal force-pushed the refactor-utxo-picker branch from a7b3e00 to 2ef1bc5 Compare April 6, 2026 08:56
@kaloudis kaloudis modified the milestones: v13.0.0, v13.1.0 Apr 8, 2026
Copy link
Copy Markdown
Contributor

@shubhamkmr04 shubhamkmr04 left a comment

Choose a reason for hiding this comment

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

Simulator.Screen.Recording.-.iPhone.17.Pro.Max.-.2026-04-17.at.15.22.43.mov

nit: we should have some top and bottom padding in this component + remove the vertical scroll bar

@ajaysehwal ajaysehwal force-pushed the refactor-utxo-picker branch from a5c4e18 to 49c8ed0 Compare April 17, 2026 15:08
@ajaysehwal ajaysehwal requested a review from shubhamkmr04 April 17, 2026 15:10
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.

3 participants