module BtcpayManager
  class FetchLightningWalletBalance < BtcpayManagerService
    def call
      res = get "stores/#{store_id}/lightning/BTC/balance"

      {
        confirmed_balance: res["offchain"]["local"].to_i / 1000 # msats to sats
      }
    end
  end
end
