Skip to content
Merged
Binary file added mobile-app/assets/v2/auth_wrapper_bracket.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@ class _AccountCopyActionSheetState extends State<AccountCopyActionSheet> {
}

void _copyAddress() {
ClipboardExtensions.copyTextWithSnackbar(context, widget.activeAccount.accountId);
context.copyTextWithToaster(widget.activeAccount.accountId);
Navigator.pop(context);
}

void _copyChecksum() {
if (_checksum != null) {
ClipboardExtensions.copyTextWithSnackbar(context, _checksum!, message: 'Checkphrase copied to clipboard');
context.copyTextWithToaster(_checksum!, message: 'Checkphrase copied to clipboard');
Navigator.pop(context);
}
}
Expand Down
9 changes: 4 additions & 5 deletions mobile-app/lib/features/components/emergency_button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import 'package:quantus_sdk/quantus_sdk.dart';
import 'package:resonance_network_wallet/features/components/pull_funds_confirmation_sheet.dart';
import 'package:resonance_network_wallet/providers/account_providers.dart';
import 'package:resonance_network_wallet/providers/wallet_providers.dart';
import 'package:resonance_network_wallet/shared/extensions/snackbar_extensions.dart';
import 'package:resonance_network_wallet/shared/extensions/toaster_extensions.dart';

class EmergencyButton extends ConsumerWidget {
const EmergencyButton({super.key});
Expand Down Expand Up @@ -33,15 +33,14 @@ class EmergencyButton extends ConsumerWidget {
await highSecurityService.pullAllFunds(activeDisplayAccount.account.accountId, guardianAccount);

if (context.mounted) {
context.showSuccessSnackbar(
title: 'Success',
context.showSuccessToaster(
message: 'Emergency funds pull initiated successfully',
);
}
} catch (e) {
print('Error: Failed to pull funds: $e');
if (context.mounted) {
context.showErrorSnackbar(title: 'Error', message: 'Failed to pull funds: $e');
context.showErrorToaster(message: 'Failed to pull funds: $e');
}
}
},
Expand All @@ -50,7 +49,7 @@ class EmergencyButton extends ConsumerWidget {
} else {
print('Error: Guardian account not found on this device');
if (context.mounted) {
context.showErrorSnackbar(title: 'Error', message: 'Guardian account not found on this device');
context.showErrorToaster(message: 'Guardian account not found on this device');
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import 'package:resonance_network_wallet/features/styles/app_colors_theme.dart';
import 'package:resonance_network_wallet/features/styles/app_size_theme.dart';
import 'package:resonance_network_wallet/features/styles/app_text_theme.dart';
import 'package:resonance_network_wallet/shared/extensions/media_query_data_extension.dart';
import 'package:resonance_network_wallet/shared/extensions/snackbar_extensions.dart';
import 'package:resonance_network_wallet/shared/extensions/toaster_extensions.dart';

class RemoveAssociationConfirmationSheet extends StatefulWidget {
final Future<void> Function() onRemove;
Expand All @@ -28,15 +28,15 @@ class _RemoveAssociationConfirmationSheetState extends State<RemoveAssociationCo
await widget.onRemove();

if (mounted) {
context.showSuccessSnackbar(title: 'Association Removed', message: 'Your association is successfully removed');
context.showSuccessToaster(message: 'Your association is successfully removed');
}

_closeSheet();
} catch (e) {
print('Failed removing association: $e');
// ignore: use_build_context_synchronously
if (mounted) {
context.showErrorSnackbar(title: 'Failed removing', message: e.toString());
context.showErrorToaster(message: 'Failed removing: $e');
}
} finally {
setState(() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import 'package:resonance_network_wallet/providers/filtered_all_transactions_pro
import 'package:resonance_network_wallet/providers/pending_cancellations_provider.dart';
import 'package:resonance_network_wallet/services/reversible_transfer_monitoring_service.dart';
import 'package:resonance_network_wallet/shared/extensions/media_query_data_extension.dart';
import 'package:resonance_network_wallet/shared/extensions/snackbar_extensions.dart';
import 'package:resonance_network_wallet/shared/extensions/toaster_extensions.dart';
import 'package:url_launcher/url_launcher.dart';

enum ReversibleTransactionMode { reversible, guardianIntercept }
Expand Down Expand Up @@ -571,7 +571,7 @@ class _ReversibleTransactionActionSheetState extends ConsumerState<ReversibleTra
debugPrint('Failed to cancel transaction: $e');
debugPrint('Stack trace: $stackTrace');
// ignore: use_build_context_synchronously
if (mounted) context.showErrorSnackbar(title: 'Failed to cancel', message: e.toString());
if (mounted) context.showErrorToaster(message: 'Failed to cancel: $e');
} finally {
setState(() {
_isCancelling = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ class _SharedAddressActionSheetState extends State<SharedAddressActionSheet> {
}

void _copyAddress() {
ClipboardExtensions.copyTextWithSnackbar(context, widget.address);
context.copyTextWithToaster(widget.address);
}

void _copyChecksum() {
if (_checksum != null) {
ClipboardExtensions.copyTextWithSnackbar(context, _checksum!, message: 'Checkphrase copied to clipboard');
context.copyTextWithToaster(_checksum!, message: 'Checkphrase copied to clipboard');
}
}

Expand Down
88 changes: 0 additions & 88 deletions mobile-app/lib/features/components/snackbar_helper.dart

This file was deleted.

69 changes: 0 additions & 69 deletions mobile-app/lib/features/components/top_snackbar_content.dart

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import 'package:resonance_network_wallet/providers/account_providers.dart';
import 'package:resonance_network_wallet/services/transaction_submission_service.dart';
import 'package:resonance_network_wallet/shared/extensions/clipboard_extensions.dart';
import 'package:resonance_network_wallet/shared/extensions/media_query_data_extension.dart';
import 'package:resonance_network_wallet/shared/extensions/snackbar_extensions.dart';
import 'package:resonance_network_wallet/shared/extensions/toaster_extensions.dart';
import 'package:resonance_network_wallet/shared/extensions/transaction_event_extension.dart';
import 'package:url_launcher/url_launcher.dart';

Expand Down Expand Up @@ -145,7 +145,7 @@ class _TransactionDetailsActionSheetState extends ConsumerState<TransactionDetai
} catch (e) {
print('Retrying failed: $e');
// ignore: use_build_context_synchronously
context.showErrorSnackbar(title: 'Retrying Failed', message: e.toString());
context.showErrorToaster(message: 'Retrying Failed: $e');
}
}

Expand Down Expand Up @@ -250,7 +250,7 @@ class _TransactionDetailsActionSheetState extends ConsumerState<TransactionDetai
gapLength: 3,
borderRadius: const Radius.circular(4),
child: InkWell(
onTap: () => ClipboardExtensions.copyTextWithSnackbar(context, accountId),
onTap: () => context.copyTextWithToaster(accountId),
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Row(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ import 'package:resonance_network_wallet/features/styles/app_colors_theme.dart';
import 'package:resonance_network_wallet/features/styles/app_text_theme.dart';
import 'package:resonance_network_wallet/shared/extensions/clipboard_extensions.dart';
import 'package:resonance_network_wallet/shared/extensions/media_query_data_extension.dart';
import 'package:resonance_network_wallet/shared/extensions/snackbar_extensions.dart';
import 'package:resonance_network_wallet/shared/extensions/svg_extensions.dart';
import 'package:resonance_network_wallet/shared/extensions/toaster_extensions.dart';
import 'package:resonance_network_wallet/utils/feature_flags.dart';

class AccountSettingsScreen extends ConsumerStatefulWidget {
Expand Down Expand Up @@ -151,7 +151,7 @@ class _AccountSettingsScreenState extends ConsumerState<AccountSettingsScreen> {
} catch (e) {
print('Failed to disconnect: $e');
if (mounted) {
context.showErrorSnackbar(title: 'Error', message: 'Failed to disconnect wallet: $e');
context.showErrorToaster(message: 'Failed to disconnect wallet: $e');
}
}
}
Expand Down Expand Up @@ -278,7 +278,7 @@ class _AccountSettingsScreenState extends ConsumerState<AccountSettingsScreen> {
child: Padding(
padding: const EdgeInsets.only(top: 10.0, left: 10.0, bottom: 10.0, right: 18.0),
child: InkWell(
onTap: () => ClipboardExtensions.copyTextWithSnackbar(context, widget.account.accountId),
onTap: () => context.copyTextWithToaster(widget.account.accountId),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Expand All @@ -293,7 +293,7 @@ class _AccountSettingsScreenState extends ConsumerState<AccountSettingsScreen> {
),
InkWell(
child: const CopyIcon(),
onTap: () => ClipboardExtensions.copyTextWithSnackbar(context, widget.account.accountId),
onTap: () => context.copyTextWithToaster(widget.account.accountId),
),
],
),
Expand Down
4 changes: 2 additions & 2 deletions mobile-app/lib/features/main/screens/app.dart
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:resonance_network_wallet/features/main/screens/authentication_wrapper.dart';
import 'package:resonance_network_wallet/features/main/screens/wallet_initializer.dart';
import 'package:resonance_network_wallet/utils/feature_flags.dart';
import 'package:resonance_network_wallet/v2/screens/auth/auth_wrapper.dart';
import 'package:resonance_network_wallet/v2/theme/app_theme.dart';
import 'package:resonance_network_wallet/services/firebase_messaging_service.dart';
import 'package:resonance_network_wallet/services/local_notifications_service.dart';
Expand Down Expand Up @@ -66,7 +66,7 @@ class _ResonanceWalletAppState extends ConsumerState<ResonanceWalletApp> {
darkTheme: AppTheme.darkTheme(context),
themeMode: ThemeMode.dark,
builder: (context, child) {
return Stack(children: [child!, const AuthenticationWrapper()]);
return Stack(children: [child!, const AuthWrapper()]);
},
);
}
Expand Down
Loading