mirror of
https://github.com/aljazceru/breez-sdk-liquid.git
synced 2025-12-23 08:54:22 +01:00
Persist swapper fees for swaps (#586)
* Add new Payment field swapper_fees_sat * Add swapper fee handling for Receive Swaps * Add swapper fee handling for Send Swaps * Add swapper fee handling for Chain Swaps * Fix tests * Send Swap: persist pair JSON instead of service fee * Receive Swap: persist pair JSON instead of service fee * Chain Swap: persist pair JSON instead of service fee
This commit is contained in:
@@ -552,6 +552,10 @@ class Payment {
|
||||
/// - for Receive payments, this is zero
|
||||
final BigInt feesSat;
|
||||
|
||||
/// Service fees paid to the swapper service. This is only set for swaps (i.e. doesn't apply to
|
||||
/// direct Liquid payments).
|
||||
final BigInt? swapperFeesSat;
|
||||
|
||||
/// If it is a `Send` or `Receive` payment
|
||||
final PaymentType paymentType;
|
||||
|
||||
@@ -572,6 +576,7 @@ class Payment {
|
||||
required this.timestamp,
|
||||
required this.amountSat,
|
||||
required this.feesSat,
|
||||
this.swapperFeesSat,
|
||||
required this.paymentType,
|
||||
required this.status,
|
||||
required this.details,
|
||||
@@ -584,6 +589,7 @@ class Payment {
|
||||
timestamp.hashCode ^
|
||||
amountSat.hashCode ^
|
||||
feesSat.hashCode ^
|
||||
swapperFeesSat.hashCode ^
|
||||
paymentType.hashCode ^
|
||||
status.hashCode ^
|
||||
details.hashCode;
|
||||
@@ -598,6 +604,7 @@ class Payment {
|
||||
timestamp == other.timestamp &&
|
||||
amountSat == other.amountSat &&
|
||||
feesSat == other.feesSat &&
|
||||
swapperFeesSat == other.swapperFeesSat &&
|
||||
paymentType == other.paymentType &&
|
||||
status == other.status &&
|
||||
details == other.details;
|
||||
|
||||
Reference in New Issue
Block a user