-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Optimism Bedrock Fix + New Gas Displays #19960
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. |
d686c19
to
4291c53
Compare
Builds ready [4291c53]
Page Load Metrics (1537 ± 52 ms)
Bundle size diffs [🚀 Bundle size reduced!]
|
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## develop #19960 +/- ##
===========================================
- Coverage 67.78% 67.78% -0.00%
===========================================
Files 1052 1053 +1
Lines 40816 40876 +60
Branches 10943 10955 +12
===========================================
+ Hits 27665 27704 +39
- Misses 13151 13172 +21 ☔ View full report in Codecov by Sentry. |
d5aeb78
to
bcba2ef
Compare
Builds ready [89e9ef2]
Page Load Metrics (1672 ± 42 ms)
Bundle size diffs [🚀 Bundle size reduced!]
|
89e9ef2
to
a9f2262
Compare
a9f2262
to
88ca79f
Compare
Builds ready [eec3426]
Page Load Metrics (1502 ± 37 ms)
Bundle size diffs [🚀 Bundle size reduced!]
|
eec3426
to
8ab1b8a
Compare
Builds ready [8ab1b8a]
Page Load Metrics (1491 ± 32 ms)
Bundle size diffs [🚀 Bundle size reduced!]
|
ui/hooks/useCurrencyDisplay.js
Outdated
@@ -53,18 +53,26 @@ export function useCurrencyDisplay( | |||
const isUserPreferredCurrency = currency === currentCurrency; | |||
|
|||
const value = useMemo(() => { | |||
let ethDisplayValue; | |||
console.log('Using display value: ', displayValue); |
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.
Console needs removal
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.
Hey @segun, Great start! I've left a few suggestions regarding UI and using the component library components instead of writing more CSS
ui/components/app/gas-details-item/gas-details-item-title/gas-details-item-title.js
Outdated
Show resolved
Hide resolved
ui/components/app/gas-details-item/gas-details-item-title/index.scss
Outdated
Show resolved
Hide resolved
ui/components/app/confirm-page-container/confirm-page-container-content/index.scss
Outdated
Show resolved
Hide resolved
baf82ac
to
b11f098
Compare
859de2c
to
727ef5e
Compare
66ca5b4
to
d83ac11
Compare
Builds ready [d83ac11]
Page Load Metrics (1289 ± 86 ms)
Bundle size diffs [🚀 Bundle size reduced!]
|
test/e2e/tests/address-book.spec.js
Outdated
|
||
await driver.clickElement({ text: 'Edit', tag: 'button' }); | ||
|
||
const [gasLimitInput, gasPriceInput] = await driver.findElements( | ||
'input[type="number"]', | ||
); | ||
await gasPriceInput.fill('8'); | ||
await gasLimitInput.fill('100000'); | ||
await driver.clickElement({ text: 'Save', tag: 'button' }); |
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.
Why is this needed? Can we not send from address book without editing gas? If much this should be a test case in the send spec, no? Edit gas price and limit before sending
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.
Yes we can, but I've noticed instances in the CI when this fails. I am not able to replicate these failures locally, but @seaona helped me troubleshoot CI and we found out that in the cases when this fails, the confirm button below is not enabled because the fee is too small.
So the tests passed locally but intermittently fail on CI. But with this fix it passes everytime on CI.
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.
humm ok that is interesting.. it feels that there's an issue with that test. We should try to get to the root cause of it instead of fixing by editing the gas values during the test (that seems to be a different test case). If the test is passing for now, I would recommend tackling the flaky test in different PR.
My suggestion is, do not change the test in this PR and create a task to address the specific test later and add it to our board.
what do you think?
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.
Sure done that
css: '.transaction-detail-item:nth-of-type(1) h6:nth-of-type(2)', | ||
text: '0.04503836 ETH', | ||
css: '.currency-display-component__text', | ||
text: '0.05684869', |
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.
Is there a reason for the different amount?
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.
Not sure, but tests are not passing with old value
ui/components/app/fee-details-component/fee-details-component.js
Outdated
Show resolved
Hide resolved
ui/pages/confirm-transaction-base/confirm-transaction-base.test.js
Outdated
Show resolved
Hide resolved
This is the 1st commit message: Add border and padding to gas component. Signed-off-by: Olusegun Akintayo <akintayo.segun@gmail.com> refine css Signed-off-by: Olusegun Akintayo <akintayo.segun@gmail.com> Base Accordion component Signed-off-by: Olusegun Akintayo <akintayo.segun@gmail.com> Show fee details if supports eip 1559 Signed-off-by: Olusegun Akintayo <akintayo.segun@gmail.com> Show maxFeePerGas as optimism fee. Show L1 fee where available Signed-off-by: Olusegun Akintayo <akintayo.segun@gmail.com> Display L2 values in GWEI Signed-off-by: Olusegun Akintayo <akintayo.segun@gmail.com> Max fee per gas no longer needed in opts Signed-off-by: Olusegun Akintayo <akintayo.segun@gmail.com> remove new line Signed-off-by: Olusegun Akintayo <akintayo.segun@gmail.com> Add new edit gas icon component. Signed-off-by: Olusegun Akintayo <akintayo.segun@gmail.com> fix some UI alignment issues show fee details before transaction details. Fix Optimism edge case. Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com> Fix snapshop Rebase Fix snapshots fix snaphot Fix conflicts Fix snapshot Fixed snapshot fix snapshot Fix e2e fix e2e Fix snapshots. Fix account token list spec fix flaky tests. Fix snapshot Fix snapshots
9878402
to
961b1b4
Compare
Builds ready [da9663c]
Page Load Metrics (1395 ± 54 ms)
Bundle size diffs [🚀 Bundle size reduced!]
|
Missing release label release-11.8.0 on PR. Adding release label release-11.8.0 on PR and removing other release labels(release-11.9.0), as PR was added to branch 11.8.0 when release was cut. |
Explanation
This PR has lots of changes, but most of them are i18n messages and fixes to existing e2e and unit tests. So it's not all that daunting. Thanks for the review ;)
Problem: the Optimism Bedrock upgrade, which adds support to EIP1559, happened on June 6th.
Now, we see some issues with the current gas displays
0
on any the suggested gas fees options. This seems to be a rounding issue - fees are so low in the L2 that we end up displaying a0
for all the optionsThe bug in code is that we always try to display the values in ETH, But the Optimism fees are sent from the backend in GWEI, the fix is to check if the ETH conversion is zero and then use GWEI conversion, if that is also zero, we then use WEI conversion.
Screenshots/Screencaps
Before
After
Manual Testing Steps
Pre-merge author checklist
Pre-merge reviewer checklist
If further QA is required (e.g. new feature, complex testing steps, large refactor), add the
Extension QA Board
label.In this case, a QA Engineer approval will be be required.