@functionland/react-native-fula 1.54.13 → 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 +14 -4
- 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:)
|
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",
|