Commit Graph

527 Commits

Author SHA1 Message Date
Roei Erez
282978fddf remove lock for liquid chain servivce 2025-01-28 20:29:59 +02:00
Roei Erez
a4ab1b0c4b return error instead of unwrap 2025-01-28 19:01:33 +02:00
Roei Erez
d046472a63 use cached electrum client connection for full_scan 2025-01-28 00:31:58 +02:00
Ross Savage
ad5b108eda Fix the send amount for swap payments (#693) 2025-01-25 19:59:36 +01:00
Ross Savage
79462db2e2 Verify and claim swap if not verifiable in swap loop (#681)
* Verify and claim swap if not verifiable in swap loop

* Verify lockup amount

* Tolerate overpayment

* Adapt receive swap test

* Separate verification functions and set swap Failed if underpaid
2025-01-25 09:30:24 +01:00
Daniel Granhão
386c62ea82 Consider PairLimits in is_refundable condition (#691)
* Consider PairLimits in is_refundable condition

* Prevent WaitingFeeAcceptance state for out of bounds lockup
2025-01-24 19:20:42 +00:00
Ross Savage
652c23800e Configure asset metadata (#659)
* Configure asset metadata

* Apply suggestions from code review

* Return BIP21 URI also when only non-bitcoin asset_id is defined

* Rename AssetMetadata functions
2025-01-24 16:57:22 +01:00
Ross Savage
e196a91973 Multi-asset send/receive (#645)
* Multi-asset send/receive

* Apply suggestions from code review

Co-authored-by: Daniel Granhão <32176319+danielgranhao@users.noreply.github.com>

* Log the prepare asset_id

---------

Co-authored-by: Daniel Granhão <32176319+danielgranhao@users.noreply.github.com>
2025-01-24 16:55:51 +01:00
Daniel Granhão
7841939e6a Expose amountless swap fees auto acceptance (#690)
* Expose amountless swap fees auto acceptance

* Move field behind optional ones

* Add serde default to auto_accepted_fees
2025-01-24 10:18:34 +00:00
Daniel Granhão
53fb22ab41 Chain swap refund tx fee bumping (#688)
* Chain swap refund tx fee bumping

* Add "pending" to refund tx id field names

* Rename pending to last
2025-01-24 09:41:32 +00:00
Daniel Granhão
6ec6c96709 Fix new clippy warnings (#689) 2025-01-23 09:42:10 +00:00
Daniel Granhão
1dd94e52ec Validate refund address input (#687) 2025-01-22 12:00:53 +00:00
Daniel Granhão
3c2f6edad8 Set specific rev for Boltz client crate (#685) 2025-01-22 10:36:20 +00:00
Daniel Granhão
6760960cb0 Add SdkEvent for refundable swap (#683) 2025-01-21 14:43:23 +00:00
Daniel Granhão
0cdfa2057c Prevent claiming of overpaid swaps (#667)
* Handle overpayments gracefully

* Fix test mock txs and swaps

* Get actual payer amount from blockchain

* Check first tx output instead of script balance

* Fetch actual payer amount if not available

* Remove user lockup amount verification in recoverer

* Refactor user lockup amount check into appropriate method
2025-01-21 10:13:13 +00:00
Ross Savage
16ac13e5b4 Include non-swap state in list payments query (#673) 2025-01-21 10:12:13 +01:00
yse
95998013a9 fix: remove mandatory API key checks (#639) 2025-01-21 08:32:05 +01:00
yse
4abcebcde8 feat: add sort_ascending flag to list_payments (#679) 2025-01-21 08:06:18 +01:00
Daniel Granhão
dd95b5a3f6 Fix receive chain swap is_refundable condition (#680) 2025-01-20 09:14:40 +00:00
Roei Erez
58e95334d3 fix confirmed balance
(cherry picked from commit 538a100140c948a867360972c399beda79601e75)
2025-01-19 19:01:05 +02:00
Ross Savage
746b6e0223 Discount Confidential Transactions (#637)
* Update dependencies

* Use discount-ct when building txs

* Broadcast using the electrum client

* Fix CI

* Remove use of esplora url

* Address PR feedback

* Fix dart/flutter

* Update zero-conf fee rate check

* Fix clippy
2025-01-19 13:57:38 +01:00
yse
3a09bbe653 fix: increase keep-alive time and add cli sync flag (#672)
Reflects changes from breez/data-sync#14
2025-01-17 18:25:47 +01:00
Ross Savage
f92a6b9f0f Ensure fees are calculated without overflow (#671) 2025-01-17 15:28:09 +01:00
yse
b185ff0e35 feat: add cooperative preimage recovery and optimize flow (#669) 2025-01-17 14:32:58 +01:00
Daniel Granhão
bc779e3269 Fix amountless receiver amount and waiting fee acceptance condition (#670) 2025-01-17 13:26:42 +00:00
Daniel Granhão
037c77ab9f Fix swap structs PartialEq implementation (#662) 2025-01-17 10:57:44 +00:00
Ross Savage
fb6c4e9a01 Store the payer/receiver amount (#668) 2025-01-16 20:53:01 +01:00
yse
ffcdfdbac3 fix: consider only confirmed txs for wallet balance (#664) 2025-01-16 12:07:15 +01:00
Daniel Granhão
9a4360bf00 Fix: prevent non-local chain swap claim (#660)
* Fix: prevent non-local chain swap claim

* Setup dotnet in binding tests

* Update cli Cargo.lock
2025-01-15 15:43:11 +00:00
yse
bb0b370d17 fix: remove auto-formatting command from build (#655)
* feat: use `include_protos` macro instead of builder
* fix: pin boltz to rev SatoshiPortal/boltz-rust@3bbc0dd
2025-01-15 11:02:35 +01:00
yse
53b5d9a5b0 fix(testnet): add lbtc asset matching network type (#658) 2025-01-14 15:56:44 +01:00
Daniel Granhão
0fa28623fd Ignore claim tx if preimage is not known or invalid (#653) 2025-01-14 09:46:50 +00:00
Daniel Granhão
22e79fc761 Fix migrations ordering (#656) 2025-01-13 15:07:19 +00:00
Daniel Granhão
95bbd0e49b Implement optimistic locking for read-update-write swap operations (#652)
* Implement optimistic locking for read-update-write swap operations

* Fail on stale swap update and add tests
2025-01-12 22:44:15 +00:00
Ross Savage
50cb8be18c Add destination pubkey and bolt12 invoice to payment details (#649)
* Add destination pubkey and bolt12 invoice to payment details

* Change macro to fn
2025-01-10 13:53:43 +03:00
Daniel Granhão
95352b9d75 Fix actual payer amount recovery 2025-01-09 15:10:39 +00:00
Ross Savage
66810ecdf6 feat: add swap expiry timestamp (#622) 2025-01-08 14:55:47 +01:00
Daniel Granhão
ad71cde463 Fix missing dart bindings 2025-01-07 15:45:29 +00:00
Erdem Yerebasmaz
1695c88d9c Update flutter_rust_bridge to 2.7.0 (#642)
* Suppress no-nullability-completeness errors

* Use 'dart run' instead of the deprecated 'flutter pub run' cmd

* Update flutter_rust_bridge to version 2.7.0

Set flutter_rust_bridge range to ">=2.4.0 <=2.7.0" on Dart plugin.

* Generate Dart bindings

* Update Flutter to latest version

* Update melos to latest version

* Make Flutter plugin compatible with AGP 8.+

- Declare 'namespace' property on module-level build script
  - Change default namespace
  - Remove package name from AndroidManifest
- Bump compileSdkVersion to latest
- Update source and target compatibility

warning: [options] source value 8 is obsolete and will be removed in a future release
warning: [options] target value 8 is obsolete and will be removed in a future release
2025-01-07 14:03:08 +03:00
Daniel Granhão
eadcdbf8da Merge pull request #641 from breez/fix-chain-swap-fee-display
Fix fees shown for send chain swaps
2025-01-07 10:13:48 +00:00
Daniel Granhão
8897352895 Merge pull request #638 from breez/bolt12-parsing-in-sdk-common
Move bolt12 parsing to sdk-common
2025-01-06 19:24:17 +00:00
Daniel Granhão
87c7a9fb40 Move bolt12 parsing to sdk-common 2025-01-06 18:40:13 +00:00
Daniel Granhão
a9ec1c01dd Fix fees shown for send chain swaps 2025-01-06 12:45:56 +00:00
Ross Savage
73d13b4e54 Increase the max zero-conf amount for receive swaps (#640) 2025-01-06 13:14:23 +01:00
Daniel Granhão
fa70c0b6df Add receiver amount to FetchPaymentProposedFeesResponse 2025-01-03 09:53:12 +00:00
Daniel Granhão
b18ad6d097 Fix update_fields 2025-01-03 09:37:02 +00:00
Daniel Granhão
a020ed5ddb Optimistically persist accepted receiver amount 2025-01-02 10:40:31 +00:00
Daniel Granhão
c4f707f87e Derive chain swap fees using claim tx amount when available 2025-01-02 10:40:31 +00:00
Daniel Granhão
dd6038be60 Implement accepted_receiver_amount_sat merge 2025-01-02 10:40:31 +00:00
Daniel Granhão
9383be49bc Bump schema minor version 2025-01-02 10:40:31 +00:00