Skip to content

Commit

Permalink
should contain pending tx when retry account closing (#90)
Browse files Browse the repository at this point in the history
  • Loading branch information
hundredark authored Sep 27, 2024
1 parent ad47a6a commit b580f6d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions keeper/store/transaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ func (s *SQLite3Store) CountTransactionsByState(ctx context.Context, state byte)
}

func (s *SQLite3Store) CountUnfinishedTransactionsByHolder(ctx context.Context, holder string) (int, error) {
query := "SELECT COUNT(*) FROM transactions WHERE holder=? AND state=?"
row := s.db.QueryRowContext(ctx, query, holder, common.RequestStateInitial)
query := "SELECT COUNT(*) FROM transactions WHERE holder=? AND state IN (?, ?)"
row := s.db.QueryRowContext(ctx, query, holder, common.RequestStateInitial, common.RequestStatePending)

var count int
err := row.Scan(&count)
Expand Down

0 comments on commit b580f6d

Please sign in to comment.