Resolved further linting issues
This commit is contained in:
parent
a77a40fdf4
commit
b7a7035894
|
@ -101,7 +101,7 @@ func TestDatabase_GetIdentityImage(t *testing.T) {
|
|||
seedTestDB(t, db)
|
||||
|
||||
cs := []struct {
|
||||
KeyUid string
|
||||
KeyUID string
|
||||
Name string
|
||||
Expected string
|
||||
}{
|
||||
|
@ -123,7 +123,7 @@ func TestDatabase_GetIdentityImage(t *testing.T) {
|
|||
}
|
||||
|
||||
for _, c := range cs {
|
||||
oii, err := db.GetIdentityImage(c.KeyUid, c.Name)
|
||||
oii, err := db.GetIdentityImage(c.KeyUID, c.Name)
|
||||
require.NoError(t, err)
|
||||
|
||||
joii, err := json.Marshal(oii)
|
||||
|
|
|
@ -6,7 +6,6 @@ import (
|
|||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"github.com/status-im/status-go/images"
|
||||
"strings"
|
||||
"unicode"
|
||||
"unicode/utf8"
|
||||
|
@ -16,6 +15,7 @@ import (
|
|||
"github.com/status-im/markdown"
|
||||
"github.com/status-im/markdown/ast"
|
||||
|
||||
"github.com/status-im/status-go/images"
|
||||
"github.com/status-im/status-go/protocol/protobuf"
|
||||
)
|
||||
|
||||
|
|
|
@ -5,11 +5,11 @@ import (
|
|||
"encoding/hex"
|
||||
"fmt"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/status-im/status-go/images"
|
||||
"go.uber.org/zap"
|
||||
|
||||
"github.com/status-im/status-go/eth-node/crypto"
|
||||
"github.com/status-im/status-go/eth-node/types"
|
||||
"github.com/status-im/status-go/images"
|
||||
"github.com/status-im/status-go/protocol/common"
|
||||
"github.com/status-im/status-go/protocol/encryption/multidevice"
|
||||
"github.com/status-im/status-go/protocol/protobuf"
|
||||
|
|
|
@ -7,7 +7,6 @@ import (
|
|||
"database/sql"
|
||||
"encoding/hex"
|
||||
gethcrypto "github.com/ethereum/go-ethereum/crypto"
|
||||
"github.com/status-im/status-go/multiaccounts"
|
||||
"io/ioutil"
|
||||
"math"
|
||||
"math/rand"
|
||||
|
@ -25,6 +24,7 @@ import (
|
|||
"github.com/status-im/status-go/eth-node/types"
|
||||
enstypes "github.com/status-im/status-go/eth-node/types/ens"
|
||||
userimage "github.com/status-im/status-go/images"
|
||||
"github.com/status-im/status-go/multiaccounts"
|
||||
"github.com/status-im/status-go/protocol/audio"
|
||||
"github.com/status-im/status-go/protocol/common"
|
||||
"github.com/status-im/status-go/protocol/encryption"
|
||||
|
|
|
@ -590,8 +590,8 @@ func (api *PublicAPI) Echo(ctx context.Context, message string) (string, error)
|
|||
//
|
||||
|
||||
// GetIdentityImages returns an array of json marshalled IdentityImages assigned to the user's identity
|
||||
func (api *PublicAPI) GetIdentityImages(keyUid string) (string, error) {
|
||||
iis, err := api.service.multiAccountsDB.GetIdentityImages(keyUid)
|
||||
func (api *PublicAPI) GetIdentityImages(keyUID string) (string, error) {
|
||||
iis, err := api.service.multiAccountsDB.GetIdentityImages(keyUID)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
@ -602,8 +602,8 @@ func (api *PublicAPI) GetIdentityImages(keyUid string) (string, error) {
|
|||
}
|
||||
|
||||
// GetIdentityImage returns a json object representing the image with the given name
|
||||
func (api *PublicAPI) GetIdentityImage(keyUid, name string) (string, error) {
|
||||
ii, err := api.service.multiAccountsDB.GetIdentityImage(keyUid, name)
|
||||
func (api *PublicAPI) GetIdentityImage(keyUID, name string) (string, error) {
|
||||
ii, err := api.service.multiAccountsDB.GetIdentityImage(keyUID, name)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
@ -617,13 +617,13 @@ func (api *PublicAPI) GetIdentityImage(keyUid, name string) (string, error) {
|
|||
// The resulting image(s) will be stored in the DB along with other user account information.
|
||||
// aX and aY represent the pixel coordinates of the upper left corner of the image's cropping area
|
||||
// bX and bY represent the pixel coordinates of the lower right corner of the image's cropping area
|
||||
func (api *PublicAPI) StoreIdentityImage(keyUid, filepath string, aX, aY, bX, bY int) (string, error) {
|
||||
func (api *PublicAPI) StoreIdentityImage(keyUID, filepath string, aX, aY, bX, bY int) (string, error) {
|
||||
iis, err := images.GenerateIdentityImages(filepath, aX, aY, bX, bY)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
err = api.service.multiAccountsDB.StoreIdentityImages(keyUid, iis)
|
||||
err = api.service.multiAccountsDB.StoreIdentityImages(keyUID, iis)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
@ -634,8 +634,8 @@ func (api *PublicAPI) StoreIdentityImage(keyUid, filepath string, aX, aY, bX, bY
|
|||
}
|
||||
|
||||
// DeleteIdentityImage deletes an IdentityImage from the db with the given name
|
||||
func (api *PublicAPI) DeleteIdentityImage(keyUid string) error {
|
||||
return api.service.multiAccountsDB.DeleteIdentityImage(keyUid)
|
||||
func (api *PublicAPI) DeleteIdentityImage(keyUID string) error {
|
||||
return api.service.multiAccountsDB.DeleteIdentityImage(keyUID)
|
||||
}
|
||||
|
||||
// -----
|
||||
|
|
Loading…
Reference in New Issue