Merge pull request #104 from breez/savage-service-status

Update 0.2.10 & add service status page
This commit is contained in:
Roei Erez
2023-11-27 17:27:25 +02:00
committed by GitHub
20 changed files with 379 additions and 42 deletions

View File

@@ -0,0 +1,23 @@
import breez_sdk
def health_check_status(sdk_services):
try:
# ANCHOR: health-check-status
health_check = sdk_services.service_health_check()
print("Current service status is: ", health_check.status)
# ANCHOR_END: health-check-status
except Exception as error:
print(error)
raise
def report_payment_failure(sdk_services):
try:
# ANCHOR: report-payment-failure
payment_hash = "..."
sdk_services.report_issue(
breez_sdk.ReportIssueRequest.PAYMENT_FAILURE(
breez_sdk.ReportPaymentFailureDetails(payment_hash)))
# ANCHOR_END: report-payment-failure
except Exception as error:
print(error)
raise