From 8f6efbd45d53443d80239e0fc9fc20fe459bbe9a Mon Sep 17 00:00:00 2001
From: jbhusson <jonah@elixxir.io>
Date: Wed, 7 Jun 2023 16:55:01 -0400
Subject: [PATCH] Fix passing localstorage object

---
 storage/password.go | 4 ++--
 storage/version.go  | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/storage/password.go b/storage/password.go
index 5dec9055..95abcb4f 100644
--- a/storage/password.go
+++ b/storage/password.go
@@ -195,7 +195,7 @@ func verifyPassword(externalPassword string) bool {
 // initInternalPassword generates a new internal password, stores an encrypted
 // version in local storage, and returns it.
 func initInternalPassword(externalPassword string,
-	localStorage *storage.LocalStorage, csprng io.Reader,
+	localStorage storage.LocalStorage, csprng io.Reader,
 	params argonParams) ([]byte, error) {
 	internalPassword := make([]byte, internalPasswordLen)
 
@@ -250,7 +250,7 @@ func initInternalPassword(externalPassword string,
 // getInternalPassword retrieves the internal password from local storage,
 // decrypts it, and returns it.
 func getInternalPassword(
-	externalPassword string, localStorage *storage.LocalStorage) ([]byte, error) {
+	externalPassword string, localStorage storage.LocalStorage) ([]byte, error) {
 	encryptedInternalPassword, err := localStorage.Get(passwordKey)
 	if err != nil {
 		return nil, errors.WithMessage(err, getPasswordStorageErr)
diff --git a/storage/version.go b/storage/version.go
index 5fa7e439..3a35edfd 100644
--- a/storage/version.go
+++ b/storage/version.go
@@ -40,7 +40,7 @@ func CheckAndStoreVersions() error {
 }
 
 func checkAndStoreVersions(
-	currentWasmVer, currentClientVer string, ls *storage.LocalStorage) error {
+	currentWasmVer, currentClientVer string, ls storage.LocalStorage) error {
 	// Get the stored client version, if it exists
 	storedClientVer, err :=
 		initOrLoadStoredSemver(clientVerKey, currentClientVer, ls)
@@ -91,7 +91,7 @@ func checkAndStoreVersions(
 // local storage. If no version is stored, then the current version is stored
 // and returned.
 func initOrLoadStoredSemver(
-	key, currentVersion string, ls *storage.LocalStorage) (string, error) {
+	key, currentVersion string, ls storage.LocalStorage) (string, error) {
 	storedVersion, err := ls.Get(key)
 	if err != nil {
 		if errors.Is(err, os.ErrNotExist) {
-- 
GitLab