Skip to content

Commit

Permalink
Merge pull request #1546 from stakwork/fix/org_transaction
Browse files Browse the repository at this point in the history
Remove unsettled payments from Payment history
  • Loading branch information
elraphty authored Feb 21, 2024
2 parents fd91a43 + a0d33ed commit 54731b8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion db/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -1814,7 +1814,7 @@ func (db database) GetPaymentHistory(org_uuid string, r *http.Request) []Payment

limitQuery = fmt.Sprintf("LIMIT %d OFFSET %d", limit, offset)

query := `SELECT * FROM payment_histories WHERE org_uuid = '` + org_uuid + `' ORDER BY created DESC`
query := `SELECT * FROM payment_histories WHERE org_uuid = '` + org_uuid + `' AND status = true ORDER BY created DESC`

db.db.Raw(query + " " + limitQuery).Find(&payment)
return payment
Expand Down
2 changes: 1 addition & 1 deletion utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func GetPaginationParams(r *http.Request) (int, int, string, string, string) {
intPage = 1
}
if intLimit == 0 {
intLimit = -1
intLimit = 1
}
if sortBy == "" {
sortBy = "created"
Expand Down

0 comments on commit 54731b8

Please sign in to comment.