diff --git a/cmd/backup.go b/cmd/backup.go index 5a2091a49c97a891eff87a6b6b959b4eb8d600eb..80a6cddf0b7923b359b876b8a931cbfed6b11990 100644 --- a/cmd/backup.go +++ b/cmd/backup.go @@ -8,6 +8,10 @@ package cmd import ( "encoding/json" + "io/fs" + "io/ioutil" + "os" + "github.com/pkg/errors" jww "github.com/spf13/jwalterweatherman" "github.com/spf13/viper" @@ -15,9 +19,6 @@ import ( "gitlab.com/elixxir/client/xxdk" backupCrypto "gitlab.com/elixxir/crypto/backup" "gitlab.com/xx_network/primitives/utils" - "io/fs" - "io/ioutil" - "os" ) // loadOrInitBackup will build a new xxdk.E2e from existing storage @@ -50,7 +51,7 @@ func loadOrInitBackup(backupPath string, backupPass string, password []byte, sto } // Construct client from backup data - backupIdList, _, err := backup.NewClientFromBackup(string(ndfJson), storeDir, + _, backupIdList, _, err := backup.NewClientFromBackup(string(ndfJson), storeDir, password, []byte(backupPass), backupFile) if err != nil { jww.FATAL.Panicf("%+v", err) diff --git a/cmd/init.go b/cmd/init.go index ab4b70da0be8d25a5a499550920458da734ce7cf..ab5c1b9e67931b5b45e5ba8b207ca9ba3f4bf8c1 100644 --- a/cmd/init.go +++ b/cmd/init.go @@ -9,19 +9,17 @@ package cmd import ( -<<<<<<< HEAD "fmt" -======= + "io/fs" + "io/ioutil" + "os" + "github.com/pkg/errors" ->>>>>>> origin/hotfix/RefactorCMD "github.com/spf13/cobra" jww "github.com/spf13/jwalterweatherman" "github.com/spf13/viper" "gitlab.com/elixxir/client/xxdk" - "io/fs" - "io/ioutil" - "os" ) // initCmd creates a new user object with the given NDF @@ -61,7 +59,7 @@ var initCmd = &cobra.Command{ writeContact(identity.GetContact()) // NOTE: DO NOT REMOVE THIS LINE. YOU WILL BREAK INTEGRATION - fmt.Printf("%s\n", receptionIdentity.ID) + fmt.Printf("%s\n", identity.ID) }, }