Commit Graph

1457 Commits

Author SHA1 Message Date
tomFlowee c25adfffa0 After an API review.
This simplyfies things and ensures the translations are loaded before
any possible tr() calls.
2023-06-13 15:59:37 +02:00
tomFlowee 42d3c2e96b Make the build-transactions module function
This moves the last of the assets to the module and provides the base
requirements to actually make the featue function from a module.
2023-06-13 15:59:37 +02:00
tomFlowee a73e004998 Move QML and introduce i18n concept for modules 2023-06-13 15:59:37 +02:00
tomFlowee 1220a3839c Start a setup for modules.
This sets up a basic system for creating modules on top of the flowee
pay static lib in a way that is ensured to be isolated (modules can't
accidentally use each other's classes)

The setup is made such that the buildsystem does the hard work on
plugging in a new module, making it so that all you need to do is create
a new dir and a "{something}ModuleInfo.h" file and it will get compiled
in.
The point there is to make it not have any merge conflicts and just make
it dead easy to get started.
2023-06-13 15:59:37 +02:00
tomFlowee 717eafcb1e remove commented out code 2023-06-11 18:20:23 +02:00
tomFlowee f904e5d413 Make the scanner overlay eat mouse events.
This stops clicks from acting on the underlying UI.
2023-06-11 18:10:39 +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 94f52e0c7f Add feature; paste address.
Allow users that start by 'pay' to fulfill the payment also using
clipboard instead by providing a 'paste' button on the scanning screen.
2023-06-11 17:58:27 +02:00
tomFlowee ecc5d03975 UX improvements to prioritize normal usage.
When looking at the real usage of flowee pay, we aim for this
to be used 90% (or more) of the time as a better wallet. Wallet
in the physical sense.

This implies that the vast majority of usage is going to be about
paying or receiving.
A small number of times you'll use it to look up the history of
payments.

As such, its Ok to downgrade the account history and make the main
usage more prominent and easy to find.
2023-06-10 22:41:53 +02:00
tomFlowee efa39e0337 Improve QRcode images based on feedback from A@ron 2023-06-10 22:16:08 +02:00
tomFlowee 1d2fa6728f new version 2023-06-08 23:20:53 +02:00
tomFlowee 2043f4cf5a Import translations from crowdIn 2023-06-08 22:27:48 +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 32f5e5cc95 UX (spacing) fixes
This positions the Dialog more logically and avoids taking space for an
empty label.
2023-06-05 18:10:50 +02:00
tomFlowee 961041cc11 fix token check
Outputs can be null, this is when the outputs are not send to an
address we own.
2023-06-05 16:45:20 +02:00
tomFlowee 49daf7b87e Also show cashtoken indicator on mobile 2023-06-05 10:47:50 +02:00
tomFlowee 37a4e38e5d Handle token UTXOs specially.
Mostly they can not be spent as money, which is basically
what this code does.
2023-06-05 09:58:54 +02:00
tomFlowee 4883de304b Export the cashToken bool to the UI
Make clear that we have a cashtoken output in the UI.
2023-06-05 09:58:06 +02:00
tomFlowee b6165a7308 Remove not needed semicolon 2023-06-04 23:05:52 +02:00
tomFlowee a4fd05d436 Load save cashtoken bool 2023-06-04 22:12:57 +02:00
tomFlowee 8d2f056aac Detect cashtokens being sent to us.
Instead of silently ignoring a cashtoken that is for us, this makes us
match the incoming transaction and remember its a token.
2023-06-04 21:40:46 +02:00
tomFlowee 78830c8aa4 Cleanup call to no longer existing function 2023-06-04 19:20:46 +02:00
tomFlowee fe67c5273e Handle invalid addresses better.
The user input now gets the user interface string 'incorrect' instead of
'unset' if no proper address could be resolved from it.
2023-06-04 19:20:18 +02:00
tomFlowee cd5394c704 Replace assert with check 2023-06-04 18:22:39 +02:00
tomFlowee db7162f4d3 Make editing fiat on scanning QR be default.
When you scan a QR which has no price embedded (just an address) this
makes the default go to fiat (euro/usd etc) for what you type.
2023-06-01 23:39:03 +02:00
tomFlowee fc164996d7 Improve UX about when to switch positions.
As long as the user has not added a second wallet there is no
need to show the name 'initial wallet' and thus we show the
'add wallet' button at the bottom.
2023-06-01 16:31:20 +02:00
tomFlowee f34c1e199f UX fix, this makes the 'cursor' go away at edit end. 2023.05.2 2023-05-31 16:23:23 +02:00
tomFlowee 9adb6f2ae7 Fixlet (spello) in log message. 2023-05-31 15:55:44 +02:00
tomFlowee 49a8a9ce34 Cleanup nice-address usage
A Payment object now has a user-typed address,
a formattedAddress which is a properly formatted cash-address
and last a 'niceAddress' which is the same cash-address but without the
chain prefix.

This cleans up the usage and removes some code from the GUI that did the
string manipulation there.
2023-05-31 15:47:14 +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 e75fb07d9c whitespace 2023-05-31 15:12:17 +02:00
tomFlowee 66ed55823d Tie instapay check to payment-address parsing.
The basic usecases of instapay is that the payment request is filled in
one go (from QR for instance) and thus we try to send.
If that fails (not enough funds or whatever), we disable instapay in
order to avoid 'magic happens' user experiences.
2023-05-31 11:14:12 +02:00
tomFlowee ce07ceb4c2 Rename WalletConfig -> AccountConfig
The account config is not owned by the wallet, which makes this naming
more logical and clear.
2023-05-31 10:42:05 +02:00
tomFlowee 98605711bf add and fix docs. 2023-05-31 10:32:44 +02:00
tomFlowee 00bcdfa796 Make GUI respond to entering a instapay limit. 2023-05-31 10:32:28 +02:00
tomFlowee 2fcf86a037 Translate months in history view
The headers and such items now get localized on the history pages.

We use static strings for the formats to avoid every call converting a c
string to a utf16 qstring, which takes an allocate and a conversion.
A tiny little amount of data kept in global memory to avoid a large
number of mallocs is a net gain, I'm pretty sure.
2023-05-30 22:03:53 +02:00
tomFlowee 3c3a166ef5 Support an extra special case 2023-05-30 20:35:12 +02:00
tomFlowee 5e40c6a312 Update translations from Crowdin 2023-05-30 20:35:12 +02:00
tomFlowee 3174b0706d Avoid notifications from 'private' accounts.
Send notifications via singleton and do not forward notitications from
private accounts when private mode is enabled.
2023-05-30 20:35:12 +02:00
tomFlowee 2724e2cd67 UX: make checkbox follow price indicator 2023-05-30 19:25:09 +02:00
tomFlowee 1e05c9f6ad Fix overlapping widgets issue 2023-05-30 19:19:57 +02:00
tomFlowee e2dacffc33 Increase version number 2023-05-30 17:06:22 +02:00
tomFlowee fbfb9941ea Fix address gap in light of multiple gaps
The design of HD wallets always has a gap, a number of addresses past
the last used one we optimistically also look at.

My code assumed that there would be only one gap, at the end while the
number of skipped addresses were near zero.
Some other wallet, however, had multiple large gaps which messed up the
algorithm.

Now we restart counting gap-addresses every time an address is used in
the sequence.

Fixes #12
2023-05-30 15:52:06 +02:00
tomFlowee 885bb593b9 Revisit the 'gap' question for the main derivation path
This should fix the problem of a certain established wallet not
importing properly.
That wallet has shown to jump 15 or 20 addresses over the gap, which
made me wonder if that actually is a privacy issue and the conclusion is
that, no, if there is no matching transaction on chain, there is no
privacy leakage from just sending the bloom filter and thus the gap has
been increased for main.
2023-05-29 23:50:06 +02:00
tomFlowee aea210270a Remove unneeded code.
This method is only called from two methods which do the locking
already, making locking it again recursively just wasting time.
2023-05-29 21:59:07 +02:00
tomFlowee 0991da4b36 Also cloak hd-main derivation addresses
Lets face it, listing loads of addresses is not readable. People can't
really get meaning out of that, its just 'data' after one or two.
Showing the hd-path-id (main or change) and an integer is going to be
much more useful for many UX situations, so we provide that information
for the UI to display that instead.

Naturally, the actual address is still available for copy/pasting etc.
2023-05-29 21:57:52 +02:00
tomFlowee 8a9647551d Make BCH price popup show on bigger area
This now makes not just the bch balance but also the
fiat-balance clickable, all the way to the left border.
2023-05-29 12:19:39 +02:00
tomFlowee 311a788346 tie a signal to the allowInstaPay property
this may fire on no change, making it imperfect. It is better in that it
actually allows propery changes to have a visual effect.
2023-05-26 08:35:03 +02:00
tomFlowee fc3b31b864 minor fixes 2023-05-26 08:31:36 +02:00
tomFlowee 0ef5d2b0fc Re-think the interaction of the ReceiveTab
This solves the UX issue that the touch-screen keyboard would
overlap on our main content and that we could actally not input
a price properly on mobile at all.
2023-05-25 23:37:41 +02:00