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
This commit is contained in:
Omar Hatem 2024-08-09 22:18:32 +03:00 committed by GitHub
parent 8e7233b5c3
commit 8e4082d680
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 28 additions and 20 deletions

View file

@ -20,7 +20,7 @@ class AnonPayApi {
final WalletBase wallet; final WalletBase wallet;
static const anonpayRef = secrets.anonPayReferralCode; static const anonpayRef = secrets.anonPayReferralCode;
static const onionApiAuthority = 'trocadorfyhlu27aefre5u7zri66gudtzdyelymftvr4yjwcxhfaqsid.onion'; static const onionApiAuthority = 'tqzngtf2hybjbexznel6dhgsvbynjzezoybvtv6iofomx7gchqfssgqd.onion';
static const clearNetAuthority = 'trocador.app'; static const clearNetAuthority = 'trocador.app';
static const markup = secrets.trocadorExchangeMarkup; static const markup = secrets.trocadorExchangeMarkup;
static const anonPayPath = '/anonpay'; static const anonPayPath = '/anonpay';

View file

@ -40,11 +40,11 @@ class NewWalletPage extends BasePage {
@override @override
Function(BuildContext)? get pushToNextWidget => (context) { Function(BuildContext)? get pushToNextWidget => (context) {
FocusScopeNode currentFocus = FocusScope.of(context); FocusScopeNode currentFocus = FocusScope.of(context);
if (!currentFocus.hasPrimaryFocus) { if (!currentFocus.hasPrimaryFocus) {
currentFocus.focusedChild?.unfocus(); currentFocus.focusedChild?.unfocus();
} }
}; };
@override @override
Widget body(BuildContext context) => WalletNameForm( Widget body(BuildContext context) => WalletNameForm(
@ -88,15 +88,17 @@ class _WalletNameFormState extends State<WalletNameForm> {
if (state is FailureState) { if (state is FailureState) {
WidgetsBinding.instance.addPostFrameCallback((_) { WidgetsBinding.instance.addPostFrameCallback((_) {
showPopUp<void>( if (context.mounted) {
context: context, showPopUp<void>(
builder: (_) { context: context,
return AlertWithOneAction( builder: (_) {
alertTitle: S.current.new_wallet, return AlertWithOneAction(
alertContent: state.error, alertTitle: S.current.new_wallet,
buttonText: S.of(context).ok, alertContent: state.error,
buttonAction: () => Navigator.of(context).pop()); buttonText: S.of(context).ok,
}); buttonAction: () => Navigator.of(context).pop());
});
}
}); });
} }
}); });

View file

@ -58,7 +58,7 @@ class AddressEditOrCreatePage extends BasePage {
isLoading: isLoading:
addressEditOrCreateViewModel.state is AddressIsSaving, addressEditOrCreateViewModel.state is AddressIsSaving,
isDisabled: isDisabled:
addressEditOrCreateViewModel.label?.isEmpty ?? true, addressEditOrCreateViewModel.label.isEmpty,
), ),
) )
], ],
@ -74,7 +74,9 @@ class AddressEditOrCreatePage extends BasePage {
(AddressEditOrCreateState state) { (AddressEditOrCreateState state) {
if (state is AddressSavedSuccessfully) { if (state is AddressSavedSuccessfully) {
WidgetsBinding.instance WidgetsBinding.instance
.addPostFrameCallback((_) => Navigator.of(context).pop()); .addPostFrameCallback((_) {
if (context.mounted) Navigator.of(context).pop();
});
} }
}); });

View file

@ -15,7 +15,7 @@ import in_app_review
import package_info import package_info
import package_info_plus import package_info_plus
import path_provider_foundation import path_provider_foundation
import share_plus_macos import share_plus
import shared_preferences_foundation import shared_preferences_foundation
import url_launcher_macos import url_launcher_macos
import wakelock_plus import wakelock_plus

View file

@ -21,7 +21,7 @@ dependencies:
mobx: ^2.1.4 mobx: ^2.1.4
flutter_mobx: ^2.0.6+5 flutter_mobx: ^2.0.6+5
flutter_slidable: ^3.0.1 flutter_slidable: ^3.0.1
share_plus: ^4.0.10 share_plus: ^10.0.0
# date_range_picker: ^1.0.6 # date_range_picker: ^1.0.6
#https://api.flutter.dev/flutter/material/showDateRangePicker.html #https://api.flutter.dev/flutter/material/showDateRangePicker.html
dio: ^4.0.6 dio: ^4.0.6

View file

@ -1,3 +1,3 @@
#!/bin/sh #!/bin/sh
./build_monero_all.sh ./build_monero_all.sh universal

View file

@ -10,6 +10,7 @@
#include <flutter_local_authentication/flutter_local_authentication_plugin_c_api.h> #include <flutter_local_authentication/flutter_local_authentication_plugin_c_api.h>
#include <flutter_secure_storage_windows/flutter_secure_storage_windows_plugin.h> #include <flutter_secure_storage_windows/flutter_secure_storage_windows_plugin.h>
#include <permission_handler_windows/permission_handler_windows_plugin.h> #include <permission_handler_windows/permission_handler_windows_plugin.h>
#include <share_plus/share_plus_windows_plugin_c_api.h>
#include <url_launcher_windows/url_launcher_windows.h> #include <url_launcher_windows/url_launcher_windows.h>
void RegisterPlugins(flutter::PluginRegistry* registry) { void RegisterPlugins(flutter::PluginRegistry* registry) {
@ -21,6 +22,8 @@ void RegisterPlugins(flutter::PluginRegistry* registry) {
registry->GetRegistrarForPlugin("FlutterSecureStorageWindowsPlugin")); registry->GetRegistrarForPlugin("FlutterSecureStorageWindowsPlugin"));
PermissionHandlerWindowsPluginRegisterWithRegistrar( PermissionHandlerWindowsPluginRegisterWithRegistrar(
registry->GetRegistrarForPlugin("PermissionHandlerWindowsPlugin")); registry->GetRegistrarForPlugin("PermissionHandlerWindowsPlugin"));
SharePlusWindowsPluginCApiRegisterWithRegistrar(
registry->GetRegistrarForPlugin("SharePlusWindowsPluginCApi"));
UrlLauncherWindowsRegisterWithRegistrar( UrlLauncherWindowsRegisterWithRegistrar(
registry->GetRegistrarForPlugin("UrlLauncherWindows")); registry->GetRegistrarForPlugin("UrlLauncherWindows"));
} }

View file

@ -7,6 +7,7 @@ list(APPEND FLUTTER_PLUGIN_LIST
flutter_local_authentication flutter_local_authentication
flutter_secure_storage_windows flutter_secure_storage_windows
permission_handler_windows permission_handler_windows
share_plus
url_launcher_windows url_launcher_windows
) )