Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
JiangSonglun committed Apr 1, 2024
1 parent 2a91a64 commit 006321b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ let package = Package(
),
],
dependencies: [
.package(url: "https://github.com/SAFE-anwang/BitcoinCore.Swift.git", .upToNextMajor(from: "2.2.3")),
.package(url: "https://github.com/SAFE-anwang/BitcoinCore.Swift.git", .upToNextMajor(from: "2.4.7")),
.package(url: "https://github.com/greymass/swift-scrypt.git", from: "1.0.0"),
.package(url: "https://github.com/horizontalsystems/HsToolKit.Swift.git", .upToNextMajor(from: "2.0.5")),
],
Expand Down
6 changes: 3 additions & 3 deletions Sources/DogecoinKit/Classes/Core/Kit.swift
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public class Kit: AbstractKit {
}
}

private init(extendedKey: HDExtendedKey?, watchAddressPublicKey: WatchAddressPublicKey?, purpose: Purpose, walletId: String, syncMode: BitcoinCore.SyncMode = .api, hasher: ((Data) -> Data)?, networkType: NetworkType = .mainNet, confirmationsThreshold: Int = 6, logger: Logger?) throws {
private init(extendedKey: HDExtendedKey?, watchAddressPublicKey: WatchAddressPublicKey?, purpose: Purpose, walletId: String, syncMode: BitcoinCore.SyncMode = .full, hasher: ((Data) -> Data)?, networkType: NetworkType = .mainNet, confirmationsThreshold: Int = 6, logger: Logger?) throws {
let network = networkType.network
let logger = logger ?? Logger(minLogLevel: .verbose)
let databaseFilePath = try DirectoryHelper.directoryURL(for: Kit.name).appendingPathComponent(Kit.databaseFileName(walletId: walletId, networkType: networkType, purpose: purpose, syncMode: syncMode)).path
Expand All @@ -56,8 +56,8 @@ public class Kit: AbstractKit {
case .mainNet:
let apiTransactionProviderUrl = "https://ltc.blocksdecoded.com/api"

if case let .blockchair(key) = syncMode {
let blockchairApi = BlockchairApi(secretKey: key, chainId: network.blockchairChainId, logger: logger)
if case .blockchair = syncMode {
let blockchairApi = BlockchairApi(chainId: network.blockchairChainId, logger: logger)
let blockchairBlockHashFetcher = BlockchairBlockHashFetcher(blockchairApi: blockchairApi)
let blockchairProvider = BlockchairTransactionProvider(blockchairApi: blockchairApi, blockHashFetcher: blockchairBlockHashFetcher)
let bCoinApiProvider = BCoinApi(url: apiTransactionProviderUrl, logger: logger)
Expand Down

0 comments on commit 006321b

Please sign in to comment.