Skip to content

Commit

Permalink
Bring FileAppend to parity
Browse files Browse the repository at this point in the history
  • Loading branch information
qtbeee committed Jan 6, 2020
1 parent 0414bf4 commit c882bd0
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions Sources/Hedera/file/FileAppendTransaction.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@ public class FileAppendTransaction: TransactionBuilder {
body.fileAppend = Proto_FileAppendTransactionBody()
}

/// Set the file to be append the contents to
@discardableResult
public func setFileId(_ id: FileId) -> Self {
body.fileAppend.fileID = id.toProto()

return self
}

/// Set the content to be appened to the file
@discardableResult
public func setContents(_ data: Data) -> Self {
Expand All @@ -35,12 +43,4 @@ public class FileAppendTransaction: TransactionBuilder {

return self
}

/// Set the file to be append the contents to
@discardableResult
public func setFile(_ id: FileId) -> Self {
body.fileAppend.fileID = id.toProto()

return self
}
}

0 comments on commit c882bd0

Please sign in to comment.