WalletService
public struct WalletService : WalletServicing
A service implementation for managing wallet operations.
-
Initializes a new
WalletService
instance.Declaration
Swift
public init(repository: WalletRepositoryProtocol)
Parameters
repository
The repository for wallet operations.
-
Retrieves the wallet with the specified ID.
Declaration
Swift
@MainActor public func fetchWallet( walletId: String, response: LoadableSubject<Wallet> )
Parameters
walletId
The ID of the wallet to retrieve.
response
The loadable subject to track the response. The loadable subject tracks the state of the wallet retrieval operation, representing the success state with the loaded
Wallet
value or the failure state with the associatedNetworkError
.