From 53c918cc785ee3769103acc3e15aa9275c9383d9 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Sun, 12 Nov 2017 12:09:14 -0500 Subject: Clear cache on unsubscribe --- src/stores/balance_proxy_allowance_lazy_store.ts | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/stores/balance_proxy_allowance_lazy_store.ts') diff --git a/src/stores/balance_proxy_allowance_lazy_store.ts b/src/stores/balance_proxy_allowance_lazy_store.ts index a2b8fcf67..ac21c0818 100644 --- a/src/stores/balance_proxy_allowance_lazy_store.ts +++ b/src/stores/balance_proxy_allowance_lazy_store.ts @@ -75,4 +75,8 @@ export class BalanceAndProxyAllowanceLazyStore { delete this.proxyAllowance[tokenAddress][userAddress]; } } + public deleteAll(): void { + this.balance = {}; + this.proxyAllowance = {}; + } } -- cgit v1.2.3