list-refundables: show refundable amount, not swap amount (#516)

* list-refundables: show refundable amount, not swap amount

* Rename chainswap fn for clarity

get_lockup_swap_script_pubkey only applies to Receive Chain Swaps, so it was renamed to get_receive_lockup_swap_script_pubkey.

* list_refundables: batch calls to fetch balance from chain service

* Simplify conversion from Chain Swap to RefundableSwap

* Fix MockBitcoinChainService

* Re-generate flutter bindings

* Add utility for creating SdkError::Generic with &str or String

* Chain Swap getter for swap script pk: throw SdkError instead of anyhow::Error

* Update RefundableSwap comment

Co-authored-by: Ross Savage <551697+dangeross@users.noreply.github.com>

* Re-generate dart files

---------

Co-authored-by: Ross Savage <551697+dangeross@users.noreply.github.com>
This commit is contained in:
ok300
2024-10-07 17:56:02 +02:00
committed by GitHub
parent 950d4243e6
commit 046e7ab1c8
12 changed files with 128 additions and 112 deletions

View File

@@ -1047,6 +1047,8 @@ class RefundResponse {
class RefundableSwap {
final String swapAddress;
final int timestamp;
/// Amount that is refundable, from all UTXOs
final BigInt amountSat;
const RefundableSwap({