Generic fixes (#1282)

* New versions

* Fix unspent coins issue

* Fix white screen issues for some users
This commit is contained in:
Omar Hatem
2024-01-30 19:57:47 +02:00
committed by GitHub
parent 952503f0d8
commit b92ccb5c0b
11 changed files with 82 additions and 53 deletions
@@ -283,15 +283,17 @@ class ExchangeTradeState extends State<ExchangeTradeForm> {
if (state is TransactionCommitted) {
WidgetsBinding.instance.addPostFrameCallback((_) {
showPopUp<void>(
context: context,
builder: (BuildContext popupContext) {
return AlertWithOneAction(
alertTitle: S.of(popupContext).sending,
alertContent: S.of(popupContext).transaction_sent,
buttonText: S.of(popupContext).ok,
buttonAction: () => Navigator.of(popupContext).pop());
});
if (context.mounted) {
showPopUp<void>(
context: context,
builder: (BuildContext popupContext) {
return AlertWithOneAction(
alertTitle: S.of(popupContext).sending,
alertContent: S.of(popupContext).transaction_sent,
buttonText: S.of(popupContext).ok,
buttonAction: () => Navigator.of(popupContext).pop());
});
}
});
}
});
+5 -5
View File
@@ -53,16 +53,16 @@ class RootState extends State<Root> with WidgetsBindingObserver {
@override
void initState() {
WidgetsBinding.instance.addPostFrameCallback((_) async {
bool value = await widget.authService.requireAuth();
setState(() {
_requestAuth = value;
WidgetsBinding.instance.addObserver(this);
widget.authService.requireAuth().then((value) {
WidgetsBinding.instance.addPostFrameCallback((_) {
setState(() => _requestAuth = value);
});
});
_isInactiveController = StreamController<bool>.broadcast();
_isInactive = false;
_postFrameCallback = false;
WidgetsBinding.instance.addObserver(this);
super.initState();
if (DeviceInfo.instance.isMobile) {
initUniLinks();