Skip to content

Commit

Permalink
fix the linter
Browse files Browse the repository at this point in the history
  • Loading branch information
nplasterer committed Oct 18, 2024
1 parent 2cd20ce commit 2812b8a
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions Sources/XMTPTestHelpers/TestHelpers.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}

Expand Down

0 comments on commit 2812b8a

Please sign in to comment.