-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
identity: createConfig #741
Conversation
xmxanuel
commented
Feb 11, 2019
- create config with new identity
Codecov Report
@@ Coverage Diff @@
## develop #741 +/- ##
===========================================
+ Coverage 53.31% 53.34% +0.02%
===========================================
Files 119 119
Lines 9110 9208 +98
===========================================
+ Hits 4857 4912 +55
- Misses 3678 3717 +39
- Partials 575 579 +4
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some structure comments.
cmd/common.go
Outdated
@@ -58,6 +68,110 @@ func addKeys(config config.Configuration, idService identity.Service) error { | |||
return nil | |||
} | |||
|
|||
func getKeyPairsFromConfig(config config.Configuration) (map[int]did.Key, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this function should be more in the identity package as it will be reused from the API as well?
cmd/common.go
Outdated
return keys, nil | ||
} | ||
|
||
func addKeysFromConfig(ctx map[string]interface{}, cfg config.Configuration) error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here
cmd/common.go
Outdated
return nil | ||
} | ||
|
||
func createIdentity(ctx map[string]interface{}, cfg config.Configuration, configFile *viper.Viper) error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here
@@ -80,7 +80,7 @@ func getAnchorAddress() common.Address { | |||
// --------------------------------------------------------------------------------------------------------------------- | |||
func migrateNewIdentityContracts() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This logic in this file is only for testing, we should think about removing it to the test bootstapper instead.
ah okay. for the codecov the test needs to be in the same package |