Skip to content

Commit e66e221

Browse files
committed
DV-3808-fix-tx-find-ordering
1 parent 7108f17 commit e66e221

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## Unreleased
99

10+
## [0.9.13] - 2025-11-18
11+
- Fix `FindLastWalletTransactions` sql query [DV-3808]
12+
1013
## [0.9.12] - 2025-11-18
1114
- Fix transaction ordering at `tx-find` method [DV-3808]
1215
- The readme has been updated and translated into Russian and Chinese [DV-3708]

internal/storage/repos/repo_transactions/transactions.sql.go

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sql/postgres/queries/transactions/transactions.sql

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,7 @@ WITH tx AS ((SELECT true as is_confirmed,
227227
WHERE t.wallet_id = $1
228228
AND t.amount_usd >= 1
229229
AND t.type = $2
230+
ORDER BY created_at_index DESC
230231
LIMIT $3)
231232
UNION
232233
(SELECT false as is_confirmed,
@@ -246,6 +247,7 @@ WITH tx AS ((SELECT true as is_confirmed,
246247
WHERE t2.tx_hash = ut.tx_hash
247248
AND t2.currency_id = ut.currency_id
248249
AND t2.bc_uniq_key = ut.bc_uniq_key)
250+
ORDER BY created_at DESC
249251
LIMIT $3)
250252
LIMIT $3)
251253
SELECT tx.*,

0 commit comments

Comments
 (0)