1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00
metamask-extension/ui/app/helpers/utils
Mark Stacey 3e9d247d4b
Fix fetch-with-cache (#7083)
The `fetch-with-cache` utility was failing to actually cache anything.
It would cache an object with cache time and URL, and would return that
instead of a valid response. This resulted in the error:
`TypeError: fourByteResponse.json is not a function`

The utility was updated to call `.json()` within itself, and cache the
JSON response. The function signature was updated as well, to expect an
options object instead of just the `cacheRefreshTime` option. The
timeout was added to this options object, which helped with testing.

The utility method now also handles unsuccessfull responses, and
incompatible `fetch` options.
2019-09-04 16:10:23 -03:00
..
common.util.js Folder restructure (#6304) 2019-03-21 20:33:30 -02:30
common.util.test.js Folder restructure (#6304) 2019-03-21 20:33:30 -02:30
confirm-tx.util.js Revert to providing inline defaults in getHexGasTotal and increaseLastGasPrice (#6361) 2019-03-29 12:47:58 -02:30
confirm-tx.util.test.js Folder restructure (#6304) 2019-03-21 20:33:30 -02:30
conversion-util.js Declare variables before use (#6806) 2019-07-05 14:01:34 -03:00
conversion-util.test.js Folder restructure (#6304) 2019-03-21 20:33:30 -02:30
conversions.util.js Improved UX for sweeping accounts (#6488) 2019-05-20 14:08:08 -02:30
fetch-with-cache.js Fix fetch-with-cache (#7083) 2019-09-04 16:10:23 -03:00
fetch-with-cache.test.js Fix fetch-with-cache (#7083) 2019-09-04 16:10:23 -03:00
fetch.js Add eslint dependency (#6842) 2019-07-15 10:15:49 -03:00
fetch.test.js 4byte fallback (#6551) 2019-06-18 09:47:14 -02:30
formatters.js Folder restructure (#6304) 2019-03-21 20:33:30 -02:30
i18n-helper.js Folder restructure (#6304) 2019-03-21 20:33:30 -02:30
metametrics.util.js MetaMetrics documentation (#6624) 2019-05-20 15:02:26 -02:30
switch-direction.js Right-to-left CSS (using module for conversion) (#7072) 2019-09-03 14:47:54 -03:00
token-util.js Fixes display of confirm screen token decimals by not relying on confirmTransaction state. 2019-06-28 01:51:33 -03:00
transactions.util.js Fix fetch-with-cache (#7083) 2019-09-04 16:10:23 -03:00
transactions.util.test.js Folder restructure (#6304) 2019-03-21 20:33:30 -02:30
util.js Address book name save fix (#6945) 2019-08-02 20:30:50 -02:30