aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/stores/balance_proxy_allowance_lazy_store.ts10
-rw-r--r--src/stores/order_filled_cancelled_lazy_store.ts6
2 files changed, 16 insertions, 0 deletions
diff --git a/src/stores/balance_proxy_allowance_lazy_store.ts b/src/stores/balance_proxy_allowance_lazy_store.ts
index 2580fd449..92a6aaa51 100644
--- a/src/stores/balance_proxy_allowance_lazy_store.ts
+++ b/src/stores/balance_proxy_allowance_lazy_store.ts
@@ -42,6 +42,11 @@ export class BalanceAndProxyAllowanceLazyStore {
}
this.balance[tokenAddress][userAddress] = balance;
}
+ public deleteBalance(tokenAddress: string, userAddress: string): void {
+ if (!_.isUndefined(this.balance[tokenAddress])) {
+ delete this.balance[tokenAddress][userAddress];
+ }
+ }
public async getProxyAllowanceAsync(tokenAddress: string, userAddress: string): Promise<BigNumber> {
if (_.isUndefined(this.proxyAllowance[tokenAddress]) ||
_.isUndefined(this.proxyAllowance[tokenAddress][userAddress])) {
@@ -60,4 +65,9 @@ export class BalanceAndProxyAllowanceLazyStore {
}
this.proxyAllowance[tokenAddress][userAddress] = proxyAllowance;
}
+ public deleteProxyAllowance(tokenAddress: string, userAddress: string): void {
+ if (!_.isUndefined(this.proxyAllowance[tokenAddress])) {
+ delete this.proxyAllowance[tokenAddress][userAddress];
+ }
+ }
}
diff --git a/src/stores/order_filled_cancelled_lazy_store.ts b/src/stores/order_filled_cancelled_lazy_store.ts
index beb8fe6d7..cb4c786f3 100644
--- a/src/stores/order_filled_cancelled_lazy_store.ts
+++ b/src/stores/order_filled_cancelled_lazy_store.ts
@@ -35,6 +35,9 @@ export class OrderFilledCancelledLazyStore {
public setFilledTakerAmount(orderHash: string, filledTakerAmount: BigNumber): void {
this.filledTakerAmount[orderHash] = filledTakerAmount;
}
+ public deleteFilledTakerAmount(orderHash: string): void {
+ delete this.filledTakerAmount[orderHash];
+ }
public async getCancelledTakerAmountAsync(orderHash: string): Promise<BigNumber> {
if (_.isUndefined(this.cancelledTakerAmount[orderHash])) {
const methodOpts = {
@@ -49,4 +52,7 @@ export class OrderFilledCancelledLazyStore {
public setCancelledTakerAmount(orderHash: string, cancelledTakerAmount: BigNumber): void {
this.cancelledTakerAmount[orderHash] = cancelledTakerAmount;
}
+ public deleteCancelledTakerAmount(orderHash: string): void {
+ delete this.cancelledTakerAmount[orderHash];
+ }
}