Skip to content

Commit

Permalink
Merge pull request #41 from SW-Maestro-OSS/feature/Error-handling
Browse files Browse the repository at this point in the history
[CVW-030] 웹소켓 & 환율정보 획득 과정 에러처리
  • Loading branch information
J0onYEong authored Feb 2, 2025
2 parents 6379591 + 442cd41 commit 16e9b2f
Show file tree
Hide file tree
Showing 50 changed files with 1,479 additions and 504 deletions.
11 changes: 11 additions & 0 deletions Pipfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"

[packages]

[dev-packages]

[requires]
python_version = "3.12"
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ public enum ModuleDependency {
public static let WebSocketManagementHelper: TargetDependency = .project(target: "WebSocketManagementHelper", path: .relativeToRoot("Projects/Shared/WebSocketManagementHelper"))

public static let I18N: TargetDependency = .project(target: "I18N", path: .relativeToRoot("Projects/Shared/I18N"))

public static let AlertShooter: TargetDependency = .project(target: "AlertShooter", path: .relativeToRoot("Projects/Shared/AlertShooter"))
}

public enum Util {
Expand Down
1 change: 1 addition & 0 deletions Projects/App/Project.swift
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ let project = Project(
D.Util.PresentationUtil,

// Shared
D.Shared.AlertShooter,
D.Shared.WebSocketManagementHelper,
],
settings: .settings(
Expand Down
11 changes: 9 additions & 2 deletions Projects/App/Sources/DI/Assembly/SharedAssembly.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import DataSource

import WebSocketManagementHelper
import I18N
import AlertShooter

import Swinject
import I18N
Expand All @@ -17,10 +17,17 @@ public class SharedAssembly: Assembly {

public func assemble(container: Swinject.Container) {

// MARK: AlertShooter
container.register(AlertShooter.self) { _ in
DefaultAlertShooter()
}
.inObjectScope(.container)

// MARK: WebSocketManagementHelper
container.register(WebSocketManagementHelper.self) { resolver in
DefaultWebSocketManagementHelper(
webSocketService: resolver.resolve(WebSocketService.self)!
webSocketService: resolver.resolve(WebSocketService.self)!,
alertShooter: resolver.resolve(AlertShooter.self)!
)
}
.inObjectScope(.container)
Expand Down
22 changes: 22 additions & 0 deletions Projects/Data/DataSource/Sources/DTO/BinanceResponseDTO.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
//
// BinanceResponseDTO.swift
// Data
//
// Created by choijunios on 1/30/25.
//

import Foundation

// MARK: Response
struct BinanceResponseDTO: Decodable {
let id: String
let status: Int
let error: BinanceErrorDTO?
}


// MARK: Error DTO
struct BinanceErrorDTO: Decodable {
let code: Int
let msg: String
}
Loading

0 comments on commit 16e9b2f

Please sign in to comment.