Merge pull request #3872 from zgfzgf/master

Replace fx.Extract with fx.Populate
This commit is contained in:
Łukasz Magiera 2020-09-16 11:50:59 +02:00 committed by GitHub
commit 2db7b8c998
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -382,7 +382,7 @@ func StorageMiner(out *api.StorageMiner) Option {
func(s *Settings) error { func(s *Settings) error {
resAPI := &impl.StorageMinerAPI{} resAPI := &impl.StorageMinerAPI{}
s.invokes[ExtractApiKey] = fx.Extract(resAPI) s.invokes[ExtractApiKey] = fx.Populate(resAPI)
*out = resAPI *out = resAPI
return nil return nil
}, },
@ -509,7 +509,7 @@ func FullAPI(out *api.FullNode) Option {
}, },
func(s *Settings) error { func(s *Settings) error {
resAPI := &impl.FullNodeAPI{} resAPI := &impl.FullNodeAPI{}
s.invokes[ExtractApiKey] = fx.Extract(resAPI) s.invokes[ExtractApiKey] = fx.Populate(resAPI)
*out = resAPI *out = resAPI
return nil return nil
}, },