@functionland/react-native-fula 1.54.12 → 1.54.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ios/Fula.swift +16 -6
- package/package.json +1 -1
package/ios/Fula.swift
CHANGED
|
@@ -1332,17 +1332,27 @@ class FulaModule: NSObject {
|
|
|
1332
1332
|
|
|
1333
1333
|
|
|
1334
1334
|
@objc(bloxFreeSpace:withRejecter:)
|
|
1335
|
-
func bloxFreeSpace(
|
|
1335
|
+
func bloxFreeSpace(resolve: RCTPromiseResolveBlock, reject: RCTPromiseRejectBlock) {
|
|
1336
1336
|
print("ReactNative", "bloxFreeSpace")
|
|
1337
|
+
guard let fulaClient = self.fula else {
|
|
1338
|
+
print("bloxFreeSpace", "fula client is nil")
|
|
1339
|
+
let error = NSError(domain: "FulaModuleError", code: 0, userInfo: [NSLocalizedDescriptionKey: "Fula client is not initialized"])
|
|
1340
|
+
reject("ERR_FULA_NOT_INITIALIZED", "Fula client is not initialized", error)
|
|
1341
|
+
return
|
|
1342
|
+
}
|
|
1343
|
+
|
|
1337
1344
|
do {
|
|
1338
|
-
let result = try
|
|
1339
|
-
let resultString = result.toUTF8String()
|
|
1345
|
+
let result = try fulaClient.bloxFreeSpace()
|
|
1346
|
+
guard let resultString = result.toUTF8String() else {
|
|
1347
|
+
let error = NSError(domain: "FulaModuleError", code: 1, userInfo: [NSLocalizedDescriptionKey: "Failed to convert result to String"])
|
|
1348
|
+
reject("ERR_FULA_RESULT_CONVERSION", "Failed to convert result to String", error)
|
|
1349
|
+
return
|
|
1350
|
+
}
|
|
1340
1351
|
resolve(resultString)
|
|
1341
1352
|
} catch let error {
|
|
1342
1353
|
print("bloxFreeSpace", error.localizedDescription)
|
|
1343
1354
|
reject("ERR_FULA", "bloxFreeSpace", error)
|
|
1344
1355
|
}
|
|
1345
|
-
|
|
1346
1356
|
}
|
|
1347
1357
|
|
|
1348
1358
|
@objc(transferToFula:wallet:chain:withResolver:withRejecter:)
|
|
@@ -1480,8 +1490,8 @@ class FulaModule: NSObject {
|
|
|
1480
1490
|
}
|
|
1481
1491
|
}
|
|
1482
1492
|
|
|
1483
|
-
@objc(fetchContainerLogs:
|
|
1484
|
-
func fetchContainerLogs(containerName: String, tailCount: String, resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock)
|
|
1493
|
+
@objc(fetchContainerLogs:withTailCount:withResolver:withRejecter:)
|
|
1494
|
+
func fetchContainerLogs(containerName: String, tailCount: String, resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock) {
|
|
1485
1495
|
do {
|
|
1486
1496
|
// Since fetchContainerLogs expects a String for tailCount, pass it directly
|
|
1487
1497
|
let result = try self.fula!.fetchContainerLogs(containerName, tailCount: tailCount)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@functionland/react-native-fula",
|
|
3
|
-
"version": "1.54.
|
|
3
|
+
"version": "1.54.14",
|
|
4
4
|
"description": "This package is a bridge to use the Fula libp2p protocols in the react-native which is using wnfs",
|
|
5
5
|
"main": "lib/commonjs/index",
|
|
6
6
|
"module": "lib/module/index",
|