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

construct rfq with typeid instead of string #46

Merged
merged 1 commit into from
Mar 14, 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
4 changes: 2 additions & 2 deletions Sources/tbDEX/Protocol/Models/Messages/RFQ.swift
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,13 @@ public struct RFQData: MessageData {
}

public init(
offeringId: String,
offeringId: TypeID,
payinAmount: String,
payinMethod: SelectedPaymentMethod,
payoutMethod: SelectedPaymentMethod,
claims: [String]
) {
self.offeringId = offeringId
self.offeringId = offeringId.rawValue
self.payinAmount = payinAmount
self.payinMethod = payinMethod
self.payoutMethod = payoutMethod
Expand Down
3 changes: 2 additions & 1 deletion Tests/tbDEXTests/Protocol/Models/Messages/RFQTests.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import Web5
import XCTest
import TypeID

@testable import tbDEX

Expand Down Expand Up @@ -46,7 +47,7 @@ final class RFQTests: XCTestCase {
to: to,
from: from,
data: .init(
offeringId: "offering_123",
offeringId: TypeID(rawValue:"offering_01hmz7ehw6e5k9bavj0ywypfpy")!,
payinAmount: "1.00",
payinMethod: .init(
kind: "DEBIT_CARD"
Expand Down
Loading