bbgo: remove Persistence injection

This commit is contained in:
c9s 2022-10-03 16:31:04 +08:00
parent 315f7da8f4
commit 4a37273065
No known key found for this signature in database
GPG Key ID: 7385E7E464CB0A54

View File

@ -440,10 +440,6 @@ var defaultPersistenceSelector = &PersistenceSelector{
}
func (trader *Trader) injectCommonServices(s interface{}) error {
persistence := &Persistence{
PersistenceSelector: defaultPersistenceSelector,
}
// a special injection for persistence selector:
// if user defined the selector, the facade pointer will be nil, hence we need to update the persistence facade pointer
sv := reflect.ValueOf(s).Elem()
@ -475,7 +471,6 @@ func (trader *Trader) injectCommonServices(s interface{}) error {
trader.environment.DatabaseService,
trader.environment.AccountService,
trader.environment,
persistence,
PersistenceServiceFacade, // if the strategy use persistence facade separately
)
}