Skip to content

Commit 82157cd

Browse files
committed
fix: throwable sign
1 parent 4f7af73 commit 82157cd

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

Sources/MPCEthereumProvider/MPCEthereumProvider.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import curveSecp256k1
1515

1616

1717
public protocol EvmSigner {
18-
func sign( message: Data ) -> Data
18+
func sign( message: Data ) throws -> Data
1919
var publicKey : Data { get }
2020
}
2121

Tests/Web3SwiftMpcProviderTests/signer.swift

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,10 @@ import MPCEthereumProvider
4646

4747

4848
extension MpcCoreKit : EvmSigner {
49-
public func sign(message: Data) -> Data {
50-
let data = try? self.tssSign(message: message)
51-
return data ?? Data([])
49+
public func sign(message: Data) throws -> Data {
50+
let data = try self.tssSign(message: message)
51+
return data
5252
}
53-
5453

5554
public var publicKey: Data {
5655
return self.getTssPubKey().suffix(64)

0 commit comments

Comments
 (0)