mirror of
https://github.com/aljazceru/breez-sdk-docs.git
synced 2025-12-17 13:54:20 +01:00
Merge pull request #104 from breez/savage-service-status
Update 0.2.10 & add service status page
This commit is contained in:
18
snippets/dart_snippets/lib/service_status.dart
Normal file
18
snippets/dart_snippets/lib/service_status.dart
Normal file
@@ -0,0 +1,18 @@
|
||||
import 'package:breez_sdk/breez_sdk.dart';
|
||||
import 'package:breez_sdk/bridge_generated.dart';
|
||||
|
||||
Future<void> healthCheckStatus() async {
|
||||
// ANCHOR: health-check-status
|
||||
ServiceHealthCheckResponse healthCheck = await BreezSDK().serviceHealthCheck();
|
||||
print("Current service status is: ${healthCheck.status}");
|
||||
// ANCHOR_END: health-check-status
|
||||
}
|
||||
|
||||
Future<void> reportPaymentFailure() async {
|
||||
// ANCHOR: report-payment-failure
|
||||
String paymentHash = "...";
|
||||
await BreezSDK().reportIssue(
|
||||
req: ReportIssueRequest.paymentFailure(
|
||||
data: ReportPaymentFailureDetails(paymentHash: paymentHash)));
|
||||
// ANCHOR_END: report-payment-failure
|
||||
}
|
||||
Reference in New Issue
Block a user