deleteAccount method

Future<void> deleteAccount(
  1. String? address
)

Implementation

Future<void> deleteAccount(String? address) async {
  _deleteKeyPair(address);

  final mnemonics = Map.of(_storage.encryptedMnemonics.val);
  mnemonics.remove(address);
  _storage.encryptedMnemonics.val = mnemonics;
  final privateKeys = Map.of(_storage.encryptedPrivateKeys.val);
  privateKeys.remove(address);
  _storage.encryptedPrivateKeys.val = privateKeys;
}