zcash-swift-wallet-sdk icon indicating copy to clipboard operation
zcash-swift-wallet-sdk copied to clipboard

[TODO] treeState.height in testInitWithShortSeedAndFail

Open LukasKorba opened this issue 1 year ago • 0 comments

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 { }
    }

LukasKorba avatar Sep 11 '23 06:09 LukasKorba