Merged
Conversation
3 tasks
brunobar79
approved these changes
May 1, 2019
Contributor
brunobar79
left a comment
There was a problem hiding this comment.
Looks good. Some comments regarding fetch + timeout
src/AssetsDetectionController.ts
Outdated
| try { | ||
| /* istanbul ignore if */ | ||
| if (assetsController.openSeaApiKey) { | ||
| response = await timeoutFetch(api, { headers: { 'X-API-KEY': assetsController.openSeaApiKey } }, 2000); |
Contributor
There was a problem hiding this comment.
2 seconds it's too low. I'd go with at least 10-15. Remember the app might be used with not so great internet connections, which is usually not a problem in desktop.
Also move it to a constant at the top of the file specifying what it is for.
Contributor
Author
There was a problem hiding this comment.
good point, totally agree
src/AssetsDetectionController.ts
Outdated
| if (assetsController.openSeaApiKey) { | ||
| response = await timeoutFetch(api, { headers: { 'X-API-KEY': assetsController.openSeaApiKey } }, 2000); | ||
| } else { | ||
| response = await timeoutFetch(api, {}, 2000); |
Codecov Report
@@ Coverage Diff @@
## master #97 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 21 21
Lines 1408 1412 +4
Branches 181 180 -1
=====================================
+ Hits 1408 1412 +4
Continue to review full report at Codecov.
|
mcmire
pushed a commit
to mcmire/core
that referenced
this pull request
Jul 17, 2023
* 5.0.1 * Update changelog --------- Co-authored-by: github-actions <github-actions@github.com> Co-authored-by: Mark Stacey <markjstacey@gmail.com>
MajorLift
pushed a commit
that referenced
this pull request
Oct 11, 2023
* fetch timeout * handle fetch requests * ignore name and image condition * handle tests * update to 15 secs
MajorLift
pushed a commit
that referenced
this pull request
Oct 11, 2023
* fetch timeout * handle fetch requests * ignore name and image condition * handle tests * update to 15 secs
Mrtenz
pushed a commit
that referenced
this pull request
Oct 16, 2025
* Add missing workflows from template repo * Replace `.gitattributes`, `.editorconfig`, `.gitignore` with version from template repo * Add NPM scripts in template repo but missing here * Add `allow-scripts` and run it via `yarn setup` * Update TypeScript config to match template repo * Exclude test files * Use ES2020 `.d.ts` instead of ES2017 * Upgrade Node to v14 * Lint JSON files with `eslint-plugin-packagejson` instead of `prettier-plugin-json` * Update README to match template repo * Update and backfill changelog
Mrtenz
pushed a commit
that referenced
this pull request
Oct 16, 2025
…be used (#97) Co-authored-by: Prem Baranwal <premb@talentica.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds some improvements to assets detection:
safelyExecuteinside each individual assets detection methods,detectTokensanddetectCollectibles. With this we can use these methods directly and handle errors.imageornameare now accepted, following the EIP.fetchTimeoutto handle requests to external APIs.fetchTimeoutin collectibles detection.