Skip to content

Commit

Permalink
bug fix ghosnet baker parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
simonmcl committed Jul 20, 2023
1 parent 1887c97 commit 78a958e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/KukaiCoreSwift/Models/BakingBad/TzKTBaker.swift
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public struct TzKTBaker: Codable, Hashable {
}

public static func fromTestnetArray(_ data: [Any]) -> TzKTBaker? {
guard data.count == 3, let address = data[0] as? String, let balance = data[1] as? Decimal, let stakingBalance = data[2] as? Decimal else {
guard data.count == 3, let address = data[0] as? String, let balance = (data[1] as? NSNumber)?.decimalValue, let stakingBalance = (data[2] as? NSNumber)?.decimalValue else {
return nil
}

Expand Down

0 comments on commit 78a958e

Please sign in to comment.