Skip to content

Commit

Permalink
[panthalassa] removed key store interface
Browse files Browse the repository at this point in the history
  • Loading branch information
Florian Lenz committed Jun 4, 2018
1 parent b0ef45a commit daf7b8a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
4 changes: 1 addition & 3 deletions cli/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,7 @@ func main() {
return
}

keyStore := NewKeyStore()

err = panthalassa.Start(string(rawConfig), password, &keyStore, &Store{
err = panthalassa.Start(string(rawConfig), password, &Store{
Account: selectedAccount,
DB: userDB,
})
Expand Down
13 changes: 5 additions & 8 deletions mobile_interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,10 @@ type StartConfig struct {
EncryptedKeyManager string `valid:"required"`
RendezvousKey string `valid:"required"`
SignedProfile string `valid:"required"`
ChatHTTPEndpoint string `valid:"required"`
ChatWSEndpoint string `valid:"required"`
ChatAccessToken string `valid:"required"`
}

// create a new panthalassa instance
func start(km *keyManager.KeyManager, chatKeyStore PangeaKeyStoreDBInterface, config StartConfig, client UpStream) error {
func start(km *keyManager.KeyManager, config StartConfig, client UpStream) error {

//Exit if instance was already created and not stopped
if panthalassaInstance != nil {
Expand Down Expand Up @@ -86,7 +83,7 @@ func start(km *keyManager.KeyManager, chatKeyStore PangeaKeyStoreDBInterface, co
}

// start panthalassa
func Start(config string, password string, chatKeyStore PangeaKeyStoreDBInterface, client UpStream) error {
func Start(config string, password string, client UpStream) error {

// unmarshal config
var c StartConfig
Expand All @@ -106,11 +103,11 @@ func Start(config string, password string, chatKeyStore PangeaKeyStoreDBInterfac
return err
}

return start(km, chatKeyStore, c, client)
return start(km, c, client)
}

// create a new panthalassa instance with the mnemonic
func StartFromMnemonic(config string, mnemonic string, chatKeyStore PangeaKeyStoreDBInterface, client UpStream) error {
func StartFromMnemonic(config string, mnemonic string, client UpStream) error {

// unmarshal config
var c StartConfig
Expand All @@ -131,7 +128,7 @@ func StartFromMnemonic(config string, mnemonic string, chatKeyStore PangeaKeySto
}

// create panthalassa instance
return start(km, chatKeyStore, c, client)
return start(km, c, client)

}

Expand Down

0 comments on commit daf7b8a

Please sign in to comment.