mirror of
https://github.com/aljazceru/breez-sdk-docs.git
synced 2025-12-17 05:44:20 +01:00
28 lines
685 B
Swift
28 lines
685 B
Swift
//
|
|
// ServiceStatus.swift
|
|
//
|
|
//
|
|
// Created by dangeross on 27/11/2023.
|
|
//
|
|
|
|
import BreezSDK
|
|
import Foundation
|
|
|
|
func getServiceStatus(sdk: BlockingBreezServices) {
|
|
// ANCHOR: health-check-status
|
|
if let healthCheck = try? sdk.serviceHealthCheck() {
|
|
print("Current service status is: \(healthCheck.status)")
|
|
}
|
|
// ANCHOR_END: health-check-status
|
|
}
|
|
|
|
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
|
|
}
|