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

Initial Template for Request Payment page #435

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

johnny9
Copy link
Contributor

@johnny9 johnny9 commented Nov 22, 2024

These commits introduce the Request Payment flow. This view is available under the "Receive" tab on the Desktop Wallets main navigation view.

The Request Payment form itself currently only includes fields currently supported by the Qt wallet (label, message, and amount). Follow up PR will add support for local notes.

The Amount field in the Request form takes only valid Satoshi/Bitcoin amounts and supports flipping the units with the associated button toggle.

When the Continue button is pressed the Request Confirmation page gets pushed to the stack will eventually reflect the fields inputted in the previous form backed by the output of the WalletModel result. In its current implemention it just has statically defined properties to check the visual layout. The page also contains an address field with the copy icon that can be used to move the address into your clipboard.

Ubuntu screenshots

@johnny9
Copy link
Contributor Author

johnny9 commented Nov 22, 2024

The piece I'm most concerned about this form is the Amount input field and how to properly sanitize and convert the field. The current object backing it doesnt quite feel right but I am limited by the inability to extend the actual TextInput class.

@johnny9 johnny9 changed the title Request Payment page Initial Template for Request Payment page Nov 22, 2024
{
QString result = text;

// Remove any invalid characters
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this the right thing to do?
QT gui simply refuses to paste when there are invalid characters.

@MarnixCroes
Copy link
Contributor

The piece I'm most concerned about this form is the Amount input field and how to properly sanitize and convert the field. The current object backing it doesnt quite feel right but I am limited by the inability to extend the actual TextInput class.

yeah there are a couple weird things:

  • decimals when having sats as unit
  • unnecessary leading zeroes when switching between sats en BTC. i.e. it can display things like 000100 sats

This control is primarily used in wallet forms where the user
is expected to input values for sending or receiving transactions.
It contains a Label describing the input as well as a TextInput
where the actual string is entered. A Icon is also available on
the right side of the component for extra actions.
The copy icon will be used to initiate a copy to clipboard
when it is clicked.
The flip-veritcal icon is primarily used when flipping the units
displayed when clicked
The pending icon will be used to show the status of transactions
BitcoinAmount is a helper object can be used to manage inputs in
sats or btc.
This page contains the form for the user to fill out to create
a payment request.
This page contains the details of a payment request. It is
pushed onto the RequestPayment page's stack after the user
has clicke don Continue.
@johnny9
Copy link
Contributor Author

johnny9 commented Nov 25, 2024

From from 1b869eb to adff8f

  • Rebased with main and used PageStack in RequestPayment.qml
  • Fixed lint issue
  • Fixed mac build issue with missing bitcoinamount.h in Makefile

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