mirror of
https://github.com/aljazceru/breez-sdk-docs.git
synced 2025-12-17 22:04:21 +01:00
28 lines
727 B
Swift
28 lines
727 B
Swift
//
|
|
// ServiceStatus.swift
|
|
//
|
|
//
|
|
// Created by dangeross on 27/11/2023.
|
|
//
|
|
|
|
import Foundation
|
|
import BreezSDK
|
|
|
|
func getServiceStatus(sdk: BlockingBreezServices) -> ServiceHealthCheckResponse? {
|
|
// ANCHOR: health-check-status
|
|
let healthCheck = try? sdk.serviceHealthCheck()
|
|
print("Current service status is: \(healthCheck?.status)")
|
|
// ANCHOR_END: health-check-status
|
|
return healthCheck
|
|
}
|
|
|
|
func reportPaymentFailure(sdk: BlockingBreezServices) {
|
|
// ANCHOR: report-payment-failure
|
|
let paymentHash = "..."
|
|
|
|
try? sdk.reportIssue(
|
|
req: ReportIssueRequest.paymentFailure(
|
|
data: ReportPaymentFailureDetails(paymentHash: paymentHash)))
|
|
// ANCHOR_END: report-payment-failure
|
|
}
|