feat(dev): add secrets dev screen (used to recover corrupted wallet) (#2234)

* feat(dev): add secrets dev screen (used to recover corrupted wallet)

* fix(dev): decode only password fields
This commit is contained in:
cyan 2025-04-30 08:29:08 +02:00 committed by GitHub
parent e527083871
commit da8a82a10f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 173 additions and 0 deletions

View file

@ -251,6 +251,22 @@ class $BackupService {
await importWalletKeychainInfo(info);
});
for (var key in (keychainJSON['_all'] as Map<String, dynamic>).keys) {
try {
if (!key.startsWith('MONERO_WALLET_')) continue;
final decodedPassword = decodeWalletPassword(password: keychainJSON['_all'][key].toString());
final walletName = key.split('_WALLET_')[1];
final walletType = key.split('_WALLET_')[0].toLowerCase();
await importWalletKeychainInfo({
'name': walletName,
'type': "WalletType.$walletType",
'password': decodedPassword,
});
} catch (e) {
printV('Error importing wallet ($key) password: $e');
}
}
keychainDumpFile.deleteSync();
}