Skip to content

Commit f8aaa95

Browse files
committed
[BinanceAuth] Code reorg
1 parent fa322e6 commit f8aaa95

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

Sources/SwiftTrader/Model/Binance/BinanceAuth.swift renamed to Sources/SwiftTrader/Model/Binance/BinanceAuth/BinanceAuth.swift

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,6 @@
77

88
import Foundation
99

10-
public protocol BinanceAuthorizing {
11-
var apiKey: String { get }
12-
var apiSecret: String { get }
13-
}
14-
1510
/// Holds data required to authenticate requests against Binance APIs.
1611
public struct BinanceAuth {
1712

@@ -24,7 +19,7 @@ public struct BinanceAuth {
2419

2520
public extension BinanceAuth {
2621

27-
struct Spot: BinanceAuthorizing {
22+
struct Spot: BinanceAuthorizing, Codable {
2823
public let apiKey: String
2924
public let apiSecret: String
3025

@@ -34,11 +29,3 @@ public extension BinanceAuth {
3429
}
3530
}
3631
}
37-
38-
// MARK: - Equatable
39-
40-
extension BinanceAuth: Equatable {
41-
public static func == (lhs: BinanceAuth, rhs: BinanceAuth) -> Bool {
42-
lhs.spot.apiKey == rhs.spot.apiKey
43-
}
44-
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
//
2+
// BinanceAuthorizing.swift
3+
//
4+
//
5+
// Created by Fernando Fernandes on 03.01.24.
6+
//
7+
8+
import Foundation
9+
10+
public protocol BinanceAuthorizing: Codable {
11+
var apiKey: String { get }
12+
var apiSecret: String { get }
13+
}

0 commit comments

Comments
 (0)