feat: invoice details to Payment (#309)

This commit is contained in:
yse
2024-06-18 17:32:51 +02:00
committed by GitHub
parent 78228d8961
commit 4e76e94d26
13 changed files with 72 additions and 21 deletions

View File

@@ -293,6 +293,11 @@ class Payment {
/// In case of a Send swap, this is the preimage of the paid invoice (proof of payment).
final String? preimage;
/// Represents the invoice associated with a payment
/// In the case of a Send payment, this is the invoice paid by the swapper
/// In the case of a Receive payment, this is the invoice paid by the user
final String? bolt11;
/// For a Send swap which was refunded, this is the refund tx id
final String? refundTxId;
@@ -314,6 +319,7 @@ class Payment {
required this.amountSat,
required this.feesSat,
this.preimage,
this.bolt11,
this.refundTxId,
this.refundTxAmountSat,
required this.paymentType,
@@ -328,6 +334,7 @@ class Payment {
amountSat.hashCode ^
feesSat.hashCode ^
preimage.hashCode ^
bolt11.hashCode ^
refundTxId.hashCode ^
refundTxAmountSat.hashCode ^
paymentType.hashCode ^
@@ -344,6 +351,7 @@ class Payment {
amountSat == other.amountSat &&
feesSat == other.feesSat &&
preimage == other.preimage &&
bolt11 == other.bolt11 &&
refundTxId == other.refundTxId &&
refundTxAmountSat == other.refundTxAmountSat &&
paymentType == other.paymentType &&