import {singleton} from "tsyringe"; import {ReflauntWallet} from "../../models/ReflauntWallet"; @singleton() export class WalletCacheService { wallet: { [id: number]: ReflauntWallet } = {}; cache(reflauntWallet: ReflauntWallet) { this.wallet[reflauntWallet.id] = reflauntWallet; } isExist(id: number) { return this.wallet[id]; } get(id: number) { return this.wallet[id]; } }