mirror of
https://github.com/aljazceru/breez-sdk-docs.git
synced 2025-12-17 13:54:20 +01:00
Add Service Status page with service_health_check and report_issue examples
This commit is contained in:
18
snippets/react-native/service_status.ts
Normal file
18
snippets/react-native/service_status.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
import { serviceHealthCheck, reportIssue, ReportIssueRequestVariant } from '@breeztech/react-native-breez-sdk'
|
||||
|
||||
const healthCheckStatus = async () => {
|
||||
// ANCHOR: health-check-status
|
||||
const healthCheck = await serviceHealthCheck()
|
||||
console.log(`Current service status is: ${healthCheck.status}`)
|
||||
// ANCHOR_END: health-check-status
|
||||
}
|
||||
|
||||
const reportPaymentFailure = async () => {
|
||||
// ANCHOR: report-payment-failure
|
||||
const paymentHash = "..."
|
||||
await reportIssue({
|
||||
type: ReportIssueRequestVariant.PAYMENT_FAILURE,
|
||||
data: { paymentHash }
|
||||
})
|
||||
// ANCHOR_END: report-payment-failure
|
||||
}
|
||||
Reference in New Issue
Block a user