diff options
author | Fabio Berger <me@fabioberger.com> | 2017-12-19 02:30:25 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2017-12-19 02:30:25 +0800 |
commit | fb0b7efc4563c7c561866ab8691361ce6919160b (patch) | |
tree | dbbf76c091be331f8a44ed5b7569c7c4742f6fa3 /packages/website/ts/local_storage | |
parent | 400228e139a5c74302f1a16b8ca5c43ea4843307 (diff) | |
download | dexon-sol-tools-fb0b7efc4563c7c561866ab8691361ce6919160b.tar.gz dexon-sol-tools-fb0b7efc4563c7c561866ab8691361ce6919160b.tar.zst dexon-sol-tools-fb0b7efc4563c7c561866ab8691361ce6919160b.zip |
Refactor configs and constants, standardize on uppercase/snakecase, alphebetize, rename for logical grouping
Diffstat (limited to 'packages/website/ts/local_storage')
-rw-r--r-- | packages/website/ts/local_storage/tracked_token_storage.ts | 4 | ||||
-rw-r--r-- | packages/website/ts/local_storage/trade_history_storage.tsx | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/packages/website/ts/local_storage/tracked_token_storage.ts b/packages/website/ts/local_storage/tracked_token_storage.ts index 086b06af5..f51368289 100644 --- a/packages/website/ts/local_storage/tracked_token_storage.ts +++ b/packages/website/ts/local_storage/tracked_token_storage.ts @@ -11,10 +11,10 @@ export const trackedTokenStorage = { // that introduced a backward incompatible change requiring the tracked tokens to be re-set clearIfRequired() { const lastClearFillDate = localStorage.getItemIfExists(TRACKED_TOKENS_CLEAR_KEY); - if (lastClearFillDate !== configs.lastLocalStorageTrackedTokenClearanceDate) { + if (lastClearFillDate !== configs.LAST_LOCAL_STORAGE_TRACKED_TOKEN_CLEARANCE_DATE) { localStorage.removeItem(TRACKED_TOKENS_KEY); } - localStorage.setItem(TRACKED_TOKENS_CLEAR_KEY, configs.lastLocalStorageTrackedTokenClearanceDate); + localStorage.setItem(TRACKED_TOKENS_CLEAR_KEY, configs.LAST_LOCAL_STORAGE_TRACKED_TOKEN_CLEARANCE_DATE); }, addTrackedTokenToUser(userAddress: string, networkId: number, token: Token) { const trackedTokensByUserAddress = this.getTrackedTokensByUserAddress(); diff --git a/packages/website/ts/local_storage/trade_history_storage.tsx b/packages/website/ts/local_storage/trade_history_storage.tsx index 0d627e000..a54844ea7 100644 --- a/packages/website/ts/local_storage/trade_history_storage.tsx +++ b/packages/website/ts/local_storage/trade_history_storage.tsx @@ -16,7 +16,7 @@ export const tradeHistoryStorage = { // the blockchain clearIfRequired() { const lastClearFillDate = localStorage.getItemIfExists(FILL_CLEAR_KEY); - if (lastClearFillDate !== configs.lastLocalStorageFillClearanceDate) { + if (lastClearFillDate !== configs.LAST_LOCAL_STORAGE_FILL_CLEARANCE_DATE) { const localStorageKeys = localStorage.getAllKeys(); _.each(localStorageKeys, key => { if (_.startsWith(key, `${FILLS_KEY}-`) || _.startsWith(key, `${FILLS_LATEST_BLOCK}-`)) { @@ -24,7 +24,7 @@ export const tradeHistoryStorage = { } }); } - localStorage.setItem(FILL_CLEAR_KEY, configs.lastLocalStorageFillClearanceDate); + localStorage.setItem(FILL_CLEAR_KEY, configs.LAST_LOCAL_STORAGE_FILL_CLEARANCE_DATE); }, addFillToUser(userAddress: string, networkId: number, fill: Fill) { const fillsByHash = this.getUserFillsByHash(userAddress, networkId); |