Skip to content

Commit

Permalink
Make examples build again
Browse files Browse the repository at this point in the history
  • Loading branch information
qtbeee committed Nov 7, 2019
1 parent e02286a commit 3cb2cb1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Examples/CreateFile/main.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import Hedera
import Foundation

public func clientFromEnvironment() -> Client {
guard let nodeId = ProcessInfo.processInfo.environment["NODE_ID"] else { fatalError("environment variable NODE_ID must be set")}
Expand All @@ -13,8 +14,10 @@ public func clientFromEnvironment() -> Client {
let client = clientFromEnvironment()
.setMaxTransactionFee(100_000_000)

let publicKey = Ed25519PrivateKey(ProcessInfo.processInfo.environment["OPERATOR_KEY"]!)!.publicKey

let receipt = try! FileCreateTransaction(client: client)
.addKey(privateKey.publicKey)
.addKey(publicKey)
.setContents("This is a test")
.setMemo("File Create Example - Swift SDK")
.setMaxTransactionFee(1_000_000_000)
Expand Down
1 change: 1 addition & 0 deletions Examples/GetFileInfo/main.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import Hedera
import Foundation

public func clientFromEnvironment() -> Client {
guard let nodeId = ProcessInfo.processInfo.environment["NODE_ID"] else { fatalError("environment variable NODE_ID must be set")}
Expand Down
1 change: 1 addition & 0 deletions Examples/TransferCrypto/main.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import Hedera
import Foundation

public func clientFromEnvironment() -> Client {
guard let nodeId = ProcessInfo.processInfo.environment["NODE_ID"] else { fatalError("environment variable NODE_ID must be set")}
Expand Down

0 comments on commit 3cb2cb1

Please sign in to comment.