Skip to content

Commit

Permalink
IOS-1612 Fix write json rpc
Browse files Browse the repository at this point in the history
  • Loading branch information
tureck1y committed May 6, 2022
1 parent cd22bc8 commit c3e3800
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions TangemSdk/TangemSdk/Operations/Files/File.swift
Original file line number Diff line number Diff line change
Expand Up @@ -133,21 +133,21 @@ public enum FileToWrite: Decodable {
startingSignature: file.startingSignature,
finalizingSignature: file.finalizingSignature,
counter: file.counter,
fileName: file.name,
fileName: file.fileName,
fileVisibility: file.fileVisibility,
walletPublicKey: file.walletPublicKey)
} catch {
let file = try UserFile(from: decoder)
self = .byUser(data: file.data,
fileName: file.name,
fileName: file.fileName,
fileVisibility: file.fileVisibility,
walletPublicKey: file.walletPublicKey)
}
}

private struct UserFile: Decodable {
let data: Data
let name: String?
let fileName: String?
let fileVisibility: FileVisibility?
let walletPublicKey: Data?
}
Expand All @@ -157,7 +157,7 @@ public enum FileToWrite: Decodable {
let startingSignature: Data
let finalizingSignature: Data
let counter: Int
let name: String?
let fileName: String?
let fileVisibility: FileVisibility?
let walletPublicKey: Data?
}
Expand Down

0 comments on commit c3e3800

Please sign in to comment.