mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-06-28 12:29:51 +00:00
CW 781 replace all print statements with printV (#1733)
* replace all print statements with printV * restore backup error message * missing print statements, error fixes * Update cw_core/lib/utils/print_verbose.dart [skip ci] * Update cw_core/lib/utils/print_verbose.dart [skip ci] * CW-846: Correctly display balance (#1848) * Correctly display balance even with frozen coins * remove package= from AndroidMainfest.xml * update namespace * print -> printV --------- Co-authored-by: Omar Hatem <omarh.ismail1@gmail.com>
This commit is contained in:
parent
c74194abf4
commit
c78662fbfe
124 changed files with 578 additions and 343 deletions
|
@ -4,6 +4,7 @@ import 'dart:math';
|
|||
|
||||
import 'package:cw_core/crypto_currency.dart';
|
||||
import 'package:cw_core/node.dart';
|
||||
import 'package:cw_core/utils/print_verbose.dart';
|
||||
import 'package:cw_solana/pending_solana_transaction.dart';
|
||||
import 'package:cw_solana/solana_balance.dart';
|
||||
import 'package:cw_solana/solana_transaction_model.dart';
|
||||
|
@ -529,7 +530,7 @@ class SolanaWalletClient {
|
|||
|
||||
return signature;
|
||||
} catch (e) {
|
||||
print('Error while sending transaction: ${e.toString()}');
|
||||
printV('Error while sending transaction: ${e.toString()}');
|
||||
throw Exception(e);
|
||||
}
|
||||
}
|
||||
|
@ -546,7 +547,7 @@ class SolanaWalletClient {
|
|||
return null;
|
||||
}
|
||||
} catch (e) {
|
||||
print('Error occurred while fetching token image: \n${e.toString()}');
|
||||
printV('Error occurred while fetching token image: \n${e.toString()}');
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,6 +2,7 @@ import 'dart:convert';
|
|||
import 'dart:core';
|
||||
import 'package:cw_core/encryption_file_utils.dart';
|
||||
import 'package:cw_core/pathForWallet.dart';
|
||||
import 'package:cw_core/utils/print_verbose.dart';
|
||||
import 'package:cw_core/wallet_info.dart';
|
||||
import 'package:cw_solana/solana_transaction_info.dart';
|
||||
import 'package:mobx/mobx.dart';
|
||||
|
@ -36,8 +37,8 @@ abstract class SolanaTransactionHistoryBase extends TransactionHistoryBase<Solan
|
|||
final data = json.encode({'transactions': transactionMaps});
|
||||
await encryptionFileUtils.write(path: path, password: _password, data: data);
|
||||
} catch (e, s) {
|
||||
print('Error while saving solana transaction history: ${e.toString()}');
|
||||
print(s);
|
||||
printV('Error while saving solana transaction history: ${e.toString()}');
|
||||
printV(s);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -72,7 +73,7 @@ abstract class SolanaTransactionHistoryBase extends TransactionHistoryBase<Solan
|
|||
}
|
||||
});
|
||||
} catch (e) {
|
||||
print(e);
|
||||
printV(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -11,6 +11,7 @@ import 'package:cw_core/pending_transaction.dart';
|
|||
import 'package:cw_core/sync_status.dart';
|
||||
import 'package:cw_core/transaction_direction.dart';
|
||||
import 'package:cw_core/transaction_priority.dart';
|
||||
import 'package:cw_core/utils/print_verbose.dart';
|
||||
import 'package:cw_core/wallet_addresses.dart';
|
||||
import 'package:cw_core/wallet_base.dart';
|
||||
import 'package:cw_core/wallet_info.dart';
|
||||
|
@ -454,7 +455,7 @@ abstract class SolanaWalletBase
|
|||
SolanaBalance(0.0);
|
||||
balance[token] = tokenBalance;
|
||||
} catch (e) {
|
||||
print('Error fetching spl token (${token.symbol}) balance ${e.toString()}');
|
||||
printV('Error fetching spl token (${token.symbol}) balance ${e.toString()}');
|
||||
}
|
||||
} else {
|
||||
balance.remove(token);
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import 'package:cw_core/utils/print_verbose.dart';
|
||||
import 'package:cw_core/wallet_addresses.dart';
|
||||
import 'package:cw_core/wallet_info.dart';
|
||||
import 'package:mobx/mobx.dart';
|
||||
|
@ -30,7 +31,7 @@ abstract class SolanaWalletAddressesBase extends WalletAddresses with Store {
|
|||
addressesMap[address] = '';
|
||||
await saveAddressesInBox();
|
||||
} catch (e) {
|
||||
print(e.toString());
|
||||
printV(e.toString());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue