philips-software/cogito

View on GitHub
workspaces/cogito-ios-app/Cogito/Accounts service/AccountService.swift

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
import ReSwift

struct AccountService: TelepathService {
    let store: Store<AppState>

    func onRequest(_ request: JsonRpcRequest, on channel: TelepathChannel) {
        guard request.method == "accounts" else {
            return
        }
        store.dispatch(AccountActions.GetAccounts(requestId: request.id, channel: channel))
    }
}