Add BTCPay service, Kredits API #71

Merged
raucao merged 6 commits from feature/community_funds_balance into master 2022-06-12 05:15:06 +00:00
Showing only changes of commit 03dc6c7a9c - Show all commits

View File

@ -4,7 +4,8 @@ class Api::KreditsController < Api::BaseController
btcpay = BtcPay.new
balance = btcpay.onchain_wallet_balance
render json: balance
rescue
rescue => error
Rails.logger.warn "Failed to fetch kredits BTC wallet balance: #{error.message}"
render json: { error: 'Failed to fetch wallet balance' },
status: 500
end