From 5b908c86320ee73f2722c85f8a47fa03ec093c6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20Smr=C5=BE?= Date: Tue, 10 Oct 2023 21:36:58 +0200 Subject: Use extended identity data for name --- src/State.hs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/State.hs') diff --git a/src/State.hs b/src/State.hs index 207030c..e1ddcea 100644 --- a/src/State.hs +++ b/src/State.hs @@ -38,7 +38,7 @@ import Storage import Storage.Merge data LocalState = LocalState - { lsIdentity :: Stored (Signed IdentityData) + { lsIdentity :: Stored (Signed ExtendedIdentityData) , lsShared :: [Stored SharedState] } @@ -117,17 +117,17 @@ loadLocalStateHead st = loadHeads st >>= \case shared <- wrappedStore st $ SharedState { ssPrev = [] , ssType = Just $ sharedTypeID @(Maybe ComposedIdentity) Proxy - , ssValue = [storedRef $ idData $ fromMaybe identity owner] + , ssValue = [storedRef $ idExtData $ fromMaybe identity owner] } storeHead st $ LocalState - { lsIdentity = idData identity + { lsIdentity = idExtData identity , lsShared = [shared] } localIdentity :: LocalState -> UnifiedIdentity localIdentity ls = maybe (error "failed to verify local identity") (updateOwners $ maybe [] idExtDataF $ lookupSharedValue $ lsShared ls) - (validateIdentity $ lsIdentity ls) + (validateExtendedIdentity $ lsIdentity ls) headLocalIdentity :: Head LocalState -> UnifiedIdentity headLocalIdentity = localIdentity . headObject -- cgit v1.2.3