From dbd3524433c1c35dd209c7dc5a6c1dbc18495d15 Mon Sep 17 00:00:00 2001
From: Bruno Muniz Azevedo Filho <bruno@elixxir.io>
Date: Thu, 4 Aug 2022 14:04:22 -0300
Subject: [PATCH] Adds guard to nil username on restoring

---
 Sources/Integration/Session/Session.swift | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Sources/Integration/Session/Session.swift b/Sources/Integration/Session/Session.swift
index fee3c76c..fb14ed89 100644
--- a/Sources/Integration/Session/Session.swift
+++ b/Sources/Integration/Session/Session.swift
@@ -140,7 +140,7 @@ public final class Session: SessionType {
             }
         }
 
-        guard username!.isEmpty == false else {
+        guard let username = username, username.isEmpty == false else {
             fatalError("Trying to restore an account that has no username")
         }
 
-- 
GitLab