mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
3e9d247d4b
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. |
||
---|---|---|
.. | ||
app | ||
design | ||
lib | ||
index.html | ||
index.js |