Skip to content
This repository has been archived by the owner on Dec 12, 2024. It is now read-only.

add optional readonly close success field #75

Merged
merged 1 commit into from
Mar 26, 2024
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
3 changes: 3 additions & 0 deletions Sources/tbDEX/Protocol/Models/Messages/Close.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ public struct CloseData: MessageData {
/// An explanation of why the exchange is being closed/completed
public let reason: String?

/// Indicates whether or not the exchange successfully completed
public private(set) var success: Bool?

/// Returns the MessageKind of close
public func kind() -> MessageKind {
return .close
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ final class CloseTests: XCTestCase {
XCTAssertEqual(close.metadata.exchangeID, "exchange_123")
XCTAssertEqual(close.data.reason, "test reason")
XCTAssertEqual(close.metadata.protocol, "1.0")
XCTAssertEqual(close.data.success, nil)
}

func test_overrideProtocolVersion() {
Expand Down
Loading