Commit Graph

1483 Commits

Author SHA1 Message Date
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
tomFlowee f687c7de76 Pull request Add importing Electrum mnemonic wallets.
Reviewed-on: https://codeberg.org/Flowee/pay/pulls/22
2023-10-23 15:08:52 +00: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 5b5a9f9c96 Added Electrum mnemonic format changes to mobile app UI
This works just like the desktop app.
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
tomFlowee fb2ff62f4d Merge pull request 'Removed this assertion as it was leading to a crash on my testnet4' (#23) from cculianu/pay:remove_output_value_assertion_fix_crash into master
Reviewed-on: https://codeberg.org/Flowee/pay/pulls/23
2023-10-19 07:00:23 +00: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
tomFlowee 66def83e3b Fix swapped text. 2023-10-18 21:28:40 +02: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
tomFlowee 33ba861af2 Make sure the value is up-to-date. 2023-10-18 11:39:35 +02:00
tomFlowee 9c857ec7d3 Merge pull request 'Fix build issues on macOS + clang' (#20) from cculianu/pay:fix_build_macos_clang into master
Reviewed-on: https://codeberg.org/Flowee/pay/pulls/20
2023-10-17 21:03:35 +00: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 c219dd5798 Fixlet; the repo and default checkout is called pay 2023-10-17 18:07:43 +02:00
tomFlowee 04bd9f51b7 Fix off-by-one in the assert. 2023-10-17 18:06:11 +02:00
tomFlowee dbbbd79f0a Add comment explaining the warning. 2023-10-17 12:02:24 +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 38a9ad3a4e Fixlets in colors.
Make sure that the header-menu actually is visible on Pages.
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 81861f7cc5 Follow refactor in Payment 2023-09-06 21:07:30 +02:00
tomFlowee 109f267184 New version 2023-09-06 16:22:33 +02:00
tomFlowee 117ccf0e03 Limit menu-opening gesture to mobile
We test on desktop, but this component with an actual mouse stops me
from clicking on the "Home" button in the test env. So lets just turn
that off and make the slide-to-open only happen on production devices.
2023-09-06 16:22:21 +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 8d3091bdd1 Disable input when not visible
Avoids weird interactions on the receive tab.
2023-09-06 16:21:09 +02:00
tomFlowee c0598d2f88 Fix interaction with this screen.
A Flickable seems to eat mouse clicks by default, so even if there was
no warnings it would stop allowing any interaction with the screen.
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 e06438d60f Avoid warning during startup. 2023-09-05 18:48:22 +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 56ff8fcff7 Make distclean not delete the blockchain data
Makes little sense to delete it only to instantly download
it again.
2023.08.0
2023-08-30 18:11:25 +02:00
tomFlowee b671dfc3a7 Allow showing address in more cases.
The QR scan page now also allows showing the destination address
while the number keypad is up, being smarter with the layout of
the various lines in order to fit the important info on screen.

Additionally we require the user to first enable the 'edit amount'
option before we make available the option to 'send all'.
2023-08-30 12:50:40 +02:00
tomFlowee d1e5c99f1b Limit swipt-for-menu to the main screen.
This makes sure we stay consistent and the UX doesn't need complicated
code to make sure all user-actions are accounted for.
2023-08-28 22:15:49 +02:00
tomFlowee 40aaa635fa fetch updates from Crowdin 2023-08-28 21:05:23 +02:00
tomFlowee 6cd8061762 Add the gradle file to git
This file gets auto-generated if we don't have it by the Qt tools
so we didn't really need it before.
This changes the default to now set the targetSdkVersion to 33,
as required by the Android Play store.
2023-08-28 20:47:35 +02:00
tomFlowee d9ce8f4b6e Add feature; drag to open menu.
People that only use one hand will no longer need to use the other to
reach the button at the top for the menu.

Instead we now allow a swipe in the bottom left corner, swiping to the
right will make the menu open.
2023-08-28 18:41:08 +02:00
tomFlowee 1ff6b61b05 New version 2023-08-28 12:20:11 +02:00
tomFlowee ba08f1e39a Work around QTBUG-116527 2023-08-28 12:04:51 +02:00
tomFlowee 31a3715315 Upgrade to Qt6.5.2 2023-08-28 11:49:30 +02:00
tomFlowee 735c2b0265 fixlet 2023-08-27 23:12:07 +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 5fbd7a3f0d Show instant pay threshold on QR scan page 2023-08-27 20:39:46 +02:00
tomFlowee 632223d0f0 Fix layout of warning 2023-08-27 20:36:30 +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 fe5d819234 Mention the new translators in the credits.
Also remove the beta-testers, we've been out of Beta for AGES now :-)
2023-08-27 19:09:43 +02:00
tomFlowee 9b5381a11d Cleanups of old CMake stuff 2023-08-27 18:48:30 +02:00
tomFlowee ae9bb0827d Fix typed characters showing twice. 2023-08-27 18:46:13 +02:00