From 6039a40dcf7ad9f6465a6f0017e30353291c4027 Mon Sep 17 00:00:00 2001 From: Icaro Motta Date: Thu, 12 Dec 2024 02:15:06 -0300 Subject: [PATCH] Use StatusBackendClient in native code and pass message argument --- .../src/main/java/im/status/ethereum/module/StatusModule.kt | 2 +- modules/react-native-status/ios/RCTStatus/RCTStatus.m | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/react-native-status/android/src/main/java/im/status/ethereum/module/StatusModule.kt b/modules/react-native-status/android/src/main/java/im/status/ethereum/module/StatusModule.kt index c431228676..df2f2206f2 100644 --- a/modules/react-native-status/android/src/main/java/im/status/ethereum/module/StatusModule.kt +++ b/modules/react-native-status/android/src/main/java/im/status/ethereum/module/StatusModule.kt @@ -112,7 +112,7 @@ class StatusModule(private val reactContext: ReactApplicationContext, private va fun intendedPanic(message: String) { StatusBackendClient.executeStatusGoRequest( endpoint = "IntendedPanic", - requestBody = "", + requestBody = message, statusgoFunction = { Statusgo.intendedPanic(message) }, ) } diff --git a/modules/react-native-status/ios/RCTStatus/RCTStatus.m b/modules/react-native-status/ios/RCTStatus/RCTStatus.m index 50af3fe513..73b9902f17 100644 --- a/modules/react-native-status/ios/RCTStatus/RCTStatus.m +++ b/modules/react-native-status/ios/RCTStatus/RCTStatus.m @@ -113,7 +113,11 @@ RCT_EXPORT_METHOD(intendedPanic:(NSString *)message) { #if DEBUG NSLog(@"IntendedPanic() method called"); #endif - StatusgoIntendedPanic(message); + [StatusBackendClient executeStatusGoRequest:@"IntendedPanic" + body:message + statusgoFunction:^NSString *{ + return StatusgoIntendedPanic(message); + }]; } RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(fleets) {