Commit Graph

738 Commits

Author SHA1 Message Date
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
tomFlowee f649d8e39a Fix crash on pay-to-many-addressses.
Hide target address if there is more than one.
2023-07-07 10:54:38 +02:00
tomFlowee 2fc269a5cf Add the new module type to the GUI.
This shows an icon that indicates that the module will be made
available in the menu, if that module is able to do that.
2023-07-04 23:16:35 +02:00
tomFlowee 7f5e4130ad Move the Netview to a module of its own: Peers-view 2023-07-04 22:35:58 +02:00
tomFlowee aaf8ab380f new release version 7.0 2023-07-04 20:27:10 +02:00
tomFlowee bff9cd5dc2 Introduce app-level password feature and more.
We already allowed individual wallets to get PIN-to-Open/PIN-to-Pay
but that is too advanced for most users. Not to mention that encrypted
private keys means a slower payment process and certain types of
features become impossible. Like auto-invoicing (incasso).

The gap, for mobile, is a simple not-encrypting password on startup
of the app which is likely what 80% of the privacy / security minded
people on mibile will be more than happy with.

This adds this mode and additionally streamlines the encrypted modes
of wallets.
2023-07-04 18:39:16 +02:00
tomFlowee b2a1b31efb Fixlet in error-message
Fix grammar of the exception message.
2023-07-03 12:24:22 +02:00
tomFlowee fe6e1020d2 Remove overdesign of menu model
The model had much more functionality we'd ever use in the UI, it turns
out it was over designed.
Remove the unneeded complexity and just have one simple list.
2023-07-03 12:22:14 +02:00
tomFlowee 049d735a53 Add decrypt of PinToPay wallet in mobile
this also changes the API propertes that handle encryption details a
little. Making them faster and the meaning follows the logical
conclusion of the naming better.

Specifically:

when needsPinToOpen would return true, now needsPinToPay will also
always return true.
2023-06-30 23:18:31 +02:00
tomFlowee 7f8ad5aedd Port to new QPermissions system
This now uses the new Qt APIs for requesting camera permissions
on supported platforms (Adnroid and iOS).

There are still several ifdefs and the older code is still there,
lets leave that for some releases, because why not.
2023-06-23 15:50:19 +02:00
tomFlowee a0fc2d1448 Remove unused code
The Qt.platform property has been good enough.
2023-06-23 10:42:06 +02:00
tomFlowee ce60a3695d Make comment in line with new reality
Last week I changed the SPV action to never stop, this comment was still
refering to the reality before that.
2023-06-23 10:39:32 +02:00
tomFlowee 01ccb87686 Properly display much larger prices.
Handle fiat prices as a long
2023-06-23 10:35:35 +02:00
tomFlowee 7e375f50b5 Bugfix how we handle numbers from user input
This is a long overdue cleanup around the ideas of entering
numbers in Flowee Pay.

The core dataclass BitcoinValue now keeps track where the number
came from, either user input or some calculation. This allows
us to have the Fiat and the Coin price stay in sync without weird
problems.
The one we type uses a string, the price field that we are not typing in
is then a slave and we follow the auto-generated number as the
source.

This solves a host of known issues:

* Editing of value objects is much more consistnnt and predictable now.
* Switching to a different fiat type now properly re-calculates the
  values that are slaved. So if the primary is a BCH value then the fiat
  value gets the new exhange rate instantly applied.
* Switching to a different fiat type properly applies having a separator
  So if you go from euro to Japanese yen, we now remove the separator
  and the numbers behind it.
* Changing the app setting from BCH to mBCH now properly updates all
  amounts. Notice that the user-typed string wins, if you typed 2 and
  then change to mBCH we assume you wanted 2, not 2000.
* Paste now works more logcally.
* Cursor is no longer sometimes invisible, requiring backspace to make
  it show up.

And last we now protect against too large numbers. It is seen as an
error to type a number above 21 million BCH.

Fixes #19
2023-06-23 10:35:35 +02:00
tomFlowee b5b9bac043 Rename some variables to make linter happy
Avoid using the same variable name as one already defined in a wider
scope, this improves readability of code.
2023-06-21 15:19:51 +02:00
tomFlowee b78ecfb86f Avoid crashing on missing data 2023-06-20 20:27:21 +02:00
tomFlowee cf59f2f06a Make CHF as a currency work for input
As the name is so much wider the widget didn't work well, this
makes the name not overlap.

Additionally, added a space beteween the currency name and
the numbers.
2023-06-20 20:27:21 +02:00
tomFlowee fd70f18c06 Port saving code to std lib
The various places we save files used different libraries to do that
work. This commit lets all use the same std lib methods consistently.
2023-06-18 17:43:26 +02:00
tomFlowee 573f316f51 Revert the inverting of the QR
Seems that some phones are not happy with this and simply fail to scan
the QR after this.

Functionality wins over pretty-ness.
2023-06-18 17:43:26 +02:00
tomFlowee a9b2d3a975 new release version 6.1 2023-06-15 19:23:48 +02:00
tomFlowee a1e56528f9 new feature: turn on torch on QR scan
We now show a button to turn on the from the QR scanning page.
2023-06-15 19:21:03 +02:00
tomFlowee e033c49f0c Move ZXing dep from all using apps to just the lib. 2023-06-15 17:59:54 +02:00
tomFlowee 174c5f127f Deal a little better with crappy camera firmware. 2023-06-15 17:48:47 +02:00
tomFlowee d94f1faae2 Work on QR scanning
This removes the dependency on the QrEncode lib and uses
the fact that our scanning lib also is capable of making QRs.

We now allow the QR to get its color inverted for dark mode
users, making it less bright to show a QR.

This introduces a new QR-creation mode which allows spaces and
other chars to be in there directly without being URL-encoded.

This improves the QR showing of the user's seed-phrase (in the
backup screen).
This adds the ability to scan a seed phrase with your camera by
adding a button to the wallet import page.
This also adds support for the QR format that the bitcoin com
wallet uses in its QR for seed phrases.
2023-06-15 14:58:44 +02:00
tomFlowee 44379f2650 Defensive programming.
Don't assume the module exist on loading its config.
2023-06-14 23:10:13 +02:00
tomFlowee d30381eb7d Copy the payment-request-comment to wallet-tx
When the user typed a request message, make sure that the message is
attached to the transaction that comes in which pays the request.
2023-06-14 22:53:51 +02:00
tomFlowee 2f51d08bde Improve payment-from-clipboard
If no full address is found in the clipboard, use the chain prefix to
validate the address and use that instead.
2023-06-13 20:50:29 +02:00
tomFlowee 8d4b4ea7ca Persist user choice of which module is enabled
Code the load/save methods for storing module enabled-ness
2023-06-13 18:15:48 +02:00
tomFlowee 5a8d22c05e Docs. 2023-06-13 18:15:19 +02:00
tomFlowee 58614e17a6 Add a module explorer page in mobile view.
This allows discovering of the modules and enabling / disabling them.
2023-06-13 15:59:37 +02:00
tomFlowee c25adfffa0 After an API review.
This simplyfies things and ensures the translations are loaded before
any possible tr() calls.
2023-06-13 15:59:37 +02:00
tomFlowee 42d3c2e96b Make the build-transactions module function
This moves the last of the assets to the module and provides the base
requirements to actually make the featue function from a module.
2023-06-13 15:59:37 +02:00
tomFlowee a73e004998 Move QML and introduce i18n concept for modules 2023-06-13 15:59:37 +02:00
tomFlowee 1220a3839c Start a setup for modules.
This sets up a basic system for creating modules on top of the flowee
pay static lib in a way that is ensured to be isolated (modules can't
accidentally use each other's classes)

The setup is made such that the buildsystem does the hard work on
plugging in a new module, making it so that all you need to do is create
a new dir and a "{something}ModuleInfo.h" file and it will get compiled
in.
The point there is to make it not have any merge conflicts and just make
it dead easy to get started.
2023-06-13 15:59:37 +02:00