Skip to content

Commit

Permalink
fix iOS test
Browse files Browse the repository at this point in the history
  • Loading branch information
matiasbzurovski committed Sep 24, 2024
1 parent 5a2d218 commit ead4b32
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,11 @@ final class ManifestBuildingTests: Test<TransactionManifest> {
}

extension TestCase {
func engineToolkitReceipt(_ name: String) throws -> String {
let utf8 = try openTransactionFile(name, extension: "dat")
return try XCTUnwrap(String(data: utf8, encoding: .utf8))
}

func rtm(_ rtmFile: String) throws -> TransactionManifest {
let data = try openTransactionFile(rtmFile, extension: "rtm")
let instructionsString = try XCTUnwrap(String(data: data, encoding: .utf8))
Expand Down
24 changes: 1 addition & 23 deletions apple/Tests/TestCases/RET/TransactionManifestTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -37,29 +37,7 @@ final class TransactionManifestTests: Test<TransactionManifest> {

func test_execution_summary() throws {
let name = "third_party_deposits_update"
let engineToolkitReceiptStr = """
{
"kind": "CommitSuccess",
"state_updates_summary": {
"new_entities": [],
"metadata_updates": {},
"non_fungible_data_updates": {},
"newly_minted_non_fungibles": []
},
"worktop_changes": {},
"fee_summary": {
"execution_fees_in_xrd": "0.07638415",
"finalization_fees_in_xrd": "0.0105008",
"storage_fees_in_xrd": "0.03871917658",
"royalty_fees_in_xrd": "0"
},
"locked_fees": {
"contingent": "0",
"non_contingent": "0"
}
}
"""
let receipt = engineToolkitReceiptStr.data(using: .utf8)!
let receipt = try engineToolkitReceipt(name)
let manifest = try rtm(name)

let summary = try manifest.executionSummary(engineToolkitReceipt: receipt)
Expand Down

0 comments on commit ead4b32

Please sign in to comment.