Skip to content

Commit

Permalink
Merge pull request #335 from tangem/IOS-5376_open_read_wallets
Browse files Browse the repository at this point in the history
IOS-5376 Make read wallets list public
  • Loading branch information
tureck1y authored Dec 29, 2023
2 parents 32ba658 + 09bb944 commit 1dd026b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions TangemSdk/TangemSdk/Operations/Read/ReadCommand.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ import Foundation
/// This command receives from the Tangem Card all the data about the card and the wallet,
/// including unique card number (CID or cardId) that has to be submitted while calling all other commands.
@available(iOS 13.0, *)
final class ReadCommand: Command {
var preflightReadMode: PreflightReadMode { .none }
public final class ReadCommand: Command {
public var preflightReadMode: PreflightReadMode { .none }

deinit {
Log.debug("ReadCommand deinit")
}

func run(in session: CardSession, completion: @escaping CompletionResult<Card>) {
public func run(in session: CardSession, completion: @escaping CompletionResult<Card>) {
transceive(in: session) { result in
switch result {
case .success(let response):
Expand Down
14 changes: 7 additions & 7 deletions TangemSdk/TangemSdk/Operations/Read/ReadWalletsListCommand.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@
import Foundation

@available(iOS 13.0, *)
struct ReadWalletsListResponse: JSONStringConvertible {
let cardId: String
let wallets: [Card.Wallet]
public struct ReadWalletsListResponse: JSONStringConvertible {
public let cardId: String
public let wallets: [Card.Wallet]
}

/// Read all wallets on card.
@available(iOS 13.0, *)
class ReadWalletsListCommand: Command {
var preflightReadMode: PreflightReadMode { .readCardOnly }
public class ReadWalletsListCommand: Command {
public var preflightReadMode: PreflightReadMode { .readCardOnly }

private var loadedWallets: [Card.Wallet] = []
private var receivedWalletsCount: Int = 0

Expand All @@ -36,7 +36,7 @@ class ReadWalletsListCommand: Command {
return nil
}

func run(in session: CardSession, completion: @escaping CompletionResult<ReadWalletsListResponse>) {
public func run(in session: CardSession, completion: @escaping CompletionResult<ReadWalletsListResponse>) {
transceive(in: session) { result in
switch result {
case .success(let response):
Expand Down

0 comments on commit 1dd026b

Please sign in to comment.