WalletRepository
public struct WalletRepository : WalletRepositoryProtocol
A concrete implementation of the WalletRepositoryProtocol
that communicates with the network.
-
Initializes the
WalletRepository
with the specified networking client.Declaration
Swift
public init(networkingClient: EPINetworkingClientProtocol)
Parameters
networkingClient
The networking client to use for network requests.
-
Retrieves the wallet with the specified ID.
Declaration
Swift
public func fetchWallet(walletId: String) -> AnyPublisher<Wallet, NetworkError>
Parameters
walletId
The ID of the wallet to retrieve.
Return Value
A publisher that emits the retrieved
Wallet
or an error of typeNetworkError
.