Commit Graph

98 Commits

Author SHA1 Message Date
tomFlowee 5aa2644717 Notify the UI about transaction comments. 2021-12-04 19:13:26 +01:00
tomFlowee 3012331698 Add assert to avoid silent failure 2021-12-04 13:58:46 +01:00
tomFlowee d1e44fa515 Make an initial version of send-tx feedback. 2021-11-29 23:17:45 +01:00
tomFlowee 6c805f29e8 Add Wallet::isLocked(outRef) const 2021-11-23 22:46:28 +01:00
tomFlowee 5758d67e54 Merge branch 'master' into SendPanel 2021-11-23 17:17:43 +01:00
tomFlowee e8c96d7c23 Add selection of inputs and make the UI pretty. 2021-11-23 17:17:40 +01:00
tomFlowee 4a184fc5c2 Make a static lib pay_lib
To avoid recompiles and such generally to simplify stuff, this
moves all the code into a static lib that is then linked with
by the various apps (including tests).
2021-11-20 22:20:08 +01:00
tomFlowee 45879381fc Avoid locking special case that is Ok. 2021-11-20 18:53:26 +01:00
tomFlowee ee50b65e66 Detect CashFusion transactions 2021-11-16 15:08:22 +01:00
tomFlowee 17b9eeac5c Move Wallet::fetchTransactionInfo() to _support
To populate the GUI data-model feels less than core part of the wallet,
so move it out of the wallet.cpp file.
2021-11-16 12:15:07 +01:00
tomFlowee 7079b2c4a4 Make HD wallets put change on change addresses. 2021-11-09 10:37:31 +01:00
tomFlowee 5edfbe7ca4 Add test for rejected transactions 2021-11-08 19:36:47 +01:00
tomFlowee bf45e14f0d Avoid corrupting UTXO due to rejected tx. 2021-11-08 18:17:22 +01:00
tomFlowee f7b1fc86f2 Avoid false positives marking a wallet owned. 2021-11-08 16:49:23 +01:00
tomFlowee 06b02db4dc Add new unittest and code for output locking 2021-11-08 15:24:48 +01:00
tomFlowee 2b5b03a8a4 Clarify exception message. 2021-11-08 15:23:58 +01:00
tomFlowee 88e49b61ba Clear struct to avoid errors. 2021-11-08 15:22:36 +01:00
tomFlowee 351283e6bf Fix typo in methodname. 2021-11-08 15:21:53 +01:00
tomFlowee 5139e8da7d Fix typo. 2021-11-04 22:26:55 +01:00
tomFlowee cfcbdede36 Add wallet-upgrade (version 1 -> version 2)
We introduced for secret keys the signature-type field, which is required
to avoid signing with one key as both Schnorr and ecdsa as
that can cause leakage making recovering the private key much easier.

So, we now store this data but old wallets didn't fetch that from
the incoming transactions. So this conversion fetches the data from the
transactions (which are on the device) and stores the sigtype with the
keys.
2021-11-02 14:54:59 +01:00
tomFlowee a2920fb235 Fix reserveUnusedAddress()
this now makes sure we give the firs plausible address.
2021-11-01 18:27:03 +01:00
tomFlowee 5a245c8b17 Mark "spam" transactions as locked. 2021-11-01 16:33:53 +01:00
tomFlowee 7414176157 Fix typo 2021-11-01 14:14:41 +01:00
tomFlowee 3696499d9f Split HD key managent into created and bloom-asked
The bloom filter didn't include all created keys and thus we didn't send
the bloom in some cases.

Now we keep track of exactly which keys were sent and we re-send a bloom
filter if half of those have been used in order to not miss out on any
transactions.
2021-11-01 13:33:33 +01:00
tomFlowee 5061040d8b Fix small logic error. 2021-11-01 11:20:40 +01:00
tomFlowee 35bd66297d Find in the transactions the signature type used.
As transactions are found on the blockchain we remember the signature
type used in order to avoid one private key to be used for both types of
signatures, which can cause compromised keys.
2021-10-31 16:56:03 +01:00
tomFlowee 32d2142ab0 Show dates nicer
This adds the feature that we show a "last receive" field on a wallet,
and we also change the date format to have "yesterday" style dates
for recent ones.
2021-10-31 15:30:38 +01:00
tomFlowee d50b0c169c Make wallet details pane more complete. 2021-10-30 15:23:43 +02:00
tomFlowee d005a2cd7e Refactor; move code. 2021-10-29 12:48:12 +02:00
tomFlowee d9af22db21 [Minor refactor] move some code. 2021-10-29 12:42:31 +02:00
tomFlowee b63ba4e9b0 Make test more stable. 2021-10-27 19:44:19 +02:00
tomFlowee 651d9dbe5f Fix privacy leakage for HD wallets.
We used to send too many Change-chain keys in the bloom filter, this fixes
that.
2021-10-27 19:11:00 +02:00
tomFlowee 80d7456898 Make new-wallet pane functional.
This changes the default generated wallet to be a HD wallet.
We also add a helper class to configure newly created wallets from QML.
This finishes up the new wallet panel to have all the visible features
actually do something.
2021-10-27 19:11:00 +02:00
tomFlowee da8b883116 Add 'startHeight' advanced property to import wallet.
This also fixes a bunch of bugs which makes HD wallets in principle work
(tested with big test wallet).
2021-10-21 20:54:34 +02:00
tomFlowee 80f731b8b4 Show more details about HD wallet in UI 2021-10-21 17:04:20 +02:00
tomFlowee 14840d177f Fix reservation size to include payment requests 2021-10-21 15:12:04 +02:00
tomFlowee d839e18ed2 Add to wallet ability to sync a HD path 2021-10-21 14:57:20 +02:00
tomFlowee 1106937648 Make wallet able to be hierarchically deterministic 2021-10-14 14:42:27 +02:00
tomFlowee c03fbed5e2 Add functionality to export privkeys. 2021-07-31 17:19:34 +02:00
tomFlowee 7a4c3d6f93 Ensure we save whenever a new tx is found for a wallet.
This saves the wallet data at most once a second whenever new
transactions were found for a certain wallet.
2021-07-30 15:56:52 +02:00
tomFlowee 8853a8652b Make sure importing a privkey gives a single-key wallet 2021-07-30 14:09:39 +02:00
tomFlowee b907421c96 Avoid overflow. 2021-07-30 13:59:44 +02:00
tomFlowee 8a5acee807 Set not user-owned wallets to lowest prio.
We can't delete them completely, at least for a while, because we can't
know if the user has used the QR payment code we presented at the first
app startup.
2021-07-30 12:19:12 +02:00
tomFlowee ebb3950b4d Allow printing the imported addresses in debug. 2021-07-29 21:06:30 +02:00
tomFlowee 2973dcbe24 Make first startup much faster
We store a blockheight at which point a private key is created, allowing
us to skip merkle checks before that time.
This was was tricky for a not yet synched wallet because its blockchain
was stuck at height zero.
Causing us to sync everything anyway.

Now we store the timestamp of wallet create instead, until the time that
the blockchain is synched. After that we resolve the block that we need
to start sync from based on that timestamp.
2021-05-28 18:13:50 +02:00
tomFlowee 316465f8cc Fix first start problems. 2021-05-23 10:34:25 +02:00
tomFlowee 22c4230c1f Fix bug where sometimes an address could get reused 2021-05-05 14:13:40 +02:00
tomFlowee dc48600ff4 Make Schnorr signing default. 2021-05-04 17:41:49 +02:00
tomFlowee 7ea2f634b7 Ensure internally consistent state on wallet-load. 2021-05-03 12:58:58 +02:00
tomFlowee 82b0c9bed4 Merge branch 'walletAmounts' 2021-05-03 12:43:13 +02:00