restoreAccount method

Future<void> restoreAccount(
  1. List<int> zipBytes,
  2. Int64 offset,
  3. Int64 totalLength,
  4. bool hasMore,
)

Implementation

Future<void> restoreAccount(List<int> zipBytes, Int64 offset, Int64 totalLength, bool hasMore) async {
  if (!havenoChannel.isConnected) {
    throw DaemonNotConnectedException();
  }
  try {
    // Need to check what this is actually returning #TODO
    await havenoChannel.accountClient!.restoreAccount(RestoreAccountRequest(zipBytes: zipBytes, offset: offset, totalLength: totalLength, hasMore: hasMore));
  } on GrpcError catch (e) {
    // Will need to catch whatever exception is thrown for invalid password
    handleGrpcError(e);
  }
}