Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open Channel/Send on-chain: use AmountInput to display fundMax #2769

Merged
merged 2 commits into from
Feb 13, 2025

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)

@shubhamkmr04
Copy link
Contributor

Can we remove Open Channel from title? since its also being changed for onchain txs

@myxmaster myxmaster changed the title Open Channel: use AmountInput to display fundMax Open Channel/Send on-chain: use AmountInput to display fundMax Jan 28, 2025
Copy link
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.

tACK

@kaloudis
Copy link
Contributor

@myxmaster needs a rebase

@myxmaster myxmaster force-pushed the improve_displaying_fundmax branch from beb366a to ade5f5f Compare February 12, 2025 20:32
@kaloudis kaloudis added this to the v0.10.0 milestone Feb 13, 2025
@kaloudis kaloudis merged commit 3bf868a into ZeusLN:master Feb 13, 2025
4 checks passed
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants