Merge pull request #1291 from c9s/c9s/strategy-deposit2transfer

FIX: [max] Fix QuerySpotAccount method
This commit is contained in:
c9s 2023-08-17 17:54:13 +08:00 committed by GitHub
commit ca698f8a2c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 3 deletions

View File

@ -587,8 +587,7 @@ func (e *Exchange) QuerySpotAccount(ctx context.Context) (*types.Account, error)
return nil, err return nil, err
} }
a.UpdateBalances(balances) a.UpdateBalances(balances)
return a, nil
return nil, nil
} }
func (e *Exchange) QueryAccount(ctx context.Context) (*types.Account, error) { func (e *Exchange) QueryAccount(ctx context.Context) (*types.Account, error) {

View File

@ -149,7 +149,7 @@ func (s *Strategy) checkDeposits(ctx context.Context) {
if service, ok := s.session.Exchange.(spotAccountQueryService); ok { if service, ok := s.session.Exchange.(spotAccountQueryService); ok {
account, err2 := service.QuerySpotAccount(ctx) account, err2 := service.QuerySpotAccount(ctx)
if err2 != nil { if err2 != nil {
log.WithError(err2).Errorf("unable to update account") log.WithError(err2).Errorf("unable to query spot account")
continue continue
} }