From 4d1fde7671a975a9c322117104d084f28b88740e Mon Sep 17 00:00:00 2001 From: julian Date: Mon, 29 Jul 2024 16:04:23 -0600 Subject: [PATCH] prepare send failure logging --- .../exchange_step_views/step_4_view.dart | 4 +++- lib/pages/send_view/send_view.dart | 3 ++- lib/pages/send_view/token_send_view.dart | 12 +++++++----- .../wallet_view/sub_widgets/desktop_send.dart | 2 +- 4 files changed, 13 insertions(+), 8 deletions(-) diff --git a/lib/pages/exchange_view/exchange_step_views/step_4_view.dart b/lib/pages/exchange_view/exchange_step_views/step_4_view.dart index 79655f8a6..69bd4ea01 100644 --- a/lib/pages/exchange_view/exchange_step_views/step_4_view.dart +++ b/lib/pages/exchange_view/exchange_step_views/step_4_view.dart @@ -28,6 +28,7 @@ import '../../../utilities/assets.dart'; import '../../../utilities/clipboard_interface.dart'; import '../../../utilities/constants.dart'; import '../../../utilities/enums/fee_rate_type_enum.dart'; +import '../../../utilities/logger.dart'; import '../../../utilities/text_styles.dart'; import '../../../wallets/crypto_currency/crypto_currency.dart'; import '../../../wallets/isar/providers/wallet_info_provider.dart'; @@ -315,7 +316,8 @@ class _Step4ViewState extends ConsumerState { ); } } - } catch (e) { + } catch (e, s) { + Logging.instance.log("$e\n$s", level: LogLevel.Error); if (mounted && !wasCancelled) { // pop building dialog Navigator.of(context).pop(); diff --git a/lib/pages/send_view/send_view.dart b/lib/pages/send_view/send_view.dart index 0aab33a02..0eb6f8881 100644 --- a/lib/pages/send_view/send_view.dart +++ b/lib/pages/send_view/send_view.dart @@ -829,7 +829,8 @@ class _SendViewState extends ConsumerState { ), ); } - } catch (e) { + } catch (e, s) { + Logging.instance.log("$e\n$s", level: LogLevel.Error); if (mounted) { // pop building dialog Navigator.of(context).pop(); diff --git a/lib/pages/send_view/token_send_view.dart b/lib/pages/send_view/token_send_view.dart index 61ae1d1a9..d197a21fd 100644 --- a/lib/pages/send_view/token_send_view.dart +++ b/lib/pages/send_view/token_send_view.dart @@ -15,12 +15,9 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter_svg/flutter_svg.dart'; + import '../../models/isar/models/isar_models.dart'; import '../../models/send_view_auto_fill_data.dart'; -import '../address_book_views/address_book_view.dart'; -import 'confirm_transaction_view.dart'; -import 'sub_widgets/building_transaction_dialog.dart'; -import 'sub_widgets/transaction_fee_selection_sheet.dart'; import '../../providers/providers.dart'; import '../../providers/ui/fee_rate_type_state_provider.dart'; import '../../providers/ui/preview_tx_button_state_provider.dart'; @@ -55,6 +52,10 @@ import '../../widgets/icon_widgets/x_icon.dart'; import '../../widgets/stack_dialog.dart'; import '../../widgets/stack_text_field.dart'; import '../../widgets/textfield_icon_button.dart'; +import '../address_book_views/address_book_view.dart'; +import 'confirm_transaction_view.dart'; +import 'sub_widgets/building_transaction_dialog.dart'; +import 'sub_widgets/transaction_fee_selection_sheet.dart'; class TokenSendView extends ConsumerStatefulWidget { const TokenSendView({ @@ -529,7 +530,8 @@ class _TokenSendViewState extends ConsumerState { ), ); } - } catch (e) { + } catch (e, s) { + Logging.instance.log("$e\n$s", level: LogLevel.Error); if (mounted) { // pop building dialog Navigator.of(context).pop(); diff --git a/lib/pages_desktop_specific/my_stack_view/wallet_view/sub_widgets/desktop_send.dart b/lib/pages_desktop_specific/my_stack_view/wallet_view/sub_widgets/desktop_send.dart index e5cc93d92..bb1719b5e 100644 --- a/lib/pages_desktop_specific/my_stack_view/wallet_view/sub_widgets/desktop_send.dart +++ b/lib/pages_desktop_specific/my_stack_view/wallet_view/sub_widgets/desktop_send.dart @@ -481,7 +481,7 @@ class _DesktopSendState extends ConsumerState { ); } } catch (e, s) { - Logging.instance.log("Desktop send: $e\n$s", level: LogLevel.Warning); + Logging.instance.log("Desktop send: $e\n$s", level: LogLevel.Error); if (mounted) { // pop building dialog Navigator.of(