1481 Commits

Author SHA1 Message Date
jp1ac4
c88224ca71
testutils: fix change_index 2024-03-09 19:08:58 +01:00
Antoine Poinsot
f19e872814
Merge #958: database: convert CoinStatus to listcoins argument string
fa39e2ced460918d6c6c94c0e2b7dae19b612fa9 database: convert `CoinStatus` to `listcoins` argument string (jp1ac4)

Pull request description:

  This is a preliminary PR towards https://github.com/wizardsardine/liana/issues/677 and is the counterpart to the existing `CoinStatus::from_arg()` method.

  This is needed so that the GUI can pass the required string arguments to the `listcoins` RPC command when using an external Liana daemon.

ACKs for top commit:
  edouardparis:
    ACK fa39e2ced460918d6c6c94c0e2b7dae19b612fa9

Tree-SHA512: e555739e641e4be66ce4942e8294606ab001572395ed73a6c40fa2af38f076357a7c3acba4e4d756fb6d334a11107827a95c53d3f3aecfe32ceca80fc85af83a
2024-03-09 19:06:01 +01:00
Antoine Poinsot
cf299b997b
Merge #957: Get genesis timestamp from bitcoind
f2c418f79a6fe8f1d6138b12af9fdc7303b4725d get genesis timestamp from bitcoind (pythcoiner)

Pull request description:

  fixes #904

ACKs for top commit:
  jp1ac4:
    ACK f2c418f79a.

Tree-SHA512: 7b1b7c13c21b657109ab0aab0d89deb47f5f6693f95687b86c219fc109ee304c38e3ebe865d071ebbbfa890a6a754c615f5dd70f2fe8c492bdea35d0394f36eb
2024-03-09 19:04:00 +01:00
Antoine Poinsot
1819988b3f
Merge #921: Add optional txids param to listspendtxs
da1ebce5b6328f8f5636192e7434d1ba598d5516 add txids param to listspendtxs (pythcoiner)

Pull request description:

  fix #862
  - [x] daemon
  - [x] tests
  - [x] doc

ACKs for top commit:
  jp1ac4:
    ACK da1ebce5b6.

Tree-SHA512: 9696a8077bce2ba8f2abc9eda6a4cdc8654c83ffd61bc5b8419ca50e5ecc447dc78d2059e608c16e94306c27f2aaf21a77c879d21a54f24a049337545750cef7
2024-03-09 18:55:01 +01:00
Antoine Poinsot
1fe5acb673
Merge #873: commands: include unconfirmed change as coin selection candidates
c0d432057df6b2f0bc879f718489c761867fa88c spend: add warning about fee for ancestor (jp1ac4)
a38c1739b6d6bdc5944e2300f1cdf9121babf7d1 spend: return additional fee paid for ancestors (jp1ac4)
62bb4aded43a379bcf5607fd48c492fcfb84bfd5 commands: include unconfirmed change as candidates (jp1ac4)
b05b0f14e5e08ab32e78ea263531d8a587c5b184 commands: add ancestor info for user-selected unconfirmed coins (jp1ac4)
94ef66c03a17221cc9cddb8d1d463a46f0b489c9 spend: increase candidate weight to pay for ancestor (jp1ac4)
5f0022083df8354ceb03d79311317e378296629d bitcoin: add mempool_entry to interface (jp1ac4)
edbf00f17c3796dc326bfbe6ae8833c201bdc045 bitcoin: add ancestor size and fees to mempool entry (jp1ac4)
04503225bcd066dd7d4099997c56b836c29d5b31 func test: use utils function (jp1ac4)

Pull request description:

  This is a first PR towards resolving #826 that adds unconfirmed change as coin selection candidates when creating a spend.

  As per https://github.com/wizardsardine/liana/issues/826#issuecomment-1853058734, I haven't made any changes to the `rbfpsbt` command.

  We will also need to apply the same change in the GUI when selecting candidates for coin selection there (see https://github.com/wizardsardine/liana/pull/863#discussion_r1422823362).

ACKs for top commit:
  darosior:
    ACK c0d4320

Tree-SHA512: 8c17f5f8c32913f1ffae3a93ca3e8ee52ac40ee86790e41d73def5ed0c057e110e101797f778715fcd5f6bded1cd170618209323b5114a4f69c02d0ce066a2f2
2024-03-09 18:48:54 +01:00
jp1ac4
fa39e2ced4
database: convert CoinStatus to listcoins argument string 2024-03-08 08:16:04 +00:00
edouardparis
f5a15513f2
Merge #997: gui: add transaction redirection
0c1a1b8d6d6ead20fdb1af659cace229f814d9fb gui: add redirection to selected transaction panel (edouardparis)

Pull request description:

  based on #959
  This PR removes the payment section about the transaction inputs outputs for a redirection to the payment transaction (The `See transaction details` button). It makes it easy to fee bump a payment by clicking on it to be redirected to the transaction to rbf

  ![20240305_18h13m51s_grim](https://github.com/wizardsardine/liana/assets/6933020/bbb21e84-9fb6-4eed-ba93-2c4f6177cb95)

  Maybe the UX/UI of the payment should be changed to remove more transaction information, but I fear it makes the panel a little bit empty.

ACKs for top commit:
  jp1ac4:
    ACK 0c1a1b8d6d.

Tree-SHA512: f767b1cbf86cafcd0b46e5dfc0625f15719b48314de93418b73e59bd32e6dc659ab2ea3a4e2d379680c4209bfbd633c5329fe9fa2616c042dd2851f62f860498
2024-03-07 17:59:21 +01:00
edouardparis
0c1a1b8d6d gui: add redirection to selected transaction panel 2024-03-06 16:37:11 +01:00
edouardparis
505b218618
Merge #959: Refac app: keep every panel states
18e040e51ff835f5f6c8218392496865b6f8737a fix: override unpaginated pending events and txs (edouardparis)
2995df870f711966d7d275f67de70719dd1498ce fix psbts panel: keep list of psbts in background (edouardparis)
a6832ad0b7a881889e26c10c65f4d0ecd6e8c098 fix send panel: reload coins (edouardparis)
710883b6a2467e4c8fab9b2382e8227b602dfa42 Restart spend process according to current state (edouardparis)
a91fdd791aedc997e4b43e23db8af8c5382cab17 Encapsulate cache with its own message (edouardparis)
dc3d29e3f06b7cb2aa0d502edd6f7fcf0aadf458 Remove spend_txs from cache (edouardparis)
2d2cd12bda47feff6faa01cb5a1338d7f0f9f7a0 Restart new spending process on user demand (edouardparis)
ed363963b34235d49291a0da7719fd655ff7a8dc Change state load method for reload (edouardparis)
c15424abe5a3255b63d45903f14b1044af859e6a fix clippy (edouardparis)
fa4483a4b71ceb17463e89a27d1337c3cfc4d20d gui: add reload cycle to reset state (edouardparis)
c268c3a093594b76d424d935840c8c5ef6c83482 gui: load receive panel only once (edouardparis)
9b4b6fef1bee12e3e370a34c9d9c30eb437bf404 gui: refac app, keep all states (edouardparis)

Pull request description:

  This refac keeps each panel state in parallel.

ACKs for top commit:
  jp1ac4:
    ACK 18e040e51f.

Tree-SHA512: 87937a5e7cf315325e06aeda0789024a68cfb2c137cd1319445e670fa2641775a6d58cbc787271f2b73d43ff5b83e934f0561a4968afd05f8f52cff85e81a27e
2024-03-06 16:15:05 +01:00
edouardparis
18e040e51f fix: override unpaginated pending events and txs
pending events and txs are passed unpaginated and
in full list through PendingTransactions and PendingPayments.
It is useless and armful to append to them to an existing
list of pending events as a new rbf replacement event should
override the previous one and only one of them must be displayed.
2024-03-06 15:32:06 +01:00
edouardparis
2995df870f fix psbts panel: keep list of psbts in background
fix this comment:
https://github.com/wizardsardine/liana/pull/959#issuecomment-1964811858

new_preselected is changed for a preselect method that keeps the
current state of the psbts list panel and open the modal with the
selected psbt.
2024-03-06 15:32:06 +01:00
edouardparis
a6832ad0b7 fix send panel: reload coins
When going back to send panel, coins are fetched
again and passed to DefineSpendStep. A redraft
is triggered because some coins may have been
removed from the list and new coins were deposited.
2024-03-06 15:32:06 +01:00
edouardparis
710883b6a2 Restart spend process according to current state
Spend process keeps its state if it is the first step.
User can click on Clear to reset if he wants.
2024-03-06 15:32:06 +01:00
edouardparis
a91fdd791a Encapsulate cache with its own message 2024-03-05 11:32:10 +01:00
edouardparis
dc3d29e3f0 Remove spend_txs from cache 2024-03-05 11:32:10 +01:00
edouardparis
2d2cd12bda Restart new spending process on user demand 2024-03-05 11:32:10 +01:00
edouardparis
ed363963b3 Change state load method for reload 2024-03-05 11:32:10 +01:00
edouardparis
c15424abe5 fix clippy 2024-03-05 11:32:10 +01:00
edouardparis
fa4483a4b7 gui: add reload cycle to reset state
When user clicks on the sidebar menu
of the current panel, he expects the
view to reset to its initial state
without modal of transaction detail
for example.
2024-03-05 11:32:10 +01:00
edouardparis
c268c3a093 gui: load receive panel only once 2024-03-05 11:32:10 +01:00
edouardparis
9b4b6fef1b gui: refac app, keep all states 2024-03-05 11:32:10 +01:00
edouardparis
3420c54793
Merge #974: gui: add max button for spend recipients
46cd0f4923c5fe59a5ff08134c850d9a9ceb345a gui: add max checkbox for spend recipients (jp1ac4)
83fa9a9c924bb1326b859f1d2d5aac58c291e960 gui: unset amount left to select if form invalid (jp1ac4)
fba77a30e2aa9984cbda0fdaf40736ff1b0e57c4 gui: check if feerate is already set (jp1ac4)
d9b8285fac1288e895d4b460646f73c664d1a2ff gui: fix cargo fmt (jp1ac4)

Pull request description:

  This adds the MAX button from #546.

  The max amount is calculated within the `redraft` function based on the change output. The recipient's amount is updated directly within this same function in order to avoid another call to `redraft` after updating the amount.

  The MAX button only takes effect once when the user clicks it. If further changes are made (e.g. to feerate or other recipients), the value will not update and the user will need to click MAX again.

  Currently, the MAX button is always clickable. It would be possible to determine for each recipient whether the MAX button should be clickable for that recipient (feerate is valid and all other recipients are valid and no duplicates), but it's not a trivial change so I'm not sure if it's worth doing as I think the behaviour is quite intuitive.

ACKs for top commit:
  edouardparis:
    ACK 46cd0f4923c5fe59a5ff08134c850d9a9ceb345a

Tree-SHA512: 16f22804d630686427da196fd1627287e2e20f2e122602c385157064323113b27b9ec9c56ada162acb55d11b8084667ee3f1a9f992a2f4eef70f25c6f7a5b20b
2024-03-04 16:20:57 +01:00
jp1ac4
46cd0f4923
gui: add max checkbox for spend recipients 2024-03-04 14:55:37 +00:00
jp1ac4
83fa9a9c92
gui: unset amount left to select if form invalid 2024-03-01 11:11:23 +00:00
jp1ac4
fba77a30e2
gui: check if feerate is already set 2024-03-01 11:11:23 +00:00
jp1ac4
d9b8285fac
gui: fix cargo fmt 2024-03-01 11:11:22 +00:00
edouardparis
7801fc779c
Merge #940: gui(spend): display warnings for draft PSBTs
85f5a68ed3b9bfee1488fceddb8a78321d1583a2 gui(spend): display warnings for draft PSBTs (jp1ac4)

Pull request description:

  This is to complete #811.

  It displays any warnings generated by `createspend` on the draft PSBT view, which could currently be those from https://github.com/wizardsardine/liana/pull/905 and https://github.com/wizardsardine/liana/pull/873. Once the PSBT has been saved, these warnings will no longer be shown.

  Below are some screenshots.

  With a warning:
  ![image](https://github.com/wizardsardine/liana/assets/121959000/fb2167d9-4800-4849-8622-ff20ac55623e)

  ![image](https://github.com/wizardsardine/liana/assets/121959000/e1ab9ec2-00ae-457f-81e1-9b3a2863af31)

  Without a warning:
  ![image](https://github.com/wizardsardine/liana/assets/121959000/73b5b4bd-55b5-40ee-b587-4f57bfd57b4c)

  ![image](https://github.com/wizardsardine/liana/assets/121959000/e9b23d4e-bb13-4ae7-944e-258f9c9a0abd)

ACKs for top commit:
  edouardparis:
    ACK 85f5a68ed3b9bfee1488fceddb8a78321d1583a2

Tree-SHA512: b9875801f7607f6f824ad9ab5182e93aa533ba2bbb8f9a4168c4a2a779a8f39cf77dc0b24eac7c99a0fce36c486c126144d23b0cb7ecec27ebc145ea2ffdb212
2024-02-27 17:25:28 +01:00
jp1ac4
85f5a68ed3
gui(spend): display warnings for draft PSBTs 2024-02-27 14:55:17 +00:00
Antoine Poinsot
4baf632a90
Merge #972: ci: bump bitcoind version in functional tests to 26.0
bdf8b8f625030697ca58680fd0c99c3dd3bf77af Rename IS_BITCOIND_25 to IS_NOT_BITCOIND_26 (Antoine Poinsot)
0acdccd3ac7855ebf6c519849d1ae48b35213667 ci: bump bitcoind version in functional tests to 26.0 (Antoine Poinsot)

Pull request description:

  I thought there was some hacks i do in the functional tests i needed to update but apparently i was mistaken.

ACKs for top commit:
  darosior:
    self-ACK bdf8b8f625030697ca58680fd0c99c3dd3bf77af - ran ci one last time and didn't notice any flakiness

Tree-SHA512: 0ffb6026d43ef0670e83feb19d733089e4b023937ac7851ffe2eda9b1491cd432e4abde9afb8386c66b4f2ae57506f5e25ea797d84d37fa055a43df64c5b77b0
2024-02-27 14:24:26 +01:00
Antoine Poinsot
0f35a88a94
Merge #984: descriptors: fix derived key parsing and formatting
e9bd8805e5917b05c483db5ba6b7ff34d98dc36d descriptors: fix derived key parsing and formatting (Antoine Poinsot)

Pull request description:

  This was untested, what could go wrong? Well, it was wrong of course!

ACKs for top commit:
  darosior:
    self-ACK e9bd8805e5917b05c483db5ba6b7ff34d98dc36d

Tree-SHA512: 87fb1c84d5b03e59970183882dd63020687011eb5d08e1e31bad04609bdaef0c5a6bf0b5e63be3f2248dd35249cde7d43c83b7c19415cde31bd0a08ec46315be
2024-02-27 14:19:49 +01:00
Antoine Poinsot
bdf8b8f625
Rename IS_BITCOIND_25 to IS_NOT_BITCOIND_26
for f in ; do sed -i 's/IS_BITCOIND_25/IS_NOT_BITCOIND_24/g' tests/test_misc.py; done
2024-02-27 14:18:04 +01:00
Antoine Poinsot
e9bd8805e5
descriptors: fix derived key parsing and formatting 2024-02-27 13:03:11 +01:00
pythcoiner
da1ebce5b6 add txids param to listspendtxs 2024-02-24 21:56:48 +01:00
Antoine Poinsot
0acdccd3ac
ci: bump bitcoind version in functional tests to 26.0 2024-02-22 16:52:04 +01:00
edouardparis
903328ffef
Merge #971: gui: prevent spend with duplicate addresses
8639f9b94f1fdceaee94aa927e8f9b7b07cc51f9 gui: prevent spend with duplicate addresses (jp1ac4)

Pull request description:

  Currently, if duplicate addresses are entered when creating a new spend, the user can click Next and only the second amount will be used for the draft PSBT.

  This change prevents the user clicking Next if there are duplicate addresses and stops the `redraft` function running.

ACKs for top commit:
  edouardparis:
    ACK 8639f9b94f1fdceaee94aa927e8f9b7b07cc51f9

Tree-SHA512: f2110e49e07ec04deb8997fae987998dcfeacc41bec0c770a16fe555bde0b49b67c4cc14736fb7bbb5e536abb3d2ef1e847bbe5075be751b579728aac2a98a97
2024-02-22 14:26:37 +01:00
jp1ac4
8639f9b94f
gui: prevent spend with duplicate addresses
Previously, if duplicate addresses were entered when creating
a new spend, the user could click Next and only the second
amount would be used for the draft PSBT.

This prevents the user clicking Next if there are duplicate
addresses and stops the redraft function running.
2024-02-22 12:29:52 +00:00
edouardparis
c1e2d26c63
Merge #950: [GUI] Add index into qrcode
7483988c53ee6201438283eff496302b7e647176 add index into qrcode (pythcoiner)

Pull request description:

  fixes #838

ACKs for top commit:
  edouardparis:
    utACK 7483988c53ee6201438283eff496302b7e647176

Tree-SHA512: f33dd29f2857cab08c09eca03dcb208937b6b13da9e4ef811cbc4e8e4f6bbb73f1eee629736d98bf00bd9b65be5e96987c18ede42d20c9f486c5ec4e47ada275
2024-02-20 15:32:26 +01:00
pythcoiner
f2c418f79a get genesis timestamp from bitcoind 2024-02-11 01:59:49 +01:00
edouardparis
e92cbf34d7
Merge #966: gui: bump dependencies to fix nightly build
0c665f9c3ca3791fe2d1f9a70156b1d76fd2cea2 gui: bump dependencies to fix nightly build (jp1ac4)

Pull request description:

  This includes the changes from https://github.com/dalek-cryptography/curve25519-dalek/pull/619 and https://github.com/dalek-cryptography/curve25519-dalek/pull/621.

ACKs for top commit:
  edouardparis:
    utACK 0c665f9c3ca3791fe2d1f9a70156b1d76fd2cea2

Tree-SHA512: 414f65ff0d0b102ba43506042ebb3d4acbc67a019620a044d3be4d6b8c950e8c5d5d44fe722d38a0a445b1dc374f5e374b129d32cd66b5fed27cc2d53cc7f8e7
2024-02-09 11:31:49 +01:00
jp1ac4
0c665f9c3c
gui: bump dependencies to fix nightly build 2024-02-09 09:37:01 +00:00
edouardparis
3fcbb0b67d
Merge #954: [GUI] Add version args
601bd08c0c1b5b86f4a016fa8d4acb080416cd83 add -v / --version args (pythcoiner)

Pull request description:

  fixes #896

  ![image](https://github.com/wizardsardine/liana/assets/124568858/c90ff9ff-41b9-41f3-8938-387c0eb81f38)

ACKs for top commit:
  edouardparis:
    ACK 601bd08c0c1b5b86f4a016fa8d4acb080416cd83

Tree-SHA512: ca54927141bc1115fae04480dbe1867cafd30955278e1845d4170079d4ce13300e722b11bbe73f85e1e8862f0b5576a14a1b5bb5997bf23e33dc8af6320cbc36
2024-02-02 15:49:49 +01:00
pythcoiner
601bd08c0c add -v / --version args 2024-02-02 14:46:22 +01:00
edouardparis
a88963cd77
Merge #952: gui: do not display hw error on simple user refusal
3a30a36ce5f58e8ae2c92926384d76253e702894 gui: do not display hw error on simple user refusal (edouardparis)

Pull request description:

  close #937

ACKs for top commit:
  edouardparis:
    Self-ACK 3a30a36ce5f58e8ae2c92926384d76253e702894

Tree-SHA512: c2c1aed212b9389bac62da17552daa6d87d0eeea6180ec19e37dd9ef4dd0faa935a621123df6306ef9ca6fadffba35c1c047d2906a9c15db3a14cd8ccf156e29
2024-02-02 11:55:01 +01:00
edouardparis
7bef08797b
Merge #951: gui(installer): clear checkbox if descriptor is changed
416dc9d2d83c3b06ce7e7f5e282a5b9251fa303d gui(installer): clear checkbox if descriptor is changed (jp1ac4)

Pull request description:

  Currently, once the box has been ticked to confirm the descriptor has been backed up, it remains ticked even if the user goes back and changes the descriptor.

  This PR will clear the checkbox if the descriptor is changed so that the user knows it needs to be backed up

ACKs for top commit:
  edouardparis:
    ACK 416dc9d2d83c3b06ce7e7f5e282a5b9251fa303d

Tree-SHA512: c8d2be242ada364fe97b0846912420ea206f03f82290dbb87ce513746b8f555f8993d906cd38d27cba513414940bd8984282fc26389608939d89fb252f4c1049
2024-02-02 11:52:14 +01:00
edouardparis
3a30a36ce5 gui: do not display hw error on simple user refusal
close #937
2024-02-02 11:32:39 +01:00
jp1ac4
416dc9d2d8
gui(installer): clear checkbox if descriptor is changed 2024-02-02 10:23:43 +00:00
pythcoiner
7483988c53 add index into qrcode 2024-02-02 10:40:09 +01:00
edouardparis
445a8c1334
Merge #930: gui: add warnings for descendant & conflicting transactions that will be dropped
fde28bf571e4ba791617e62f0c124138cd58e1fe gui(transactions): get prev feerate from tx instead of param (jp1ac4)
dc817dee3be64bba5e8bee7a0ec646bb90e643d4 gui(transactions): check for direct descendants before rbf (jp1ac4)
881d9a74a29eef21aafd75f9851f588142e0091f gui(psbt): check for conflicting txs before broadcast (jp1ac4)
beabf08cbfe55e12a191d02c0a3370dc207fac86 gui: match on message for PsbtState (jp1ac4)
9e5872c56f7877227d5116207f611c2e44618325 gui(transactions): reword rbf modal message (jp1ac4)
c50954e9105fd81231fcb17527941d650e9c9f42 gui(transactions): split strings across multiple lines (jp1ac4)

Pull request description:

  This is for #903.

  It adds two warnings to the GUI:
  - when creating a new RBF if there are any descendant transactions of the transaction to be replaced:
  ![image](https://github.com/wizardsardine/liana/assets/121959000/b3d91253-fa5f-4c4c-b3f7-1e22d56ff0ba)

  - when broadcasting a transaction if there are any conflicting transactions
  ![image](https://github.com/wizardsardine/liana/assets/121959000/c3c8d932-e2d9-4982-9f5d-c7cf15d53370)

  These warnings are generated in the GUI using coins data from the DB and so will not appear if the DB coins have not yet been updated. Would resolving https://github.com/wizardsardine/liana/issues/887 help ensure the coins are updated before running these checks?

ACKs for top commit:
  edouardparis:
    ACK fde28bf571e4ba791617e62f0c124138cd58e1fe

Tree-SHA512: 3c428439926448a1d1fd0deb161b2b4016fcd6c4e2c0792ceb36e2c8bfc545ee5849ee76a6a89573a4389c6033bfe8ebd9f68555eca8a4f8f0e5fe1ac780be6d
2024-02-02 10:35:33 +01:00
jp1ac4
fde28bf571
gui(transactions): get prev feerate from tx instead of param 2024-02-01 17:00:38 +00:00
jp1ac4
dc817dee3b
gui(transactions): check for direct descendants before rbf 2024-02-01 16:59:55 +00:00