aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/local_storage/trade_history_storage.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'packages/website/ts/local_storage/trade_history_storage.tsx')
-rw-r--r--packages/website/ts/local_storage/trade_history_storage.tsx12
1 files changed, 6 insertions, 6 deletions
diff --git a/packages/website/ts/local_storage/trade_history_storage.tsx b/packages/website/ts/local_storage/trade_history_storage.tsx
index df731236e..cc764d98e 100644
--- a/packages/website/ts/local_storage/trade_history_storage.tsx
+++ b/packages/website/ts/local_storage/trade_history_storage.tsx
@@ -14,7 +14,7 @@ export const tradeHistoryStorage = {
// Clear all fill related localStorage if we've updated the config variable in an update
// that introduced a backward incompatible change requiring the user to re-fetch the fills from
// the blockchain
- clearIfRequired() {
+ clearIfRequired(): void {
const lastClearFillDate = localStorage.getItemIfExists(FILL_CLEAR_KEY);
if (lastClearFillDate !== configs.LAST_LOCAL_STORAGE_FILL_CLEARANCE_DATE) {
const localStorageKeys = localStorage.getAllKeys();
@@ -26,7 +26,7 @@ export const tradeHistoryStorage = {
}
localStorage.setItem(FILL_CLEAR_KEY, configs.LAST_LOCAL_STORAGE_FILL_CLEARANCE_DATE);
},
- addFillToUser(userAddress: string, networkId: number, fill: Fill) {
+ addFillToUser(userAddress: string, networkId: number, fill: Fill): void {
const fillsByHash = this.getUserFillsByHash(userAddress, networkId);
const fillHash = this._getFillHash(fill);
const doesFillExist = !_.isUndefined(fillsByHash[fillHash]);
@@ -38,7 +38,7 @@ export const tradeHistoryStorage = {
const userFillsKey = this._getUserFillsKey(userAddress, networkId);
localStorage.setItem(userFillsKey, userFillsJSONString);
},
- removeFillFromUser(userAddress: string, networkId: number, fill: Fill) {
+ removeFillFromUser(userAddress: string, networkId: number, fill: Fill): void {
const fillsByHash = this.getUserFillsByHash(userAddress, networkId);
const fillHash = this._getFillHash(fill);
const doesFillExist = !_.isUndefined(fillsByHash[fillHash]);
@@ -74,15 +74,15 @@ export const tradeHistoryStorage = {
const blockNumber = _.parseInt(blockNumberStr);
return blockNumber;
},
- setFillsLatestBlock(userAddress: string, networkId: number, blockNumber: number) {
+ setFillsLatestBlock(userAddress: string, networkId: number, blockNumber: number): void {
const userFillsLatestBlockKey = this._getFillsLatestBlockKey(userAddress, networkId);
localStorage.setItem(userFillsLatestBlockKey, `${blockNumber}`);
},
- _getUserFillsKey(userAddress: string, networkId: number) {
+ _getUserFillsKey(userAddress: string, networkId: number): string {
const userFillsKey = `${FILLS_KEY}-${userAddress}-${networkId}`;
return userFillsKey;
},
- _getFillsLatestBlockKey(userAddress: string, networkId: number) {
+ _getFillsLatestBlockKey(userAddress: string, networkId: number): string {
const userFillsLatestBlockKey = `${FILLS_LATEST_BLOCK}-${userAddress}-${networkId}`;
return userFillsLatestBlockKey;
},