decryptAccount method

Future<Account?> decryptAccount(
  1. String addr,
  2. String passphrase
)

Implementation

Future<Account?> decryptAccount(
  String addr,
  String passphrase,
) async {
  var found = this.getAccount(addr);
  if (found == null) return null;
  if (found is Account || found.isEncrypted) {
    await found.decryptAccount(passphrase);
    this.update(addr, found);
    return found;
  } else {
    return null;
  }
}