sign method rework for native message bytes
@@ -626,9 +626,6 @@ public final class WalletConnector {
return Result.failure(WalletConnectorError(core: status))
}
- let digestData = Data(bytes: digestBytes!, count: digestLength)
- return digestData.withUnsafeBytes { (digestDataBytes: UnsafeRawBufferPointer) -> Result<(digest: Digest?, signature: Signature), WalletConnectorError> in
-
var signatureLength: size_t = 0
let signatureBytes = wkWalletConnectorSignData(self.core,
finalMessageAddr,
@@ -642,13 +639,13 @@ public final class WalletConnector {
}
let signatureData = Data(bytes: signatureBytes!, count: signatureLength)
+ let digestData = Data(bytes: digestBytes!, count: digestLength)
let digest = Digest(core: self.core, data32: digestData)
let signature = Signature(core: self.core, data: signatureData)
return Result.success((digest: digest, signature: signature))
}
}
- }
///
/// Recover the public key
