This applies the knowledge learned from mobile to desktop too.
Also set the initially selected import year to 2023 and avoid
long imports for most people.
This changes us to no longer use the exception to find out the
time is before the checkpoint, but instead checks directly.
This was needed since upstream changed to no longer throw since that's
still a bad practice in C++
We check the first block to figure out if the download is actually the
same one we are about to start, and if it is then Pay will not re-
download the part that is already on disk.
We set the UI to change from 'downloading' state to 'processing' state,
and now we give the UI the processor time to actually show this new
state on the screen before we start that processing step.
seems renaming a file that is mapped is not possible on Android, but
remove is. This code now removes the original static headers after we
get an approval of the downloaded file.
We use the same header-heights lookup table to show the actual month to
the user on resolve.
The resolve is the fetch of first-use of an address or seed, this
returns a blockheight from elecrum servers only and that isn't very
user-friendly. As such this now fills the comboboxes with the proper
month/year for better understanding.
As we start to ship headers based on a checkpoint, the earlier code
to overwrite an existing static-headers file when the new delivable
is larger is no longer useful.
This is because just being larger doesn't mean the checkpoint it
extends will stay the same.
We simply won't overwrite a static headers file anymore.
This makes the language simpler and makes clear that the password field
is related to the import. Second, the name-field is now moved closer to
the big 'start' button and has a more obvious title.
This is the import page, it will certainly be possible for a
user to import a wallet that is older than the headers on their
device. In that case using the headers to resolve the height can't
work.
Circular dependency: Need headers to know which headers to download...
So, we hardcode the historical blockheights here for each month that
the user can select.
Notice that the dates are the first of each month, at the UTC-16
time-line.
The ImportWalletPage now loads the QML provided by the module,
exposed via the metadata of modules.
The module gets just a blockheight property and then will do
"its thing".
This will either instantly close when there is nothing to do
and continue instantly to the actual import.
Or the module will check the server, initiate download and when
all is setup and done THEN close the popup and continue with
the actual import.
This actually checks the need for downloading more headers,
then decides on which headers to download (from which known checkpoint,
really) and downloads them to a file.
Plugins can be plugged into the main menu and the send menu already,
this adds the ability for a (section of a) plugin to be loaded as
custom component in the main app, among others.
Seems that the problem we saw on Android is also present on
Linux and Wayland.
A lot of components no longer use the palette which makes it
not possible to use them as-is with our light/dark theme feature.
This changes the many components to the Flowee specific ones
where we already solved this for the Android UI.