Make publishing of BTCPay wallet balances optional
Some checks failed
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is failing

This commit is contained in:
Râu Cao
2023-09-20 18:36:53 +02:00
parent 91d3b977e9
commit 69fffb29d8
4 changed files with 46 additions and 0 deletions

View File

@@ -1,4 +1,5 @@
class Api::BtcpayController < Api::BaseController
before_action :require_feature_enabled
def onchain_btc_balance
balance = BtcpayManager::FetchOnchainWalletBalance.call
@@ -18,4 +19,11 @@ class Api::BtcpayController < Api::BaseController
status: 500
end
private
def require_feature_enabled
unless Setting.btcpay_publish_wallet_balances
http_status :not_found and return
end
end
end