12 lines
258 B
Ruby
12 lines
258 B
Ruby
module BtcpayManager
|
|
class FetchLightningWalletBalance < BtcpayManagerService
|
|
def call
|
|
res = get "stores/#{@store_id}/lightning/BTC/balance"
|
|
|
|
{
|
|
balance: res["offchain"]["local"].to_i / 1000 # msats to sats
|
|
}
|
|
end
|
|
end
|
|
end
|