Skip to content

Commit

Permalink
Merge pull request #360 from tangem/IOS-6807_add_backupCount
Browse files Browse the repository at this point in the history
IOS-6807 Add backup cards count
  • Loading branch information
tureck1y authored May 30, 2024
2 parents 564a3c0 + 98500c5 commit d47b7ab
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion TangemSdk/TangemSdk/Common/Card/Card.swift
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,16 @@ public extension Card {
return 0
}
}


public var backupCardsCount: Int {
switch self {
case .active(let cardsCount):
return cardsCount
default:
return 0
}
}

public init(from decoder: Decoder) throws {
let codableStruct = try BackupStatusCodable(from: decoder)
try self.init(from: codableStruct.status, cardsCount: codableStruct.cardsCount )
Expand Down

0 comments on commit d47b7ab

Please sign in to comment.