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

Commit

Permalink
construct rfq with typeid instead of string (#46)
Browse files Browse the repository at this point in the history
  • Loading branch information
kirahsapong authored Mar 14, 2024
1 parent f8b54ba commit 4f74398
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
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

0 comments on commit 4f74398

Please sign in to comment.