Skip to content

Commit

Permalink
Update Chain+Specification.swift
Browse files Browse the repository at this point in the history
  • Loading branch information
loopedresolve committed Jul 21, 2024
1 parent 142f4b4 commit 1419940
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Sources/SmoldotSwift/Chain+Specification.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,17 @@

import Foundation

#warning("TODO: revisit comments")

extension Chain.Specification {
/// Guaranteed to exist in the JSON Object as it is a required method on the Rust ChainSpec trait.

/// Chain name as defined in the specification.
public var name: String {
precondition(self["name"] != nil, "Chain Specification is missing required key `name`")
return self["name"] as! String
}

/// Guaranteed to exist in the JSON Object as it is a required method on the Rust ChainSpec trait.
/// Chain identifier as defined in the specification.
var id: String {
precondition(self["id"] != nil, "Chain Specification is missing required key `id`")
return self["id"] as! String
}
}

0 comments on commit 1419940

Please sign in to comment.