await wallet name check [skip ci]
OmarHatem committed
Dec 30, 2025 at 15:27 UTC
934b50da62ff57be76e0e98aa4c56b2b8c00c249
2 files changed
+4
-4
lib/core/wallet_creation_service.dart
+3
-3
@@ -97,7 +97,7 @@ class WalletCreationService {
97
}
98
99
Future<WalletBase> restoreFromKeys(WalletCredentials credentials, {bool? isTestnet}) async {
100
- checkIfExists(credentials.name);
100
+ await checkIfExists(credentials.name);
101
102
if (credentials.password == null) {
103
credentials.password = generateWalletPassword();
@@ -116,7 +116,7 @@ class WalletCreationService {
116
}
117
118
Future<WalletBase> restoreFromSeed(WalletCredentials credentials, {bool? isTestnet}) async {
119
- checkIfExists(credentials.name);
119
+ await checkIfExists(credentials.name);
120
121
if (credentials.password == null) {
122
credentials.password = generateWalletPassword();
@@ -135,7 +135,7 @@ class WalletCreationService {
135
}
136
137
Future<WalletBase> restoreFromHardwareWallet(WalletCredentials credentials) async {
138
- checkIfExists(credentials.name);
138
+ await checkIfExists(credentials.name);
139
final password = generateWalletPassword();
140
credentials.password = password;
141
await keyService.saveWalletPassword(password: password, walletName: credentials.name);
lib/view_model/wallet_creation_vm.dart
+1
-1
@@ -95,7 +95,7 @@ abstract class WalletCreationVMBase with Store {
95
throw Exception(S.current.repeated_password_is_incorrect);
96
}
97
98
- walletCreationService.checkIfExists(name);
98
+ await walletCreationService.checkIfExists(name);
99
final dirPath = await pathForWalletDir(name: name, type: type);
100
final path = await pathForWallet(name: name, type: type);
101