mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-11-17 09:47:37 +00:00
extra wallet management logging
This commit is contained in:
parent
2d5b73c45e
commit
617471d038
1 changed files with 21 additions and 0 deletions
|
@ -294,6 +294,10 @@ class WalletsService extends ChangeNotifier {
|
|||
key: "${walletId}_mnemonicHasBeenVerified") as bool?;
|
||||
|
||||
if (isVerified == null) {
|
||||
Logging.instance.log(
|
||||
"isMnemonicVerified(walletId: $walletId) returned null which should never happen!",
|
||||
level: LogLevel.Error,
|
||||
);
|
||||
throw Exception(
|
||||
"isMnemonicVerified(walletId: $walletId) returned null which should never happen!");
|
||||
} else {
|
||||
|
@ -307,9 +311,17 @@ class WalletsService extends ChangeNotifier {
|
|||
key: "${walletId}_mnemonicHasBeenVerified") as bool?;
|
||||
|
||||
if (isVerified == null) {
|
||||
Logging.instance.log(
|
||||
"setMnemonicVerified(walletId: $walletId) tried running on non existent wallet!",
|
||||
level: LogLevel.Error,
|
||||
);
|
||||
throw Exception(
|
||||
"setMnemonicVerified(walletId: $walletId) tried running on non existent wallet!");
|
||||
} else if (isVerified) {
|
||||
Logging.instance.log(
|
||||
"setMnemonicVerified(walletId: $walletId) tried running on already verified wallet!",
|
||||
level: LogLevel.Error,
|
||||
);
|
||||
throw Exception(
|
||||
"setMnemonicVerified(walletId: $walletId) tried running on already verified wallet!");
|
||||
} else {
|
||||
|
@ -317,6 +329,10 @@ class WalletsService extends ChangeNotifier {
|
|||
boxName: DB.boxNameAllWalletsData,
|
||||
key: "${walletId}_mnemonicHasBeenVerified",
|
||||
value: true);
|
||||
Logging.instance.log(
|
||||
"setMnemonicVerified(walletId: $walletId) successful",
|
||||
level: LogLevel.Error,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -331,6 +347,11 @@ class WalletsService extends ChangeNotifier {
|
|||
return 3;
|
||||
}
|
||||
|
||||
Logging.instance.log(
|
||||
"deleteWallet called with name=$name and id=$walletId",
|
||||
level: LogLevel.Warning,
|
||||
);
|
||||
|
||||
final shell = names.remove(walletId);
|
||||
|
||||
if (shell == null) {
|
||||
|
|
Loading…
Reference in a new issue