Skip to content

Commit

Permalink
use correct type
Browse files Browse the repository at this point in the history
  • Loading branch information
kele-leanes committed Dec 4, 2023
1 parent 3f3864a commit d66813b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Sources/XMTP/Messages/EncryptedPrivateKeyBundle.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
typealias EncryptedPrivateKeyBundle = Xmtp_MessageContents_EncryptedPrivateKeyBundle

extension EncryptedPrivateKeyBundle {
func decrypted(with key: SigningKey, preEnableIdentityCallback: (() async throws -> Void)? = nil) async throws -> PrivateKeyBundle {
func decrypted(with key: SigningKey, preEnableIdentityCallback: PreEventCallback? = nil) async throws -> PrivateKeyBundle {
try await preEnableIdentityCallback?()
let signature = try await key.sign(message: Signature.enableIdentityText(key: v1.walletPreKey))
let message = try Crypto.decrypt(signature.rawDataWithNormalizedRecovery, v1.ciphertext)
Expand Down
2 changes: 1 addition & 1 deletion Sources/XMTP/Messages/PrivateKeyBundle.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ extension PrivateKeyBundle {
self.v1 = v1
}

func encrypted(with key: SigningKey, preEnableIdentityCallback: (() async throws -> Void)? = nil) async throws -> EncryptedPrivateKeyBundle {
func encrypted(with key: SigningKey, preEnableIdentityCallback: PreEventCallback? = nil) async throws -> EncryptedPrivateKeyBundle {
let bundleBytes = try serializedData()
let walletPreKey = try Crypto.secureRandomBytes(count: 32)

Expand Down

0 comments on commit d66813b

Please sign in to comment.