Skip to content
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

Open Channel: use AmountInput to display fundMax #2769

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

myxmaster
Copy link
Contributor

@myxmaster myxmaster commented Jan 23, 2025

Description

This displays the local amount in AmountInput if Use all possible funds is enabled, making it consistent/less flickering to normal view.

I added forceUnit prop to AmountInput to force it to sats mode, which is obviously needed when Use all possible funds is used.

When you disable it again, values get reset properly.

Before Before After
grafik grafik grafik

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):

  • Embedded LND
  • LND (REST)
  • LND (Lightning Node Connect)
  • Core Lightning (CLNRest)
  • LndHub
  • [DEPRECATED] Core Lightning (c-lightning-REST)
  • [DEPRECATED] Core Lightning (Spark)
  • [DEPRECATED] Eclair

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

@myxmaster myxmaster marked this pull request as draft January 23, 2025 18:43
@myxmaster myxmaster force-pushed the improve_displaying_fundmax branch from e61170f to da42480 Compare January 23, 2025 21:25
@myxmaster myxmaster marked this pull request as ready for review January 23, 2025 21:29
@kaloudis
Copy link
Contributor

Why do we have to change the unit to sats when it's toggled?

@myxmaster
Copy link
Contributor Author

myxmaster commented Jan 24, 2025

I think it would be misleading if we had a fiat amount in the amount input, even when it is correctly calculated and the sat amount below in small.
So only ₿ or sats would be good to use, and then I think sats is better.

@myxmaster myxmaster force-pushed the improve_displaying_fundmax branch from da42480 to 726c5ba Compare January 26, 2025 12:13
@myxmaster
Copy link
Contributor Author

(rebased)

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