-
-
Notifications
You must be signed in to change notification settings - Fork 326
feat(suite-native:) EIP1559 #23637
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
base: develop
Are you sure you want to change the base?
feat(suite-native:) EIP1559 #23637
Conversation
ff612aa to
87ca729
Compare
|
β
Previously successful run of [Test] PR Suite Web e2e tests workflow has been found. |
e32b080 to
9697e62
Compare
|
β
Previously successful run of [Test] PR Suite Desktop e2e tests workflow has been found. |
117e4dd to
b8050d4
Compare
b8050d4 to
9736b84
Compare
| return formatDuration(networkFeeInfo.blockTime * feeLevel.blocks * 60); | ||
| const networkType = symbol ? getNetworkType(symbol) : null; | ||
|
|
||
| const multiplier = networkType === 'bitcoin' ? 60 : 1; |
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.
please explain multiplier by a comment
d230002 to
d220f38
Compare
d220f38 to
422d2ef
Compare
TomasBoda
left a comment
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.
TomasBoda
left a comment
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.
During transaction signing and confirming on Trezor, the send amount and fee amount changed after a few seconds on the mobile screen. I guess there is some recalculation happening, but I believe it shouldn't. Because after this change, Trezor and mobile app were showing different amounts.
I'll try to replicate.
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.
Minor detail (you may dismiss if not relevant):
In case of Max fee per gas is lower than Max priority fee per gas, both input fields are invalid and both show analogous errors. Wouldn't it be better to show just one error banner below the form? cc @matous-jemelka @shenkys
Also, shouldn't the Confirm custom fee button be in disabled state in case of any erros?
|
|
||
| const defaultProps = { | ||
| selectedFeeLevel: 'normal' as NativeSupportedFeeLevel, | ||
| selectedFeeLevel: 'normal' as FeeLevelLabel, |
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.
Nitpick:
| selectedFeeLevel: 'normal' as FeeLevelLabel, | |
| selectedFeeLevel: 'normal' as const, |
| it('should render fee options list when selected fee level is not custom', async () => { | ||
| const { getByTestId } = await renderFeesContent({ | ||
| selectedFeeLevel: 'normal' as NativeSupportedFeeLevel, | ||
| selectedFeeLevel: 'normal' as FeeLevelLabel, |
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 type casting needed here? (similarly in cases below)
| onChangeText={handleFieldChangeValue(FEE_LIMIT_FIELD_NAME, integerTransformer)} | ||
| /> | ||
| )} | ||
| {isEip1559Fee ? ( |
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.
This component is not yet large and complex, but I'd consider creating two new components - one for EIP1559, one for the else branch for better maintainability in the future.
(or at least for the EIP1559 logic)
| ( | ||
| feeLevel: FeeLevelLabel, | ||
| customFeePerUnit?: string, | ||
| customFeeLimit?: string, | ||
| customMaxFeePerGas?: string, | ||
| customMaxPriorityFeePerGas?: string, | ||
| ) => { |
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.
Consider passing the props as object, especially when you created the new CustomFeeParams object (almost identical). Also it is more readable when the function is called on other places.
| networkFeeInfo, | ||
| symbol: account?.symbol, | ||
| minimalFeeLimit, | ||
| translate, |
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 translate needed here?


Description
Enable EIP1559 for mobile
Notes for QA
Related Issue
Resolve #16372
Screenshots:
ππ₯οΈ Suite web test results: View in Currents
ππ₯οΈ Suite desktop test results: View in Currents
ππ₯οΈ Suite native android test results: View in Currents