From 2812b8a469897d682e8ab7b6ca35580db9c27d81 Mon Sep 17 00:00:00 2001 From: Naomi Plasterer Date: Thu, 17 Oct 2024 21:58:35 -0700 Subject: [PATCH] fix the linter --- Sources/XMTPTestHelpers/TestHelpers.swift | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/Sources/XMTPTestHelpers/TestHelpers.swift b/Sources/XMTPTestHelpers/TestHelpers.swift index addd07d5..41a8fa52 100644 --- a/Sources/XMTPTestHelpers/TestHelpers.swift +++ b/Sources/XMTPTestHelpers/TestHelpers.swift @@ -94,16 +94,11 @@ public struct FakeSCWWallet: SigningKey { return try FakeSCWWallet() } - public func sign(_ data: Data) async throws -> XMTPiOS.Signature { - let signature = XMTPiOS.Signature.with { - $0.ecdsaCompact.bytes = internalSignature.hexToData - } - return signature - } - - public func sign(message: String) async throws -> XMTPiOS.Signature { + public func signSCW(message: String) async throws -> Data { + // swiftlint:disable force_unwrapping let digest = SHA256.hash(data: message.data(using: .utf8)!) - return try await sign(Data(digest)) + // swiftlint:enable force_unwrapping + return Data(digest) } }