2024-06-25 20:46:36 +00:00
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
|
|
|
import '../../utilities/util.dart';
|
|
|
|
import '../stack_dialog.dart';
|
|
|
|
|
|
|
|
class FiroExchangeAddressDialog extends StatelessWidget {
|
|
|
|
const FiroExchangeAddressDialog({super.key});
|
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
return StackOkDialog(
|
|
|
|
title: "Firo exchange address detected",
|
|
|
|
message: "Sending to an exchange address from a Spark balance is not"
|
|
|
|
" allowed. Please send from your transparent balance.",
|
|
|
|
desktopPopRootNavigator: Util.isDesktop,
|
|
|
|
maxWidth: Util.isDesktop ? 500 : null,
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-06-25 21:20:55 +00:00
|
|
|
Future<void> showFiroExchangeAddressWarning(
|
|
|
|
BuildContext context,
|
|
|
|
VoidCallback onClosed,
|
|
|
|
) async {
|
|
|
|
await showDialog<void>(
|
2024-06-25 20:46:36 +00:00
|
|
|
context: context,
|
|
|
|
builder: (_) => const FiroExchangeAddressDialog(),
|
|
|
|
);
|
2024-06-25 21:20:55 +00:00
|
|
|
onClosed();
|
2024-06-25 20:46:36 +00:00
|
|
|
}
|