Skip to content

Commit

Permalink
Change visor PK parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
Darkren committed Oct 23, 2019
1 parent 44175c7 commit 4949612
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions pkg/app2/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ import (

"github.com/skycoin/skywire/pkg/app2/appserver"

skycoinCipher "github.com/skycoin/skycoin/src/cipher"

"github.com/pkg/errors"
"github.com/skycoin/dmsg/cipher"
"github.com/skycoin/skycoin/src/util/logging"
Expand Down Expand Up @@ -53,14 +51,13 @@ func ClientConfigFromEnv() (ClientConfig, error) {
return ClientConfig{}, ErrVisorPKNotProvided
}

// TODO: provide this func with the `dmsg/cipher`
visorPK, err := skycoinCipher.PubKeyFromHex(visorPKStr)
if err != nil {
var visorPK cipher.PubKey
if err := visorPK.UnmarshalText([]byte(visorPKStr)); err != nil {
return ClientConfig{}, ErrVisorPKInvalid
}

return ClientConfig{
VisorPK: cipher.PubKey(visorPK),
VisorPK: visorPK,
SockFile: sockFile,
AppKey: appserver.Key(appKey),
}, nil
Expand Down

0 comments on commit 4949612

Please sign in to comment.