Generic fixes (#1583)

* add litecoin nodes minor ui fix * update build macos to build universal archs [skip ci] * minor fix [skip ci] * update share package * change trocador onion url

Omar Hatem committed Aug 9, 2024 at 22:18 UTC 8e4082d6806a89a256f827952036952a9ed21b47
8 files changed +28 -20
lib/anonpay/anonpay_api.dart
+1 -1
@@ -20,7 +20,7 @@ class AnonPayApi {
20 final WalletBase wallet;
21
22 static const anonpayRef = secrets.anonPayReferralCode;
23 - static const onionApiAuthority = 'trocadorfyhlu27aefre5u7zri66gudtzdyelymftvr4yjwcxhfaqsid.onion';
23 + static const onionApiAuthority = 'tqzngtf2hybjbexznel6dhgsvbynjzezoybvtv6iofomx7gchqfssgqd.onion';
24 static const clearNetAuthority = 'trocador.app';
25 static const markup = secrets.trocadorExchangeMarkup;
26 static const anonPayPath = '/anonpay';
lib/src/screens/new_wallet/new_wallet_page.dart
+16 -14
@@ -40,11 +40,11 @@ class NewWalletPage extends BasePage {
40
41 @override
42 Function(BuildContext)? get pushToNextWidget => (context) {
43 - FocusScopeNode currentFocus = FocusScope.of(context);
44 - if (!currentFocus.hasPrimaryFocus) {
45 - currentFocus.focusedChild?.unfocus();
46 - }
47 - };
43 + FocusScopeNode currentFocus = FocusScope.of(context);
44 + if (!currentFocus.hasPrimaryFocus) {
45 + currentFocus.focusedChild?.unfocus();
46 + }
47 + };
48
49 @override
50 Widget body(BuildContext context) => WalletNameForm(
@@ -88,15 +88,17 @@ class _WalletNameFormState extends State<WalletNameForm> {
88
89 if (state is FailureState) {
90 WidgetsBinding.instance.addPostFrameCallback((_) {
91 - showPopUp<void>(
92 - context: context,
93 - builder: (_) {
94 - return AlertWithOneAction(
95 - alertTitle: S.current.new_wallet,
96 - alertContent: state.error,
97 - buttonText: S.of(context).ok,
98 - buttonAction: () => Navigator.of(context).pop());
99 - });
91 + if (context.mounted) {
92 + showPopUp<void>(
93 + context: context,
94 + builder: (_) {
95 + return AlertWithOneAction(
96 + alertTitle: S.current.new_wallet,
97 + alertContent: state.error,
98 + buttonText: S.of(context).ok,
99 + buttonAction: () => Navigator.of(context).pop());
100 + });
101 + }
102 });
103 }
104 });
lib/src/screens/subaddress/address_edit_or_create_page.dart
+4 -2
@@ -58,7 +58,7 @@ class AddressEditOrCreatePage extends BasePage {
58 isLoading:
59 addressEditOrCreateViewModel.state is AddressIsSaving,
60 isDisabled:
61 - addressEditOrCreateViewModel.label?.isEmpty ?? true,
61 + addressEditOrCreateViewModel.label.isEmpty,
62 ),
63 )
64 ],
@@ -74,7 +74,9 @@ class AddressEditOrCreatePage extends BasePage {
74 (AddressEditOrCreateState state) {
75 if (state is AddressSavedSuccessfully) {
76 WidgetsBinding.instance
77 - .addPostFrameCallback((_) => Navigator.of(context).pop());
77 + .addPostFrameCallback((_) {
78 + if (context.mounted) Navigator.of(context).pop();
79 + });
80 }
81 });
82
macos/Flutter/GeneratedPluginRegistrant.swift
+1 -1
@@ -15,7 +15,7 @@ import in_app_review
15 import package_info
16 import package_info_plus
17 import path_provider_foundation
18 -import share_plus_macos
18 +import share_plus
19 import shared_preferences_foundation
20 import url_launcher_macos
21 import wakelock_plus
pubspec_base.yaml
+1 -1
@@ -21,7 +21,7 @@ dependencies:
21 mobx: ^2.1.4
22 flutter_mobx: ^2.0.6+5
23 flutter_slidable: ^3.0.1
24 - share_plus: ^4.0.10
24 + share_plus: ^10.0.0
25 # date_range_picker: ^1.0.6
26 #https://api.flutter.dev/flutter/material/showDateRangePicker.html
27 dio: ^4.0.6
scripts/macos/build_all.sh
+1 -1
@@ -1,3 +1,3 @@
1 #!/bin/sh
2
3 -./build_monero_all.sh
\ No newline at end of file
3 +./build_monero_all.sh universal
\ No newline at end of file
windows/flutter/generated_plugin_registrant.cc
+3
@@ -10,6 +10,7 @@
10 #include <flutter_local_authentication/flutter_local_authentication_plugin_c_api.h>
11 #include <flutter_secure_storage_windows/flutter_secure_storage_windows_plugin.h>
12 #include <permission_handler_windows/permission_handler_windows_plugin.h>
13 +#include <share_plus/share_plus_windows_plugin_c_api.h>
14 #include <url_launcher_windows/url_launcher_windows.h>
15
16 void RegisterPlugins(flutter::PluginRegistry* registry) {
@@ -21,6 +22,8 @@ void RegisterPlugins(flutter::PluginRegistry* registry) {
22 registry->GetRegistrarForPlugin("FlutterSecureStorageWindowsPlugin"));
23 PermissionHandlerWindowsPluginRegisterWithRegistrar(
24 registry->GetRegistrarForPlugin("PermissionHandlerWindowsPlugin"));
25 + SharePlusWindowsPluginCApiRegisterWithRegistrar(
26 + registry->GetRegistrarForPlugin("SharePlusWindowsPluginCApi"));
27 UrlLauncherWindowsRegisterWithRegistrar(
28 registry->GetRegistrarForPlugin("UrlLauncherWindows"));
29 }
windows/flutter/generated_plugins.cmake
+1
@@ -7,6 +7,7 @@ list(APPEND FLUTTER_PLUGIN_LIST
7 flutter_local_authentication
8 flutter_secure_storage_windows
9 permission_handler_windows
10 + share_plus
11 url_launcher_windows
12 )
13