Commit Graph

46 Commits

Author SHA1 Message Date
tomFlowee d976ebbb59 Set focus properly after scanning.
In the case where there is no specific input needed, because the amounts
were all specified, we still need to set the focus to the page because
otherwise 'back' / 'esc' don't behave correctly.
2023-11-06 17:17:18 +01:00
tomFlowee 1deccd9226 Make fiat mode an actual bool on BitcoinValue
The CPP now does more of the (heavy) lifting and the UI layer can
ignore
most of the details with regards to there being digits behind the
separator for fiat at all.

The internal change is that the fiat based values are always processed
in cents, even if the cents are not displayed. This solves incorrect
display and generally removes special cases.
2023-10-18 11:43:23 +02:00
tomFlowee c0598d2f88 Fix interaction with this screen.
A Flickable seems to eat mouse clicks by default, so even if there was
no warnings it would stop allowing any interaction with the screen.
2023-09-06 16:21:09 +02:00
tomFlowee 02288299fc Improve BIP activation on startup
For desktop we now properly support starting a payment when
the user clicks on a bitcoincash link in a browser.

For Android the activation logic _should_ work, except that the
Android specific way has yet to be tied to our app.
2023-09-05 20:45:32 +02:00
tomFlowee 69e0fe8869 Finish up BIP70 feature
Squash of 12 commits, this makes the UX actually useful and
we detect errors and show errors and warnings to the user.
This also adds an 'editable' bool to OutputDetail in order to
disable editing of a payment request address.
Additionally, this introduces the ability for a Payment to carry
a raw script instead of an address. So op-return or more complex
payment requests will be sent just fine.

Fun fact is that our broadcast is INV/SendData, which is two
roundtrips and thus slow, which is needed to be sure we get proper
rejection messages.
The sending of the transaction via BIP70 causes the network to
already know about the tx because the server we send it to has
likely much better Internet than we do.
So confirmation from the payment provider is used to show success
instead of the normal way.
2023-09-05 13:38:24 +02:00
tomFlowee bc459f74d5 PaymentProtocol abstraction
The PaymentProtcol class now handles the pasting of a payment uri,
like bip21.

Additionally this adds the feature where we pass in the payment uri on
the commandline which then results in an auto-opened payment screen.
2023-08-30 23:46:00 +02:00
tomFlowee b671dfc3a7 Allow showing address in more cases.
The QR scan page now also allows showing the destination address
while the number keypad is up, being smarter with the layout of
the various lines in order to fit the important info on screen.

Additionally we require the user to first enable the 'edit amount'
option before we make available the option to 'send all'.
2023-08-30 12:50:40 +02:00
tomFlowee bff9cd5dc2 Introduce app-level password feature and more.
We already allowed individual wallets to get PIN-to-Open/PIN-to-Pay
but that is too advanced for most users. Not to mention that encrypted
private keys means a slower payment process and certain types of
features become impossible. Like auto-invoicing (incasso).

The gap, for mobile, is a simple not-encrypting password on startup
of the app which is likely what 80% of the privacy / security minded
people on mibile will be more than happy with.

This adds this mode and additionally streamlines the encrypted modes
of wallets.
2023-07-04 18:39:16 +02:00
tomFlowee 049d735a53 Add decrypt of PinToPay wallet in mobile
this also changes the API propertes that handle encryption details a
little. Making them faster and the meaning follows the logical
conclusion of the naming better.

Specifically:

when needsPinToOpen would return true, now needsPinToPay will also
always return true.
2023-06-30 23:18:31 +02:00
tomFlowee 8db23ba624 Provide a screen to unlock encrypted wallets.
This detects that the currently selected wallet is fully encryted and if
it is, it shows a password request page on top of the current screen.
The default setup aims to have people type a PIN in numbers to unlock
the wallet, but we also provide a way to make it use a textual password
instead.
2023-06-27 20:39:11 +02:00
tomFlowee 973fc94950 when paste is used turn instaPay off
clipboards based addresses are a lot less secure, physically, than
scanning a QR.
So the user really should validate the payment and thus we turn off
instaPay in those cases.
2023-06-11 18:10:06 +02:00
tomFlowee c84af22bc0 Add feedback on incorrect QR.
The scanner doesn't validate the QR, but the Payment object does. So,
verify the result after setting the url on the Payment object and raise
a dialog when the address did not work.
2023-06-05 18:12:29 +02:00
tomFlowee 752cc9b68a Respect amount of incoming payment request.
A payment request, for instance a QR code, which includes an amount to
be paid is expected to not change the to-be-paid amount, uses being
dropped
in the price editing UI is therefore a bit weird. Almost an
anti-pattern.

This honors that concept and when the price is included in the scanned
QR, we change the UI layout to removed the editing widgets and show
static display widgets instead.

This also adds a header menu item to edit the amount to be paid and
get back to the old UI.
Additionally, a new UI is added to show the address we are about to pay
to, likewise reachable from the header menu.
2023-05-31 15:20:11 +02:00
tomFlowee 7806914fc3 Various small fixes and UX improvements. 2023-05-18 21:52:51 +02:00
tomFlowee 4c96b5ee44 Make numerickeyboard have a static height for keys.
This makes the layout look more square and not so cramped.
Make sure that the layouts of the payment pages still fit at the same
time.
2023-05-17 23:26:54 +02:00
tomFlowee 38345aba5a Further design the InstaPay dataset
This is essentially the backend work for the instapay setup.
GUI still needs to be done.
2023-05-16 20:16:12 +02:00
tomFlowee 09b03faab7 Make sure that the hamburger menu is removed on broadcast
We now make sure that the menu accessible from the header is only
there when we are actually on the page where it is relevant.
2023-03-13 18:17:23 +01:00
tomFlowee b133c8fec3 Minor UX fixes 2023-03-13 18:17:23 +01:00
tomFlowee 2a03a3efa6 Re-enable the action.
After moving the AccountSelectorWidget to its own file, the
link to the action was broken. This re-establishes that.
2023-03-13 16:58:05 +01:00
tomFlowee 76b79a1c0a Rename AccountSelector to {}Popup
Following the pattern of ending with what it is.
We now have Widget and Popup and Page.

The idea is that the widgets and popups are re-usable.
2023-03-13 12:14:23 +01:00
tomFlowee 6d036b0721 Move code to new file
Move the code that shows the account info and amount held in it into a
new file called AccountSelectorWidget
2023-03-13 12:14:23 +01:00
tomFlowee 400f16b636 Make loading and using of the PriceInputWidget work
We now can edit the payment details in our new 'build transaction'
screens.
2023-03-13 12:14:23 +01:00
tomFlowee 8bc4e70d09 Move widgets to their own files
Allow them to be re-used.
2023-03-11 22:59:10 +01:00
tomFlowee 8742108fd1 Use bool instead of list-length 2023-02-24 23:48:26 +01:00
tomFlowee c10510b139 Behave correctly on accounts lists
The GUI confused 'userowned' and having a list of wallets.
Basically we can just trust the backend 'accounts' list, making
the GUI eaier to understand.
2023-02-22 22:23:39 +01:00
tomFlowee 018a27ceb0 cleanup; use local palette
In Qt5 the palette was introduced in the Control object (part of Qt-
Quick-Controls-2).
In Qt6 this property was moved to the superclass 'Item'.

This means that we no longer need to refer to a control when using a
palette, every single thing in QtQuick is an Item, afterall.
2023-02-21 16:40:46 +01:00
tomFlowee a8ecf888d6 fix i18n string 2023-02-21 15:52:33 +01:00
tomFlowee 26075e3dc2 Fix colors in this screen too 2023-02-14 18:58:40 +01:00
tomFlowee cf76158e53 Last minute tweaks
Make the error not overlap when using larger text.
2023-02-08 21:11:20 +01:00
tomFlowee 9f39a9f54f Make the logic simpler
Move the logic for fiat to the payment object too and simplify the need
for code by defining this can only be called in the single-output mode.
2023-02-08 20:55:24 +01:00
tomFlowee 9ba23d20e7 Actually add a backspace image. 2023-02-08 20:10:47 +01:00
tomFlowee 028c496712 Various bugfixes and tweaks.
Also remove the testing setup again.
2023-02-08 18:23:18 +01:00
tomFlowee 0273982ea0 Add corrency selector in the pay screen. 2023-02-07 21:00:44 +01:00
tomFlowee eced0ffa15 Next iteration of the PayWithQR page
this solves a bunch of UX problems, but we need to re-add some features
in popups. Which is for tomorrow.
2023-02-06 21:59:55 +01:00
tomFlowee a8695db759 Fix focus after QR scan. 2022-12-21 13:15:33 +01:00
tomFlowee e3a9c6a84e Add support for 'max price'
This changes the payment screen to also have a 'max' button. Indecating
we'll want to sent all available funds in the payment.
2022-12-20 15:20:16 +01:00
tomFlowee c12f8cea64 Cleanup QRScanner QML component design
Avoid the ugly 'Component.onCompleted' and instead make this is a
property 'autostart'.
2022-12-15 14:54:13 +01:00
tomFlowee bdbbdd1726 Remove priceFor overload
The downside of this method is that changes in price don't cause the
result to be re-calculated.
Its not very declarative, in other words.
2022-12-15 14:37:58 +01:00
tomFlowee 94c74de75e Hide wallet name when its the default never used one. 2022-12-08 15:27:59 +01:00
tomFlowee 91ae779f91 Reuse BroadcastFeedback on Mobile
This moves the broadcastfeedback part of the desktop to its own (now
shared) widget, and with minor changes reuses it on the mobile side.
2022-12-08 15:27:59 +01:00
tomFlowee 41d332b697 Make camera screen acceptable and abortable
The camera scanning screen now isn't looking like a total disaster
anymore and I even put a close button on it to allow closing it without
a scan.
2022-12-08 15:27:59 +01:00
tomFlowee 406327becb Finish up basic payment page
Next up; broadcast and feedback.
2022-12-08 15:27:59 +01:00
tomFlowee d37a24d984 Add ObjectShaker to give feedback on bad input
When the user uses the keyboard and that doesn't get accepted, we now
shake the widget we are editing.
2022-12-07 11:22:27 +01:00
tomFlowee 03204fad3e Update the PayWithQR.qml to integrate the nicer editors
This makes most of the widget functional, I'll leave the "slide to pay"
for tomorrow.
2022-12-06 22:39:02 +01:00
tomFlowee 2818cc44f9 Setup the page to have the needed components.
This is mostly without user interaction right now, but all the needed
stuff is on the page to show the visual design.
2022-12-05 21:24:32 +01:00
tomFlowee 55694bf28c Make scanner part feature complete.
We now make the scanner ignore barcodes that do not fit the expected
content.
We now detect 'seedphrase' and 'address' and bip21 type payment urls.
2022-12-05 18:34:53 +01:00