Commit Graph

321 Commits

Author SHA1 Message Date
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 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 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 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
tomFlowee 57daf60401 Add addressShort getter
This returns the address, but without the chain prefix.
2023-05-25 21:00:46 +02:00
tomFlowee 5c2581c592 Add PaymentBackend helper class
This makes the PriceInputWidget free to invoke.
2023-05-25 21:00:24 +02:00
tomFlowee 97a4b74bfa Include our font.
We ship our own font to not have to depend on the host system's
installed fonts for 'special' characters like arrows and stars.

This is a font forked from the Gnu-free font people, only since that one
is 2MB this is a very much stripped down version with just all the fun
stuff left.
2023-05-19 15:47:02 +02:00
tomFlowee 7806914fc3 Various small fixes and UX improvements. 2023-05-18 21:52:51 +02:00
tomFlowee 280678457e Cleanup code and make behavior follow docs again 2023-05-18 17:44:49 +02:00
tomFlowee 68dcf6a42f Move logic to backend.
make the front-end simpler by having a new property on the
PortfolioDataProvider which shares all existing accounts to
be shown in this Page.
2023-05-18 17:06:33 +02:00
tomFlowee 10360f9c7f Catch exceptions from parsing user input. 2023-05-17 20:58:02 +02:00
tomFlowee 55dbcdced1 Add the new screen for default wallet
This new screen allows one to quickly select which wallet is the
'default'. This is a nicer design than a checkbox on each wallet.
2023-05-17 15:43:25 +02:00
tomFlowee 033cb5962d Add feature; private wallets
A wallet can permanently be labeled a 'private wallet' which is a simple
boolean.
Then when you may need to hand over your phone to a clerk, all you do is
quickly enable the 'private mode' which is sufficiently deep in the menu
to make it hidden.

The effect is that all wallets marked private will be hidden for the
duration of that feature being on.
2023-05-16 20:17:12 +02:00
tomFlowee 1636e1e6b1 Redesign AccountList page (wallets).
The simple 'wallet-information' page is now a general wallet
configuration page.
This has commented out the future archive / encrypt parts as well.
2023-05-16 20:16:59 +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 89e1b94027 Tie the new config settings to the front-end. 2023-05-15 16:17:26 +02:00
tomFlowee 5f05636dd3 Start a WalletConfig class
This is meant to have a collection of user settings for each individual
wallet. Things like if the wallet balance should be shown in the
totalBalance.
2023-05-15 16:17:26 +02:00
tomFlowee 97a160f603 cleanup header file.
remove class declaration that is no longer needed.
2023-05-15 13:34:26 +02:00
tomFlowee 4ba37bed7c API docs. 2023-05-15 12:59:54 +02:00
tomFlowee 3dd39e2f64 Add API docs. 2023-05-15 12:46:02 +02:00
tomFlowee a209bc64d2 Make the saving of the wallet-list instantly on encrypt
Call the saving of the wallet-list directly after we encrypted a wallet,
avoiding any delay in saving.

Fixes: #17
2023-05-11 22:19:48 +02:00
tomFlowee 5125ecc222 Upgrade tests for 'earlier-this-month' model.
This fixes some cornercases and makes the test
a) properly data-driven (don't use 'today').
b) much more extensive.

This also removes some duplicate code and fixes some bugs in the actual
model it tests.
2023-05-08 10:29:15 +02:00
tomFlowee 7a5eced658 New version 2023-05-07 17:55:07 +02:00
tomFlowee a779bb5f45 Be much more persistent parsing a mnemonic
We now handle correctly user input that we can expect when they manually
enter the mnemonic via an on-screen keyboard.
This includes spacing, line feeds and uppercasing of the first word.
2023-05-07 17:12:07 +02:00
tomFlowee 31953638d1 Display 'sent-to' address
For a transaction we sent elsewhere, show which address
was the recipient of the funds.
2023-05-06 17:51:53 +02:00
tomFlowee fadecb369c Expand the transaction-info page.
Add a lot more userful information to the mobile transaction-info page.
2023-05-06 17:02:06 +02:00
tomFlowee 463077e569 Mark tag as deprecated. 2023-05-06 16:59:41 +02:00
tomFlowee 24dcdefd8b Remove obsolete version check
This added support for an older version of Qt, but we moved to require
an even newer one. Making the check irrelevant.
2023-05-06 16:12:14 +02:00
tomFlowee 5c25710bbe Avoid work.
Don't load the currency files I'm not actually processing.
2023-05-06 14:32:49 +02:00
tomFlowee 5be3a6e1f1 Remove dead code. 2023-05-06 12:45:52 +02:00
tomFlowee 88440a6eff Various fixes in PriceDataHistory
Fixes: #16

* Don't store the initial dummy value '100,-' in the history.
* Don't store the 404 server reply as a price file.
* On switching of currency, instantly try downloading the
historical prices instead of waiting for the next restart.
2023-05-06 12:45:33 +02:00
tomFlowee d12618f6bc Fix days math
This avoids math problems when the two dates are in a different month.
2023-05-06 11:54:03 +02:00
tomFlowee 4bebaa27eb Fix use after free.
The 'erase' actually deletes the wtx, so we should not reference the
txid from it after we call erase.

Found with valgrind.
2023-05-02 20:06:46 +02:00
tomFlowee 8534f6368f New version 2023-05-02 16:07:22 +02:00
tomFlowee 2975b5e5d7 Make 'importing' not be for any new wallet. 2023-05-02 12:21:23 +02:00
tomFlowee 1929e99a4a Fix behavior on initial sync
After the sync is ended is now actually shows the QR.
2023-05-02 12:18:40 +02:00
tomFlowee 527e7895ef Merge branch 'master' into PaymentRequest 2023-05-02 10:53:16 +02:00
tomFlowee 3dfb2b3d38 Port the startupscreen and desktop receive tab too
This makes the new PaymentRequest design be used by all components.
2023-05-02 10:52:37 +02:00
tomFlowee 4f93cdface Cleanup layout of receive tab 2023-05-02 10:52:37 +02:00
tomFlowee 4ba71ff870 Improve payment-request tracking
We introduce a new WalletkeyView which is a class that provides a
thread-safe view on a single private-key in the wallet. Detecting all
transactions depositing money in that key and thus being an ideal
backend for the PaymentRequest.
2023-05-02 10:52:37 +02:00
tomFlowee d0b5134527 Create a functional Payment Request screen.
We now use a better design where the PaymentRequest object is owned by
QML.
2023-05-02 10:52:37 +02:00
tomFlowee 1e73c5bee5 Step one of rebuilding the payment-requests
This mostly removes the less than successful architecture.

This architecture stems from my first attempts at mixing C++ and QML, and
its not great.
As we can see from the removals, it touches a lot of places and
especially the wallet owning them is messy, but in QML we have to do a
lot of null pointer checks, also not exactly readable.
Lets try something different.
2023-05-02 10:52:37 +02:00
tomFlowee 374480bfdb Detect problem and bail early.
When the wallet already noticed a new block but the blockchain database
doesn't have it, we should just bail.
The only way this is likely to happen is because a previous run of the
wallet didn't write out its data. We keep the assert for that case, but
in release builds we are now more robust.
2023-05-01 21:51:25 +02:00