Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Bitkit/ViewModels/BlocktankViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class BlocktankViewModel: ObservableObject {
@Published var cJitEntries: [IcJitEntry]? = nil
@Published var info: IBtInfo? = nil

// Use -1 as a sentinel value to represent nil
/// Use -1 as a sentinel value to represent nil
@AppStorage("minCjitSats") private var minCjitSatsStorage: Int = -1

var minCjitSats: UInt64? {
Expand All @@ -16,7 +16,7 @@ class BlocktankViewModel: ObservableObject {
}

private let defaultChannelExpiryWeeks: UInt32 = 6
private let defaultSource = "bitkit"
private let defaultSource = "bitkit-ios"

@Published private(set) var isRefreshing = false

Expand Down
9 changes: 4 additions & 5 deletions BitkitTests/BlocktankTests.swift
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
@testable import Bitkit
import BitkitCore
import XCTest

@testable import Bitkit

final class BlocktankTests: XCTestCase {
let testDbPath = NSTemporaryDirectory()
let service = CoreService.shared.blocktank
Expand Down Expand Up @@ -57,7 +56,7 @@ final class BlocktankTests: XCTestCase {
let invoiceDescription = "Test CJIT order"
let nodeId = "03e7156ae33b0a208d0744199163177e909e80176e55d97a2f221ede0f934dd9ad" // Example node ID
let channelExpiryWeeks: UInt32 = 6
let options = CreateCjitOptions(source: "bitkit", discountCode: nil)
let options = CreateCjitOptions(source: "bitkit-ios", discountCode: nil)

let cjitEntry = try await service.createCjit(
channelSizeSat: channelSizeSat,
Expand All @@ -72,7 +71,7 @@ final class BlocktankTests: XCTestCase {
XCTAssertNotNil(cjitEntry)
XCTAssertFalse(cjitEntry.id.isEmpty, "CJIT entry ID should not be empty")
XCTAssertEqual(cjitEntry.channelSizeSat, channelSizeSat, "Channel size should match requested amount")
XCTAssertEqual(cjitEntry.source, "bitkit", "Source should be bitkit")
XCTAssertEqual(cjitEntry.source, "bitkit-ios", "Source should be bitkit-ios")
XCTAssertNotNil(cjitEntry.lspNode, "LSP node should not be nil")
XCTAssertFalse(cjitEntry.lspNode.pubkey.isEmpty, "LSP node pubkey should not be empty")
XCTAssertEqual(cjitEntry.nodeId, nodeId, "Node ID should match requested ID")
Expand Down Expand Up @@ -127,7 +126,7 @@ final class BlocktankTests: XCTestCase {
XCTAssertEqual(orders.first?.id, order.id, "Retrieved order should match created order")
}

func testPerformanceExample() throws {
func testPerformanceExample() {
// This is an example of a performance test case.
measure {
// Put the code you want to measure the time of here.
Expand Down
Loading