From 7a63c87b03c927d667b035181322afe0363c990c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A2u=20Cao?= Date: Mon, 10 Aug 2026 17:02:20 -0600 Subject: [PATCH] Fix deprecation warning --- app/models/lndhub_user.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/models/lndhub_user.rb b/app/models/lndhub_user.rb index 9fa899c..5f8226f 100644 --- a/app/models/lndhub_user.rb +++ b/app/models/lndhub_user.rb @@ -10,18 +10,18 @@ class LndhubUser < LndhubBase foreign_key: "login" def balance - accounts.current.first.ledgers.sum("account_ledgers.amount").to_i.abs + accounts.current.order(:id).first.ledgers.sum("account_ledgers.amount").to_i.abs end def sum_outgoing - accounts.outgoing.first.ledgers.sum("account_ledgers.amount").to_i.abs + accounts.outgoing.order(:id).first.ledgers.sum("account_ledgers.amount").to_i.abs end def sum_incoming - accounts.incoming.first.ledgers.sum("account_ledgers.amount").to_i.abs + accounts.incoming.order(:id).first.ledgers.sum("account_ledgers.amount").to_i.abs end def sum_fees - accounts.fees.first.ledgers.sum("account_ledgers.amount").to_i.abs + accounts.fees.order(:id).first.ledgers.sum("account_ledgers.amount").to_i.abs end end