-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c3912c0
commit 8859315
Showing
1 changed file
with
9 additions
and
15 deletions.
There are no files selected for viewing
24 changes: 9 additions & 15 deletions
24
lib/routes/home/widgets/payments_list/dialog/payment_details_dialog_destination_pubkey.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,21 @@ | ||
import 'package:breez_translations/breez_translations_locales.dart'; | ||
import 'package:flutter/material.dart'; | ||
import 'package:flutter/widgets.dart'; | ||
import 'package:l_breez/models/payment_minutiae.dart'; | ||
import 'package:l_breez/routes/home/widgets/payments_list/dialog/shareable_payment_row.dart'; | ||
|
||
class PaymentDetailsDestinationPubkey extends StatelessWidget { | ||
final PaymentMinutiae paymentMinutiae; | ||
|
||
const PaymentDetailsDestinationPubkey({ | ||
super.key, | ||
required this.paymentMinutiae, | ||
}); | ||
const PaymentDetailsDestinationPubkey({required this.paymentMinutiae, super.key}); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
final texts = context.texts(); | ||
final destinationPubkey = paymentMinutiae.swapId; | ||
if (destinationPubkey.isNotEmpty) { | ||
return ShareablePaymentRow( | ||
title: texts.payment_details_dialog_single_info_node_id, | ||
sharedValue: destinationPubkey, | ||
); | ||
} else { | ||
return Container(); | ||
} | ||
return destinationPubkey.isNotEmpty | ||
? ShareablePaymentRow( | ||
// TODO: Move this message to Breez-Translations | ||
title: "Swap ID", | ||
sharedValue: destinationPubkey, | ||
) | ||
: const SizedBox.shrink(); | ||
} | ||
} |