-
Notifications
You must be signed in to change notification settings - Fork 5k
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
feat: Add new completion_time_onchain property to Transaction Finalized events #29474
base: main
Are you sure you want to change the base?
Conversation
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
completion_time_onchain
property to Transaction Finalized events
completion_time_onchain
property to Transaction Finalized events673ca86
to
af59f40
Compare
Builds ready [af59f40]
Page Load Metrics (1837 ± 182 ms)
|
03f5006
to
be72aa4
Compare
Builds ready [be72aa4]
Page Load Metrics (1546 ± 42 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
@@ -828,6 +829,67 @@ describe('Transaction metrics', () => { | |||
mockTransactionMetricsRequest.finalizeEventFragment, | |||
).toHaveBeenCalledWith(expectedUniqueId); | |||
}); | |||
|
|||
it.only('should create, update, finalize event fragment with completion_time_onchain', async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
only
accidental?
|
||
const blockTimestampSeconds = Number(hexToDecimal(blockTimestampHex)); | ||
const completionTimeSeconds = blockTimestampSeconds - submittedTimeMs / 1000; | ||
const completionTimeSecondsRoundedToThousands = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be completionTimeSecondsRoundedToHundredths
or even completionTimeSecondsRounded
for simplicity?
be72aa4
to
0b99632
Compare
Builds ready [0b99632]
Page Load Metrics (1722 ± 73 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Description
The new property
completion_time_onchain
has the number of seconds (rounded to the hundredths) between submitted time and the block timestamp.This number is necessarily lower than the previously existing
completion_time
property, which captures the time between block validation and UI finalization and depends on the polling interval.Related issues
Fixes: https://github.com/MetaMask/MetaMask-planning/issues/3503
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist