Commit Graph

738 Commits

Author SHA1 Message Date
tomFlowee 4347e94ca3 fixlets. 2024-10-09 17:35:59 +02:00
tomFlowee 333f1fb401 Re-engineer the TxInfoObject
This separates it into two objects in order to make thead-safety easy
using Qt's signal/slot mechanism.
Additionally this removes magic timeout numbers and simply starts a
timer to check for changes and emit a signal if the status actually
needs updating.

Testing also shows that QML calls the getter a LOT, so I also moved the
broadcastStatus to be buffered and just return that on the call.
This incidentally also simplifies the code, double win.
2024-10-09 16:43:05 +02:00
tomFlowee 435bf89e2b Make compile with config option; network-log
Adding -DNetworkLogClient=ON to a desktop build (non-android, honestly)
now works.
2024-10-09 12:09:33 +02:00
tomFlowee 6ab061966a New version number 2024-10-08 22:30:24 +02:00
tomFlowee 9c148598e0 Add button on startup screen. 2024-10-08 22:30:24 +02:00
tomFlowee 0d1b202302 Fix typo in methodname 2024-10-08 22:04:23 +02:00
tomFlowee 7664e167a0 Add default-enabled modules section.
Lets make the 'sweep' module enabled by default on first start.
2024-10-08 21:17:09 +02:00
tomFlowee 1c466b62f6 add some 'as_const' to avoid detaching Qt containers 2024-10-08 21:17:09 +02:00
tomFlowee e96a401bc2 Cleanup and polish the send/sweep module 2024-10-08 21:17:09 +02:00
tomFlowee abef29f2ba Add support for QR prefix for WIF
The protocol handler 'bch-wif:' is now allowed to be in front of the wif
encoded private key.
2024-10-06 16:34:36 +02:00
tomFlowee e64a262151 Aid in development, increase log level of remote 2024-10-06 14:06:43 +02:00
tomFlowee d7be2d27d6 Add sendsweep properties
This exposes some of the backend data to be shown in the UI.
Also Make 'paste' available for WIFs.
2024-10-06 11:09:34 +02:00
tomFlowee 975408a7ca Add UX improvement.
This replaces or starts the error message directing the user to unlock
the wallet before payment can commence.
2024-10-05 21:29:32 +02:00
tomFlowee df9f294ee9 Add camera help text to SendSweep page. 2024-10-05 21:13:14 +02:00
tomFlowee 8ce6b744ae Make the broadcast of a tx more generic
The tx-broadcast was tied completely to a 'payment' object, this is now
more made into individual parts that can be reused outside of the
'payment' usecase.
2024-10-05 20:34:39 +02:00
tomFlowee d1dfeb1a02 Stop using deprecatd q_enums 2024-10-05 11:00:30 +02:00
tomFlowee f6846a22a8 Print the most common error full.
SSL Handshake failure typically means self-signed.
2024-10-03 17:57:10 +02:00
tomFlowee f40910742d Add retry on failure.
We move to another server, if one fails us.
2024-10-03 17:57:10 +02:00
tomFlowee 402ab8740e Split ElectronXClient class from ImportHandler
This splits the latter class into an abstract baseclass that finds a
server and handshakes with it called ElectronXClient
and then as a subclass the import handler handling doing what it always
did.
2024-10-03 14:27:13 +02:00
tomFlowee 3aa28743f1 Start implementing the sweep module
This adds scanning of private key and processing the data.
2024-10-02 23:04:38 +02:00
tomFlowee f1f97f5347 Add op-return creation UI for desktop 2024-10-01 17:55:05 +02:00
tomFlowee aa6c3b68ce Help avoid mallocs; mark CoW containers const 2024-09-24 21:27:10 +02:00
tomFlowee 17e05d69a2 Loosen reading from Payment methods
The Payment specific methods paymentAmount and paymentAmountFiat are now
made to return the data from the first output and no longer required
there to be exactly one.
This allows these methods to still give useful info in the case of
payment protocol based creation of more complex payment objects.
2024-09-24 21:22:52 +02:00
tomFlowee 0a8b44c562 Fix costness issue.
As found by KDE/clazy.
2024-09-23 23:00:02 +02:00
tomFlowee a49f6ee0a1 Add basic support for bip21 op-return argument.
This takes the concept added some 5 years ago to Electron-Cash and adds
this to Flowee Pay as well.
In a nutshell, it allows a bip21 style payment request to include a
'comment' with the argument op_return_raw

This comment is expected to be a hex-encoded data payload that then will
be added as a single output to the transaction we build to fullfill the
payment request.

As a natural consequence of how uri's work, adding the argument multiple
times will cause multiple outputs to be generated. We check that this
does not exceed the expected max sizing for op-return.
2024-09-23 22:51:10 +02:00
tomFlowee ea4435f9d0 Follow Tx::Iterator change in Flowee Libs
The Tx::Iterator no longer returns the token data as part of the
output-script, but instead sees them as separate tags.
This removes most of the code here, and makes future deeper
support of cashtokens much easier.
2024-09-07 20:47:05 +02:00
tomFlowee a9b4f60f0b Follow API change in Flowee Libs 2024-09-07 19:53:27 +02:00
tomFlowee f3c9576688 Add currency rules for Slovakia / Slovenia
THese two countries use the Euro, but unline most Euro
countries they put the currency indicator behind the
numbers.
With Slovenia even avoiding the euro-sign in most places.

This adds the specialization based on the phone set country.
2024-08-31 21:49:31 +02:00
tomFlowee 4550d3f512 Hungarian currency display update 2024-08-28 22:45:47 +02:00
tomFlowee 98906ac3e1 Make history return timestamp with price
this changes the call for historicalPrice() to now take the (int based)
timestamp as a ref and we change that to the actually found timestamp
upon success.
2024-07-05 13:05:40 +02:00
tomFlowee 238a5d3f40 Add indicator for price data being old.
When we start up we use the last known price information and also fetch
new data.
When the user shows the price details popup before the fetch has
completed, they may be mislead into thinking that they are looking at
current data while they are not.
So this shows a bouncy while we are fetching.
2024-07-05 12:40:16 +02:00
tomFlowee e671d41a10 Skip fees when unknown
We can't calculate fees when we don't know all inputs. In that case we
simply return negative fees, which the UI then does not show.
2024-07-03 18:03:17 +02:00
tomFlowee 92e7da561e Improve logging for the indexer-service component 2024-06-30 23:35:12 +02:00
tomFlowee 6950f641f2 Small clarification to docs 2024-06-30 23:33:55 +02:00
tomFlowee 0c315370dd Fixes in CoinSelector
This (desktop only) component now works properly with:

- Showing the CF-logo for approriate coins.
- Clicking on a locked coin no longer selects it.
2024-06-30 22:50:16 +02:00
tomFlowee f34bd4e52a Redo out-of-bounds check
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++
2024-06-29 12:15:30 +02:00
tomFlowee c8023e5e11 Start new version 2024-06-26 19:40:19 +02:00
tomFlowee 9bbc82686b Add helpful debug message 2024-06-25 23:50:35 +02:00
tomFlowee 7ba275fd53 On resolve start-date, show it in the UI
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.
2024-06-24 22:33:53 +02:00
tomFlowee 92be995fdd Hide 'blocks' module from user for now
There isn't yet any user interface they can see, so no point in showing
it to the user in the 'explore' part of the app.
2024-06-23 19:55:11 +02:00
tomFlowee 074c79d042 Change overwrite policy of static headers (Android)
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.
2024-06-23 19:37:58 +02:00
tomFlowee 7005507041 Help resolve blockheight
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.
2024-06-23 19:37:58 +02:00
tomFlowee 47f991a36e Make the DownloadChecker.qml actually functional.
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.
2024-06-23 19:37:58 +02:00
tomFlowee 491af94040 Provide another plugin integration.
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.
2024-06-23 19:37:52 +02:00
tomFlowee 6365d03233 Add docs. 2024-06-13 22:35:49 +02:00
tomFlowee bd3184f2d8 Port to Wayland: protect against null
On Wayland the mime can be a nullptr due to the different clipboard
strategy, we now check for null dereference.
2024-06-13 22:35:49 +02:00
tomFlowee 4f3d38b5de Make (desktop) app-icon work again
Qt uses the desktop file directly on Wayland and the windowIcon
concept is obsolete.
This makes the app-icon show properly on Wayland.
2024-06-02 20:29:49 +02:00
tomFlowee 736ba60732 add user-friendly comment 2024-05-07 22:30:45 +02:00
tomFlowee 2d0647409d Print SSL warnings in -v mode
Various self-signed electrum cash nodes exists, this shows in the
debug output actual specific reason why they are rejected on connect.
2024-05-07 10:42:37 +02:00
tomFlowee 1e9cf9792b Fix importing a HD wallet from an exact height.
Now we actually start reading that exact block given.
2024-05-06 22:56:13 +02:00