1450 Commits

Author SHA1 Message Date
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
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
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
jp1ac4
881d9a74a2
gui(psbt): check for conflicting txs before broadcast 2024-02-01 16:59:02 +00:00
jp1ac4
beabf08cbf
gui: match on message for PsbtState 2024-02-01 16:02:56 +00:00
jp1ac4
9e5872c56f
gui(transactions): reword rbf modal message 2024-01-31 16:06:16 +00:00
jp1ac4
c50954e910
gui(transactions): split strings across multiple lines
This is easier to read and ensures `cargo fmt` works.
2024-01-31 16:06:15 +00:00
edouardparis
bc7f2e3f6b
Merge #944: gui: duplicate labels for rbf psbt
6dd1d87228efc691151cc603dae6844a85d63099 gui: reuse labels for rbf psbt (edouardparis)
dc2fb2ac4668aea669b57c595e6fc47bba0c65c0 gui: move rbf in iced command (edouardparis)

Pull request description:

  close #861

ACKs for top commit:
  edouardparis:
    Self-ACK 6dd1d87228efc691151cc603dae6844a85d63099

Tree-SHA512: 62433ec28f4924c3d8fbd342a91432a51f8e7e05e1d9e6da74f3053bba6337dc24db92d44598325763c7b517bb07eaa2b3dc673c666c99ed0c56057f2ef74251
2024-01-31 15:20:14 +01:00
edouardparis
6dd1d87228 gui: reuse labels for rbf psbt
close #861
2024-01-31 14:27:12 +01:00
edouardparis
dc2fb2ac46 gui: move rbf in iced command 2024-01-31 14:27:12 +01:00
edouardparis
05bbeffdf6
Merge #941: gui: display error for rescan past pruned height
69fd1891f3d4c0c1d9fa3ec807a7a09bd8468a5c If date prior to genesis block timestamp, rescan from genesis (edouardparis)
18f2fe45722466b897f1f98010783b6ff0a4ddbc gui: display error for rescan past pruned height (edouardparis)

Pull request description:

  close #900

  After discussion with @kloaec it is better to not return error if date is prior to genesis block date, just take genesis block timestamp

ACKs for top commit:
  edouardparis:
    Self-ACK 69fd1891f3d4c0c1d9fa3ec807a7a09bd8468a5c
  jp1ac4:
    ACK 69fd1891f3.

Tree-SHA512: be9499d24ee455aef5965c4e6766d5040ee427cd37120461724ec67ba7a591eea0aee5265292df053ed65c8bc1e85095f6511d9dbed9e5f0da0c112acf21140e
2024-01-31 11:44:37 +01:00
edouardparis
69fd1891f3 If date prior to genesis block timestamp, rescan from genesis 2024-01-31 11:07:06 +01:00
edouardparis
18f2fe4572 gui: display error for rescan past pruned height
close #900
2024-01-30 17:06:01 +01:00
edouardparis
ae9e42421f
Merge #947: gui: use createspend command for coin selection and missing amount
cb5073c83a54b3e4d430a7b30ce590c8385f7f7c gui(spend): use create_spend_tx for missing amount (jp1ac4)
fae32df08656bf550f6a035dad6a3f4b56a9b6fc gui: pass change_address param to createspend (jp1ac4)

Pull request description:

  This PR is a follow-up to https://github.com/wizardsardine/liana/pull/927 and uses changes made in https://github.com/wizardsardine/liana/pull/938.

  It reverts to using the `createspend` command in the GUI for automated coin selection and to determine the amount left to select when creating a new spend (which was previously changed in https://github.com/wizardsardine/liana/pull/863).

  With this PR, the changes from https://github.com/wizardsardine/liana/pull/873 will become effective in the GUI so that (some) unconfirmed coins are used as candidates and any additional fee to pay for ancestors is included when calculating the amount left to select.

ACKs for top commit:
  edouardparis:
    ACK cb5073c83a54b3e4d430a7b30ce590c8385f7f7c

Tree-SHA512: d780b8a0238b595301701d889c45b263682867cdff1ec054872f717de7ae3d325fc5010c8df29333ae2a44ae2e92a86689d332a26ac7334c7e92fd9ffc7a6397
2024-01-30 16:32:52 +01:00
jp1ac4
cb5073c83a
gui(spend): use create_spend_tx for missing amount 2024-01-30 13:45:09 +00:00
jp1ac4
fae32df086
gui: pass change_address param to createspend 2024-01-29 15:53:49 +00:00
edouardparis
a34070dce1
Merge #938: gui: use descriptor method to detect psbt change outputs
366e9b7d49eb7261df4801534224cb737a49149f gui: use descriptor method to detect psbt change outputs (edouardparis)

Pull request description:

  This commit also fix handling of create_spend result while updating liana:master

  close #841

ACKs for top commit:
  edouardparis:
    Self-ACK 366e9b7d49eb7261df4801534224cb737a49149f

Tree-SHA512: 5316e610ec6fe1c09447329c031a52710fa7802c0135cc2e386d9926d5f189f1b381596b1f5b081beb2904341d4d7468fa1b4148e9fc49644670e5d8335ca015
2024-01-26 17:12:05 +01:00
edouardparis
366e9b7d49 gui: use descriptor method to detect psbt change outputs
This commit also fix handling of create_spend result while
updating liana:master

close #841
2024-01-25 17:01:43 +01:00
edouardparis
5a56fdb108
Merge #933: Fix error message when importing desc for wrong network
24f67d2a85b12730c669c4c7e311a534f75cc0ad Fix error message when importing desc for wrong network (edouardparis)

Pull request description:

  close #781

ACKs for top commit:
  edouardparis:
    Self-ACK 24f67d2a85b12730c669c4c7e311a534f75cc0ad

Tree-SHA512: a2e82e20144e2eebf08897e6c64f8426a30dba1d062553238e28a4b5d9abc12c981917a1f6c5a57d99fdf714c62cbc1de7fba061fcad92aee444d4e642ffcc10
2024-01-24 14:15:09 +01:00
edouardparis
24f67d2a85 Fix error message when importing desc for wrong network
close #781
2024-01-24 13:48:05 +01:00
Antoine Poinsot
3aa9550a89
Merge #922: descriptors: add a method to get a PSBT's change outputs
39299263954b4d29f6bdcb177e9b2377d1ea92ed descriptors: add a method to get a PSBT's change outputs (Antoine Poinsot)
c6b554da93bdc90b0c2a6cb70d962fcaaf718aff descriptors: unit test we do take into account derivation steps before wildcard and multipath (Antoine Poinsot)

Pull request description:

  Fixes #857.

ACKs for top commit:
  darosior:
    ACK 39299263954b4d29f6bdcb177e9b2377d1ea92ed -- re-applying Edouard's ACK. Only change is the addition of an `index()` method on the `ChangeOutput` enum.

Tree-SHA512: fceaa4e492684be08d45ab09d74345d5825b73d930f5caa4162862e5ff94f32cd5e9ab23b0730bc7ef44569c8e10cfed0f343b4843590a2163122d3402fc3734
2024-01-24 11:28:51 +01:00
Antoine Poinsot
3929926395
descriptors: add a method to get a PSBT's change outputs 2024-01-24 11:26:00 +01:00
edouardparis
2f50c55f79
Merge #936: fix panic for managed bitcoind on network change
a7b84860793a2094b9cbfe13f380f852622ab2d5 fix panic for managed bitcoind on network change (edouardparis)

Pull request description:

  close #934

ACKs for top commit:
  jp1ac4:
    ACK a7b8486079.

Tree-SHA512: 436a71a4a62f6c06fa97be85b4a1d49e9ab1abfb0ff95dab63f5ff0ab6531fe0bcc6f84045b287660f434da01ea57fcbc2c345147d5d7970cfdbfb31e4e46200
2024-01-24 10:35:24 +01:00
Antoine Poinsot
79141e2042
Merge #927: commands: include missing amount in spend response
13398982534d56a5723dfa86723c5917483c8653 commands: include missing amount in response (jp1ac4)

Pull request description:

  This PR follows a discussion around https://github.com/wizardsardine/liana/pull/873#issuecomment-1886715468.

  The GUI uses the `InsufficientFunds` error to get the missing amount when the user is creating a new spend, but it is not straightforward to extract this information in a general way from the RPC error (see https://github.com/wizardsardine/liana/issues/822#issuecomment-1836482355) and instead the spend module's `create_spend` is currently used (see https://github.com/wizardsardine/liana/pull/863).

  With this PR, the missing amount will be included in the `createspend` response rather than as an error.

  These changes are based on suggestions from @darosior and @edouardparis.

  In a follow-up PR, the GUI should revert to using the `createspend` command to calculate the amount left to select.

ACKs for top commit:
  darosior:
    re-ACK 1339898

Tree-SHA512: bf702d6b355339e96e719c1d95824e7941ac4fbaece4ec4cccd00b56ea4683ce7fb0cefc43faa5731b57e7935ef99da3a2c73b84aaeb9fa5f67703c799be2196
2024-01-23 17:33:48 +01:00
edouardparis
a7b8486079 fix panic for managed bitcoind on network change
close #934

Co-authored-by: jp1ac4 <121959000+jp1ac4@users.noreply.github.com>
2024-01-23 17:24:28 +01:00
edouardparis
e671e508ef
Merge #932: Reset bitcoind default settings on network change
8146269296bd1a6a638c726be7b2b5c53d9ff730 Reset bitcoind default settings on network change (edouardparis)

Pull request description:

  close #812

ACKs for top commit:
  edouardparis:
    Self-ACK 8146269296bd1a6a638c726be7b2b5c53d9ff730

Tree-SHA512: 359ea05c663b76615fcae2ecde8e1c63a0345db92e498d4d57b373eab04d6fcb40a46382314caf8edc58c25aae84956e41ee6bfc465a74f91b4f15aaa40d07ed
2024-01-23 16:44:32 +01:00