zcash-swift-wallet-sdk
zcash-swift-wallet-sdk copied to clipboard
[TODO] treeState.height in testInitWithShortSeedAndFail
Linter is not happy about this simple TODO so it must be either fixed or properly commented.
func testInitWithShortSeedAndFail() async throws {
let seed = "testreferencealice"
var treeState = TreeState()
treeState.height = 663193 // TODO: rest
let dbInit = try await rustBackend.initDataDb(seed: nil)
guard case .success = dbInit else {
XCTFail("Failed to initDataDb. Expected `.success` got: \(String(describing: dbInit))")
return
}
do {
_ = try await rustBackend.createAccount(
seed: Array(seed.utf8),
treeState: treeState.serializedData(partial: false).bytes,
recoverUntil: nil
)
XCTFail("createAccount should fail here.")
} catch { }
}