Skip to content

Commit

Permalink
Update Fula.swift
Browse files Browse the repository at this point in the history
  • Loading branch information
ehsan6sha committed Oct 15, 2024
1 parent b8945fa commit 3160daa
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ios/Fula.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1972,7 +1972,11 @@ func replicateInPool(cidArray: [String], account: String, poolID: String, resolv

let result: Data
do {
result = try fula.replicate(inPool: cidsBytes, account: account, poolID: poolIDInt)
if let replicationResult = try fula.replicate(inPool: cidsBytes, account: account, poolID: poolIDInt) {
result = replicationResult
} else {
throw NSError(domain: "FULAErrorDomain", code: 1007, userInfo: [NSLocalizedDescriptionKey: "Replication result is nil"])
}
} catch {
print("Error replicating in pool: \(error)")
DispatchQueue.main.async {
Expand Down

0 comments on commit 3160daa

Please sign in to comment.