Fix autowithdraw priority order
This commit is contained in:
parent
8ea4d0c8a7
commit
8a36bffb85
|
@ -41,7 +41,7 @@ export async function autoWithdraw ({ data: { id }, models, lnd }) {
|
|||
const wallets = await models.wallet.findMany({
|
||||
where: { userId: user.id, enabled: true },
|
||||
orderBy: [
|
||||
{ priority: 'desc' },
|
||||
{ priority: 'asc' },
|
||||
// use id as tie breaker (older wallet first)
|
||||
{ id: 'asc' }
|
||||
]
|
||||
|
|
Loading…
Reference in New Issue