Add kredits API with wallet balance endpoint
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -9,12 +9,12 @@ class BtcPay
|
||||
end
|
||||
|
||||
def onchain_wallet_balance
|
||||
wallet_info = get "stores/#{@store_id}/payment-methods/onchain/BTC/wallet"
|
||||
res = get "stores/#{@store_id}/payment-methods/onchain/BTC/wallet"
|
||||
|
||||
{
|
||||
balance: wallet_info["balance"].to_f,
|
||||
unconfirmed_balance: wallet_info["unconfirmedBalance"].to_f,
|
||||
confirmed_balance: wallet_info["confirmedBalance"].to_f
|
||||
balance: res["balance"].to_f,
|
||||
unconfirmed_balance: res["unconfirmedBalance"].to_f,
|
||||
confirmed_balance: res["confirmedBalance"].to_f
|
||||
}
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user