Skip to content
This repository has been archived by the owner on Dec 12, 2024. It is now read-only.

fix: temporarily add PaymentInstruction back to QuoteDetails #55

Merged
merged 1 commit into from
Jul 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions lib/src/protocol/models/message_data.dart
Original file line number Diff line number Diff line change
Expand Up @@ -209,12 +209,14 @@ class QuoteDetails {
final String subtotal;
final String total;
final String? fee;
final PaymentInstruction? paymentInstruction;

QuoteDetails({
required this.currencyCode,
required this.subtotal,
required this.total,
this.fee,
this.paymentInstruction,
});

factory QuoteDetails.fromJson(Map<String, dynamic> json) {
Expand All @@ -223,6 +225,9 @@ class QuoteDetails {
subtotal: json['subtotal'],
total: json['total'],
fee: json['fee'],
paymentInstruction: json['paymentInstruction'] != null
? PaymentInstruction.fromJson(json['paymentInstruction'])
: null,
);
}

Expand All @@ -232,6 +237,8 @@ class QuoteDetails {
'subtotal': subtotal,
'total': total,
if (fee != null) 'fee': fee,
if (paymentInstruction != null)
'paymentInstruction': paymentInstruction?.toJson(),
};
}
}
Expand Down
Loading