-
Notifications
You must be signed in to change notification settings - Fork 23
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
feat: add 'Max' button to sending on-chain screen #1931
Conversation
Mhm, I would just leave the logic with 0 and add a |
Maybe it can be some kind of toggle - when pressed, it becomes surrounded by blue and enabled. When tapped again, the background becomes white, unlocking the edit field. Otherwise, it could be a regular toggle/switch. |
I like it. |
8c6e19e
to
0036264
Compare
_controller.text = _amount.formatted(); | ||
Amount amt = widget.destination.amount; | ||
amt = amt.sats == 0 ? Amount(1000) : amt; | ||
logger.i(amt); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess the logger is not needed anymore.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch, thanks!
@@ -163,7 +177,7 @@ class _SendOnChainScreenState extends State<SendOnChainScreen> { | |||
keyboardType: TextInputType.number, | |||
textAlign: TextAlign.center, | |||
decoration: const InputDecoration( | |||
hintText: "0.00", | |||
hintText: "1000", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't the hintText
be 0?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It could be, but we are setting it to 1000 as the default in any case
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't run it yet, but from what I see this should be fine.
0036264
to
f24a8de
Compare
f24a8de
to
a881122
Compare
Proof of concept for #1925; major issue is how this should be handled in the amount field (see #1925 (comment)). This is one possible solution but isn't the greatest as
That being said, it is still editable by the user instead of being an entirely new mode of interaction, which is a plus.
Resolves #1925