Fix autowithdraw priority order

This commit is contained in:
ekzyis 2024-07-08 08:07:13 +02:00
parent 8ea4d0c8a7
commit 8a36bffb85
1 changed files with 1 additions and 1 deletions

View File

@ -41,7 +41,7 @@ export async function autoWithdraw ({ data: { id }, models, lnd }) {
const wallets = await models.wallet.findMany({ const wallets = await models.wallet.findMany({
where: { userId: user.id, enabled: true }, where: { userId: user.id, enabled: true },
orderBy: [ orderBy: [
{ priority: 'desc' }, { priority: 'asc' },
// use id as tie breaker (older wallet first) // use id as tie breaker (older wallet first)
{ id: 'asc' } { id: 'asc' }
] ]