-
Notifications
You must be signed in to change notification settings - Fork 563
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pause timer on fetch #1756
Merged
Merged
Pause timer on fetch #1756
Conversation
This file contains 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
FrederikBolding
force-pushed
the
fb/pause-on-fetch
branch
from
September 20, 2023 12:18
027279c
to
7bece28
Compare
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #1756 +/- ##
==========================================
- Coverage 96.15% 96.03% -0.12%
==========================================
Files 263 263
Lines 6086 6129 +43
Branches 989 991 +2
==========================================
+ Hits 5852 5886 +34
- Misses 234 243 +9 ☔ View full report in Codecov by Sentry. |
FrederikBolding
force-pushed
the
fb/pause-on-fetch
branch
from
September 21, 2023 06:44
cb3315f
to
6fb79d6
Compare
FrederikBolding
force-pushed
the
fb/pause-on-fetch
branch
from
October 5, 2023 12:46
6779bc4
to
582a715
Compare
FrederikBolding
force-pushed
the
fb/pause-on-fetch
branch
from
October 18, 2023 13:53
582a715
to
34caa18
Compare
FrederikBolding
force-pushed
the
fb/pause-on-fetch
branch
from
November 1, 2023 14:54
34caa18
to
57996bc
Compare
david0xd
reviewed
Nov 1, 2023
packages/snaps-execution-environments/src/common/endowments/network.ts
Outdated
Show resolved
Hide resolved
david0xd
reviewed
Nov 1, 2023
david0xd
reviewed
Nov 1, 2023
packages/snaps-execution-environments/src/common/BaseSnapExecutor.test.browser.ts
Show resolved
Hide resolved
david0xd
reviewed
Nov 1, 2023
packages/snaps-execution-environments/src/common/endowments/network.ts
Outdated
Show resolved
Hide resolved
FrederikBolding
force-pushed
the
fb/pause-on-fetch
branch
from
November 2, 2023 09:17
5bc6d65
to
9b70999
Compare
david0xd
reviewed
Nov 2, 2023
packages/snaps-execution-environments/src/common/endowments/network.ts
Outdated
Show resolved
Hide resolved
FrederikBolding
force-pushed
the
fb/pause-on-fetch
branch
2 times, most recently
from
November 9, 2023 08:58
a0bccd3
to
0e044db
Compare
FrederikBolding
force-pushed
the
fb/pause-on-fetch
branch
from
November 15, 2023 09:12
f5fe7f6
to
7061d59
Compare
david0xd
approved these changes
Nov 15, 2023
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 notifications from the network access endowment that are sent during fetch. Calling
fetch
will result inOutboundRequest
upfront andOutboundResponse
once the promise resolves. Furthermore, once per response object, triggering an async action, e.g.json()
will also triggerOutboundRequest
upfront andOutboundResponse
once the promise resolves. The notifications pause the request processing timer in the same way that requests viasnap.request
andethereum.request
pause the timer.This PR also refactors the endowment creation slightly to make it take an options bag and always require an endowment array.
Closes #1755