session-ios/Session/Storage+Shared.swift

14 lines
311 B
Swift
Raw Normal View History

extension Storage {
public static let shared = Storage()
public func with(_ work: @escaping (Any) -> Void) {
Storage.writeSync { work($0) }
}
public func getUserPublicKey() -> String? {
return OWSIdentityManager.shared().identityKeyPair()?.publicKey()?.toHexString()
}
}