Skip to content

Commit

Permalink
fix: wrap nil
Browse files Browse the repository at this point in the history
  • Loading branch information
zhouxl committed Jun 18, 2024
1 parent 73a2def commit a2c15f1
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Tests/FlowAccessAPIOnMainnetTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -231,8 +231,11 @@ final class FlowAccessAPIOnMainnetTests: XCTestCase {
let id: UInt64
let from: String
}

let test: TestType = try result.events.first!.payload.decode()
guard let event = result.events.first else {

return
}
let test: TestType = try event.payload.decode()

XCTAssertEqual(result.events.first?.payload.fields?.type, .event)
XCTAssertEqual(test.id, 11800)
Expand Down

0 comments on commit a2c15f1

Please sign in to comment.