mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-30 06:48:49 +01:00
add card for when monero wallet is in broken state (#1578)
This commit is contained in:
@@ -335,6 +335,23 @@ abstract class DashboardViewModelBase with Store {
|
||||
wallet.type == WalletType.wownero ||
|
||||
wallet.type == WalletType.haven;
|
||||
|
||||
@computed
|
||||
List<String> get isMoneroWalletBrokenReasons {
|
||||
if (wallet.type != WalletType.monero) return [];
|
||||
final keys = monero!.getKeys(wallet);
|
||||
List<String> errors = [
|
||||
if (keys['privateSpendKey'] == List.generate(64, (index) => "0").join("")) "Private spend key is 0",
|
||||
if (keys['privateViewKey'] == List.generate(64, (index) => "0").join("")) "private view key is 0",
|
||||
if (keys['publicSpendKey'] == List.generate(64, (index) => "0").join("")) "public spend key is 0",
|
||||
if (keys['publicViewKey'] == List.generate(64, (index) => "0").join("")) "private view key is 0",
|
||||
if (wallet.seed == null) "wallet seed is null",
|
||||
if (wallet.seed == "") "wallet seed is empty",
|
||||
if (monero!.getSubaddressList(wallet).getAll(wallet)[0].address == "41d7FXjswpK1111111111111111111111111111111111111111111111111111111111111111111111111111112KhNi4")
|
||||
"primary address is invalid, you won't be able to receive / spend funds",
|
||||
];
|
||||
return errors;
|
||||
}
|
||||
|
||||
@computed
|
||||
bool get hasSilentPayments => wallet.type == WalletType.bitcoin && !wallet.isHardwareWallet;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user