Skip to content

Commit

Permalink
Add more logs
Browse files Browse the repository at this point in the history
  • Loading branch information
Gerardo Guijarro committed Sep 6, 2023
1 parent 6f1e159 commit 2b80ccc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -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';
Expand All @@ -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;
}
}
Expand Down
11 changes: 5 additions & 6 deletions lib/ui/sign_transaction/usecases/sign_transaction_use_case.dart
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ class SignTransactionUseCase extends InputUseCase<HResult.Result<String, HyphaEr
eosTransaction: input.eOSTransaction,
user: userData.userProfileData,
);
} catch (error) {
LogHelper.e('Error signing transaction: $error');
} catch (error, stackTrace) {
LogHelper.e('Error signing transaction: $error', error: error, stacktrace: stackTrace);
return HResult.Result.error(HyphaError.fromError(error));
}
if (result.isValue) {
Expand All @@ -39,11 +39,10 @@ class SignTransactionUseCase extends InputUseCase<HResult.Result<String, HyphaEr
final callbackResponse =
await input.callback?.let((it) async => 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 {
Expand Down

0 comments on commit 2b80ccc

Please sign in to comment.