Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove unused dependency #40

Closed
wants to merge 1 commit into from
Closed
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
10 changes: 3 additions & 7 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,31 +30,27 @@ let package = Package(
),
],
dependencies: [
.package(url: "https://github.com/thebarndog/swift-dotenv.git", from: "2.0.0")
],
targets: [
rustXcframeworkTarget,
.target(
name: "YttriumCore",
dependencies: [
"RustXcframework",
.product(name: "SwiftDotenv", package: "swift-dotenv")
"RustXcframework"
],
path: "crates/ffi/YttriumCore/Sources/YttriumCore"
),
.target(
name: "Yttrium",
dependencies: [
"YttriumCore",
.product(name: "SwiftDotenv", package: "swift-dotenv")
"YttriumCore"
],
path: "platforms/swift/Sources/Yttrium"
),
.testTarget(
name: "YttriumTests",
dependencies: [
"Yttrium",
.product(name: "SwiftDotenv", package: "swift-dotenv")
"Yttrium"
],
path: "platforms/swift/Tests/YttriumTests"
),
Expand Down
6 changes: 2 additions & 4 deletions crates/ffi/YttriumCore/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ let package = Package(
),
],
dependencies: [
.package(url: "https://github.com/thebarndog/swift-dotenv.git", from: "2.0.0")
],
targets: [
.binaryTarget(
Expand All @@ -26,8 +25,7 @@ let package = Package(
.target(
name: "YttriumCore",
dependencies: [
"RustXcframework",
.product(name: "SwiftDotenv", package: "swift-dotenv")
"RustXcframework"
],
path: ".",
exclude: ["RustXcframework.xcframework"],
Expand All @@ -42,4 +40,4 @@ let package = Package(
]
),
]
)
)
22 changes: 0 additions & 22 deletions crates/ffi/YttriumCore/Sources/YttriumCore/Config.swift
Original file line number Diff line number Diff line change
Expand Up @@ -78,35 +78,13 @@ extension Endpoints {
}
}

import SwiftDotenv

extension Config {

public static func local() -> Self {
Config(endpoints: .local())
}

static func pimlico() throws -> Self {
try Dotenv.configure()

guard let rpcURL = Dotenv["PIMLICO_RPC_URL"]?.stringValue else {
fatalError("Missing PIMLICO_RPC_URL environment variable")
}
guard let bundlerURL = Dotenv["PIMLICO_BUNDLER_URL"]?.stringValue else {
fatalError("Missing PIMLICO_BUNDLER_URL environment variable")
}
let paymasterURL = bundlerURL

return Self(
endpoints: .init(
rpc: .init(baseURL: rpcURL),
bundler: .init(baseURL: bundlerURL),
paymaster: .init(baseURL: paymasterURL)
)
)
}


public var ffi: FFIConfig {
FFIConfig(endpoints: endpoints.ffi)
}
Expand Down