diff options
author | Roman Smrž <roman.smrz@seznam.cz> | 2023-10-10 21:36:58 +0200 |
---|---|---|
committer | Roman Smrž <roman.smrz@seznam.cz> | 2023-10-19 21:37:01 +0200 |
commit | 5b908c86320ee73f2722c85f8a47fa03ec093c6c (patch) | |
tree | 96c57bc839f9c8f50a3bba08075fdfb6ab6eaff4 /src/State.hs | |
parent | 61808c8cd7b30ceaf9915e72d734c4d095ff67d6 (diff) |
Use extended identity data for name
Diffstat (limited to 'src/State.hs')
-rw-r--r-- | src/State.hs | 8 |
1 files changed, 4 insertions, 4 deletions
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 |