From b6a974db240d23f019053f2613d920e8a4029a85 Mon Sep 17 00:00:00 2001 From: joshemb <josh@elixxir.io> Date: Fri, 29 Jul 2022 09:54:29 -0700 Subject: [PATCH] Restore BackupReport to original glory --- bindings/backup.go | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/bindings/backup.go b/bindings/backup.go index a6a083e23..8967887dd 100644 --- a/bindings/backup.go +++ b/bindings/backup.go @@ -10,6 +10,7 @@ package bindings import ( "encoding/json" "gitlab.com/elixxir/client/backup" + "gitlab.com/xx_network/primitives/id" ) //////////////////////////////////////////////////////////////////////////////// @@ -28,11 +29,11 @@ type Backup struct { // Example BackupReport: // {"BackupIdListJson":"WyJPRHRRTTA4ZERpV3lXaE0wWUhjanRHWnZQcHRSa1JOZ1pHR2FkTG10dE9BRCJd","BackupParams":""} type BackupReport struct { - // The JSON encoded list of E2E partner IDs - BackupIdListJson []byte + // The list of restored E2E partner IDs + RestoredContacts []*id.ID // The backup parameters found within the backup file - BackupParams string + Params string } // UpdateBackupFunc contains a function callback that returns new backups. @@ -68,16 +69,10 @@ func NewCmixFromBackup(ndfJSON, storageDir, backupPassphrase string, return nil, err } - // Marshal ID List - backupIdListJson, err := json.Marshal(backupIdList) - if err != nil { - return nil, err - } - // Construct report report := BackupReport{ - BackupIdListJson: backupIdListJson, - BackupParams: backupParams, + RestoredContacts: backupIdList, + Params: backupParams, } // Marshal report -- GitLab