Skip to content

Commit

Permalink
Add testBatchGetTransactionByHash test
Browse files Browse the repository at this point in the history
  • Loading branch information
franciszekjob committed May 8, 2024
1 parent f9df81b commit b00296b
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion Tests/StarknetTests/Providers/ProviderTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ final class ProviderTests: XCTestCase {
}

func testGetBlockNumber() async throws {
print("AAA")
let blockNumber = try await provider.getBlockNumber().send()

print(blockNumber)
Expand Down Expand Up @@ -406,4 +405,15 @@ final class ProviderTests: XCTestCase {
XCTAssertTrue(simulations2[0].transactionTrace is StarknetInvokeTransactionTrace)
XCTAssertTrue(simulations2[1].transactionTrace is StarknetDeployAccountTransactionTrace)
}

func testBatchGetTransactionByHash() async throws {
let transactions = try await provider.batchRequests(requests: [
provider.getTransactionBy(blockId: .tag(.latest), index: 0),
provider.getTransactionBy(blockId: .tag(.latest), index: 0),
]).send()

XCTAssertEqual(transactions.count, 2)

print(transactions)
}
}

0 comments on commit b00296b

Please sign in to comment.