From 2eb03c2e48b8d3c0ca940063e29ff1d6f6b30419 Mon Sep 17 00:00:00 2001 From: Jake Taylor <jake@elixxir.io> Date: Tue, 5 Jul 2022 13:45:05 -0500 Subject: [PATCH] fixes to identity stuff --- xxdk/e2e.go | 5 +++-- xxdk/identity.go | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/xxdk/e2e.go b/xxdk/e2e.go index 8811994fd..98d9f37d0 100644 --- a/xxdk/e2e.go +++ b/xxdk/e2e.go @@ -178,8 +178,9 @@ func LoginWithProtoClient(storageDir string, password []byte, return nil, err } - userInfo := c.GetStorage().PortableUserInfo() - receptionIdentity, err := buildReceptionIdentity(userInfo, c.GetStorage().GetE2EGroup(), protoUser.E2eDhPrivateKey) + userInfo := user.NewUserFromProto(protoUser) + receptionIdentity, err := buildReceptionIdentity(userInfo, + c.GetStorage().GetE2EGroup(), protoUser.E2eDhPrivateKey) return Login(c, callbacks, receptionIdentity) } diff --git a/xxdk/identity.go b/xxdk/identity.go index 46caef778..97de12400 100644 --- a/xxdk/identity.go +++ b/xxdk/identity.go @@ -172,8 +172,8 @@ func (r ReceptionIdentity) GetContact() contact.Contact { // buildReceptionIdentity creates a new ReceptionIdentity // from the given user.Info func buildReceptionIdentity(userInfo user.Info, e2eGrp *cyclic.Group, dHPrivkey *cyclic.Int) (ReceptionIdentity, error) { - saltCopy := make([]byte, len(userInfo.TransmissionSalt)) - copy(saltCopy, userInfo.TransmissionSalt) + saltCopy := make([]byte, len(userInfo.ReceptionSalt)) + copy(saltCopy, userInfo.ReceptionSalt) grp, err := e2eGrp.MarshalJSON() if err != nil { -- GitLab