Tunnel view model: Populate interface's public key

Signed-off-by: Roopesh Chander <roop@roopc.net>
This commit is contained in:
Roopesh Chander 2018-10-24 12:26:21 +05:30
parent b6d41ec9de
commit 8f4875caf0
1 changed files with 1 additions and 0 deletions

View File

@ -61,6 +61,7 @@ class TunnelViewModel {
guard let config = validatedConfiguration else { return } guard let config = validatedConfiguration else { return }
scratchpad[.name] = config.name scratchpad[.name] = config.name
scratchpad[.privateKey] = config.privateKey.base64EncodedString() scratchpad[.privateKey] = config.privateKey.base64EncodedString()
scratchpad[.publicKey] = config.publicKey.base64EncodedString()
if (!config.addresses.isEmpty) { if (!config.addresses.isEmpty) {
scratchpad[.addresses] = config.addresses.map { $0.stringRepresentation() }.joined(separator: ", ") scratchpad[.addresses] = config.addresses.map { $0.stringRepresentation() }.joined(separator: ", ")
} }