From 2b80ccc83742221f9005e29625c6e298241e9706 Mon Sep 17 00:00:00 2001 From: Gerardo Guijarro Date: Tue, 5 Sep 2023 20:18:23 -0600 Subject: [PATCH] Add more logs --- .../usecases/create_free_transaction_use_case.dart | 3 ++- .../usecases/sign_transaction_use_case.dart | 11 +++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/ui/sign_transaction/usecases/create_free_transaction_use_case.dart b/lib/ui/sign_transaction/usecases/create_free_transaction_use_case.dart index 8be4788c..f2563c67 100644 --- a/lib/ui/sign_transaction/usecases/create_free_transaction_use_case.dart +++ b/lib/ui/sign_transaction/usecases/create_free_transaction_use_case.dart @@ -1,4 +1,5 @@ import 'package:hypha_wallet/core/crypto/seeds_esr/eos_action.dart'; +import 'package:hypha_wallet/core/logging/log_helper.dart'; import 'package:hypha_wallet/core/network/api/services/pay_cpu_service.dart'; import 'package:hypha_wallet/core/network/models/network.dart'; import 'package:hypha_wallet/core/network/models/user_profile_data.dart'; @@ -13,7 +14,7 @@ class FreeTransactionUseCase { if (result.isValue) { return result.asValue!.value; } else { - print("Something went wrong, can't create free transaction: ${result.asError}"); + LogHelper.e("Something went wrong, can't create free transaction: ${result.asError}"); return null; } } diff --git a/lib/ui/sign_transaction/usecases/sign_transaction_use_case.dart b/lib/ui/sign_transaction/usecases/sign_transaction_use_case.dart index f2899a34..aa355111 100644 --- a/lib/ui/sign_transaction/usecases/sign_transaction_use_case.dart +++ b/lib/ui/sign_transaction/usecases/sign_transaction_use_case.dart @@ -29,8 +29,8 @@ class SignTransactionUseCase extends InputUseCase signTransactionCallbackService.callTheCallback(it, transactionID)); if (callbackResponse?.statusCode != 200) { - print('callback failed with status ${callbackResponse?.statusCode} - ignored'); + LogHelper.e('callback failed with status ${callbackResponse?.statusCode} - ignored'); } - } catch (error) { - print('callback error: $error'); - print(error); + } catch (error, stackTrace) { + LogHelper.e('callback error: $error', error: error, stacktrace: stackTrace); } return HResult.Result.value(result.asValue!.value as String); } else {