Skip to content

Commit

Permalink
Merge pull request #15 from gobicycle/withdrawals_prioritization
Browse files Browse the repository at this point in the history
prioritization of withdrawals
  • Loading branch information
gobicycle authored Apr 30, 2024
2 parents f50ba97 + a591828 commit 356ac1e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions db/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -703,6 +703,7 @@ func (c *Connection) GetTonInternalWithdrawalTasks(ctx context.Context, limit in
WHERE ((since_lt IS NOT NULL AND finish_lt IS NOT NULL AND lt > finish_lt) OR (since_lt IS NULL))
AND type = $1
GROUP BY deposit_address, tw.subwallet_id
ORDER BY MAX(di.amount) DESC
LIMIT $2
`, core.TonDepositWallet, limit)
if err != nil {
Expand Down Expand Up @@ -751,6 +752,7 @@ func (c *Connection) GetJettonInternalWithdrawalTasks(
WHERE ((since_lt IS NOT NULL AND lt > since_lt AND finish_lt IS NOT NULL)
OR (since_lt IS NULL)) AND jw.type = $1 AND NOT tw.address = ANY($2)
GROUP BY deposit_address, jw.subwallet_id, jw.currency
ORDER BY MAX(di.amount) DESC
LIMIT $3
`, core.JettonDepositWallet, excludedAddr, limit)
if err != nil {
Expand Down

0 comments on commit 356ac1e

Please sign in to comment.