Commit Graph

321 Commits

Author SHA1 Message Date
tomFlowee f1ad2bf6cc Starting 2024.01.1 2024-01-07 12:31:45 +01:00
tomFlowee 6161a43dac Add a statistics page to the Netview 2024-01-06 23:10:50 +01:00
tomFlowee 52b33acb0c [Android] when ipv6 available, connect to such peers
This adds (the first!) an actual Java class to do the checking which
interfaces are available and we then instruct the AddressDB to pick
addresses matching that.

In other words, when the Android device has a functional IPv4 network
interface, we will try to connect to peers on that IP version.
Same with IPv6.

Both can be active at the same time.
2024-01-06 22:11:00 +01:00
tomFlowee 8181b702d2 Port this class as well
The upsteam change to use smart pointers also applies to this
one. We just didn't compile it yet.
2024-01-06 22:11:00 +01:00
tomFlowee 219f81763b New version 2024-01-04 23:20:28 +01:00
tomFlowee 0b7587b51b Refactor the NetView (peers dialog)
This is likely the oldest component in the app and it was
really in need of a rewrite.
The state of peers is shown much clearer now, we use a proper
model in order to avoid the jumping and we use a more safe
way of getting at the data.
2024-01-04 23:20:28 +01:00
tomFlowee 51a0c6ab46 Fix cancelling the camera usage. 2024-01-04 22:12:08 +01:00
tomFlowee 6f9f17a46b Make scanning simple QRs better.
This specifically allows pasting and scanning of bitcoincash addresses
without the 'bitcoincash' prefix.
Additionally this cleans up the QRScanner API a little and merges two
methods.

Last, at popular request, this makes showing the address on the
confirmation screen default to be on.
This allows people to actually verify the address they pay to.

Except when paying to a BIP70 payment because that is practically
speaking a system that avoids talking about addresses in the first
place. No point in trying to verify the actual address THERE.
2023-12-22 19:25:16 +01:00
tomFlowee 8e0c7c57e6 Follow Streaming::pool() refactor
This upstream refactor stopped passing in the pool by pointer and
now wraps it in a shared_ptr.

A lot less 'address-of' operators and generally cleaner code are
the result.
2023-12-22 16:46:23 +01:00
tomFlowee dad6f54790 New bugfix version 2023-11-30 21:16:52 +01:00
tomFlowee 47746e724d Follow upstream includes rename
The PublicKey. and PrivteKey.h used to be called different.
2023-11-24 18:20:41 +01:00
tomFlowee 2d49bfb804 Payments are valid also with non-p2pkh targets. 2023-11-19 17:14:56 +01:00
tomFlowee 25909437fd Clarify the terminology 2023-11-06 12:40:11 +01:00
tomFlowee 1ad76e4857 Start new version 2023-11-04 16:00:01 +01:00
tomFlowee 73ac074009 Avoid saving twice
This avoid us calling save twice within milliseconds.
2023-11-04 00:02:43 +01:00
tomFlowee cd3e4495d7 Fix linter issue; init order. 2023-11-04 00:01:16 +01:00
tomFlowee 99801a2bf6 Cleanup network logger cmake stuff
Move messge below the main apps
Make the defines to be used in all places.
2023-11-03 19:41:56 +01:00
tomFlowee e8530f5255 Various fixes for huge values.
Avoid overflow when typing improbably big numbers.
2023-11-03 15:55:13 +01:00
tomFlowee 750dc9b54d Format currency concistently.
Negative values have the minus now also here before any currency symbol.
2023-11-03 14:48:32 +01:00
tomFlowee c962b6db18 Improve bip70 support
This makes the system work for non-standard addresses and different
number of outputs (than one).
2023-10-31 15:40:45 +01:00
tomFlowee e67d5a1453 {Android} fetch phone dark-theme setting.
This calls Java code on Android through the Qt JNI bridge
in order to learn the phone-wide setting of dark-theme.

For new installs this will now follow the phone setting by default.
Add GuiSettings: dark mode option.
2023-10-28 12:18:11 +02:00
tomFlowee 1cdd10ac66 Ensure file-format stays the same.
These enum values are defined in an external lib, as such we make sure
that any changes in them are instantly detected here.
2023-10-24 20:32:31 +02:00
tomFlowee f99fa5d109 new version 2023-10-24 20:25:51 +02:00
tomFlowee 7ba2740986 Work on basic blockheaders changes
The flowee lib added support for various blockheader improvements.
An important one is the ability to start from a checkpoint and thus
lower the requirements at the cost of a slightly lower security.
This adds support for that.

The local part is that we stop shipping the 'info' file (some 25MB
for the full chain) in the APK / deb files, instead buiding it on first
start.
2023-10-24 20:25:51 +02:00
Calin Culianu 95ff48c314 Implement reviewer suggestion plus fixes
In addition:

- Made it work with latest commit to Flowee/thehub/#5.
- Works better now when decrypting the wallet (accountInfo.isElectrum property
  should not be CONSTANT but instead notify on change)
- Made the actual wallet seed phrase type get saved to the wallet rather
  than a bool. This type comes from enum HDMasterKey::MnemonicType in
  thehub libs.
2023-10-19 18:26:50 +03:00
Calin Culianu d2550aee3f Add support for importing wallets using Electrum mnemonic phrases
This is the format used by (older) Electron Cash wallets. It may be
useful to users wishing to use their older EC wallets with Flowee Pay.

Highlight of changes:

- Import wallet UI now auto-detects whether it's Electrum or BIP39. Note
  that in some cases a valid BIP39 seed is also a valid Electrum seed.
  The user has a UI element checkbox for "forcing" Electrum
  interpretation in such cases.
- Electrum seed phrases always use derivation path "m/" so this is
  forced on the user as the only path available in the Electrum case.
- Wallet file format has a new tag to indicate whether the seed phrase
  is electrum or not. Only present in the electrum case, otherwise it's
  omitted from the serialized data.
2023-10-19 18:26:50 +03:00
Calin Culianu 69cc7bcd3b Removed this assertion as it was leading to a crash on my testnet4
It's possible for an output amount to be 0 on a real blockchain -- a
miner can mine a txn paying 0 to any address!

Such a thing happened on testnet4.
2023-10-19 06:47:32 +03:00
Calin Culianu 7292769c36 Fix compiler warnings on macOS clang
Just some nits but here is what the compiler didn't like:

- Apparently Qt's `qAsConst` is marked as deprecated (at least in Qt
  6.6.0), so they recommend one uses `std::as_const`
- Compiler feels happier with `#ifdef` rather than `#if` for
  `TARGET_OS_Android` in the not-defined case.
2023-10-18 14:19:04 +03: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
Calin Culianu ddeac5622f Fix build issues on macOS + clang 2023-10-17 22:02:08 +03:00
tomFlowee c3acf0c12f Fix cli 'connect' arg using wrong port on testnet4 2023-10-17 20:05:54 +02:00
tomFlowee 04bd9f51b7 Fix off-by-one in the assert. 2023-10-17 18:06:11 +02:00
tomFlowee 2e71a162aa Tweak and fix clipboard paste based workflows.
One surprise was that the main usecase of pasting is one where the user
activates another app to go and copy data in order to come back to paste
it.
And the Qt clipboard didn't manage to get any notification of clipboard
changes. Even copying data on becoming active had no effect.

So now I just show the paste optimistically when the user comes back
from another screen, assuming the main reason for that was to copy.
2023-10-17 12:02:24 +02:00
tomFlowee 7cdd3acdf7 Improve clipboard interaction on making payments.
This makes available a clipboard helper component in QML.
Based on filters we then can make the 'paste' button visible and
only allow pasting stuff that is remotely useful.

This then also adds a 'paste' button to the transaction-building
module, the 'destination' screen.
2023-10-17 12:02:24 +02:00
tomFlowee 109f267184 New version 2023-09-06 16:22:33 +02:00
tomFlowee 1a93eb1883 Remove crashing destructor of QRScanner
This is a QML component and after scanning is completed, on Android,
destructing it seems to crash the app.
2023-09-06 16:21:09 +02:00
tomFlowee 02bf2ab1df Translations update 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 fcf8e82511 Implement BIP70 (protocolbuffers) payment protocol
This adds the basic support of bip70 style payments.
Some todos are left which are mostly about interaction with
other parts of the app and require bigger changes to make
it work smoothly.
2023-08-31 23:39:35 +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 1ff6b61b05 New version 2023-08-28 12:20:11 +02:00
tomFlowee 1bf4b8b493 Support more local currencies and fix ARS
This adds support for a convert-from-usd second feed which is advertised
by locals as the correct (non government sanctioned) conversion.
2023-08-27 23:11:58 +02:00
tomFlowee 73d89ec1b9 Avoid issues on non-camera holding hardware
Avoid setting a format that is null, seems Qt doesn't like it if you do.
2023-08-27 20:05:48 +02:00
tomFlowee 1b82e3f4f9 fix typo 2023-08-27 19:55:13 +02:00
tomFlowee 2b3feb6df6 increase minor version 2023-08-17 21:57:03 +02:00
tomFlowee 19008819dc ARS does not use digits behind the separator. 2023-08-17 20:11:02 +02:00
tomFlowee a12eba7c6d Avoid sending duplicate filters.
The backend will tell us that there is good reason to believe the remote
needs to get a new bloom filter, which is causing a lot of extra traffic
if there actually is no change in the utxo of the wallet.

This introduces a bool to mark changes that would affect the bloom
filter to be send, and only upload a new one when that bool is true.
2023-08-17 20:10:12 +02:00
tomFlowee d109e0b987 Avoid weird rounding error.
Parsing the amount
  0.00522325
caused the double to have a 49999 at the end instead of that 5.
This now will be rounded back up the the proper sats value.
2023-07-19 16:23:22 +02:00
tomFlowee 00bb3906be New release number 2023-07-07 10:54:52 +02:00