Add Service Status page with service_health_check and report_issue examples

This commit is contained in:
Ross Savage
2023-11-27 13:50:16 +01:00
parent b65d2c0d85
commit 2e24d376ee
11 changed files with 348 additions and 0 deletions

View File

@@ -0,0 +1,36 @@
using Breez.Sdk;
public class ServiceStatusSnippets
{
public void HealthCheckStatus(BlockingBreezServices sdk)
{
// ANCHOR: health-check-status
try
{
var healthCheck = sdk.ServiceHealthCheck();
Console.WriteLine($"Current service status is: {currentFees.totalEstimatedFees}");
}
catch (Exception)
{
// Handle error
}
// ANCHOR_END: health-check-status
}
public void ReportPaymentFailure(BlockingBreezServices sdk)
{
// ANCHOR: report-payment-failure
var paymentHash = "...";
try
{
sdk.ReportIssue(new ReportIssueRequest.PaymentFailure(
new ReportPaymentFailureDetails(paymentHash)
));
}
catch (Exception)
{
// Handle error
}
// ANCHOR_END: report-payment-failure
}
}