Removing initialize methods from the main/manager class also allows for different iniitalizers in specific task services
12 lines
249 B
Ruby
12 lines
249 B
Ruby
module BtcpayManager
|
|
class FetchLightningWalletBalance < BtcpayManagerService
|
|
def call
|
|
res = get "/lightning/BTC/balance"
|
|
|
|
{
|
|
confirmed_balance: res["offchain"]["local"].to_i / 1000 # msats to sats
|
|
}
|
|
end
|
|
end
|
|
end
|