-
Notifications
You must be signed in to change notification settings - Fork 585
fix(send-flow-snap): add missing displayAvatar
props, add tests, update snaps-simulation
#3312
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
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3312 +/- ##
=======================================
Coverage 97.79% 97.80%
=======================================
Files 363 364 +1
Lines 9893 9911 +18
Branches 1613 1616 +3
=======================================
+ Hits 9675 9693 +18
Misses 218 218 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Updated the formatting for this SVG (and the ones below) to a consistent flat format since jest flattens it and the SVG transformer picks up the file content with format.
// Transform SVG files using our custom transformer | ||
transform: { | ||
...baseConfig.transform, | ||
'\\.svg$': '<rootDir>/test/transformers/svgTransformer.js', |
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.
Needed to write a transformer for jest to be able to handle SVGs.
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.
)+
displayAvatar
props displayAvatar
props, add tests, update snaps-simulation
packages/examples/packages/send-flow/test/transformers/svgTransformer.js
Outdated
Show resolved
Hide resolved
…and tests for printing error messages, add const for tracking typeable inputs
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.
The send-flow example snap is only passing the
displayAvatar
prop in theto
scenario but not in the others. This can land you in a situation where you paste a valid address in the to field, start to type an amount in the amount field, then the avatar disappears because nodisplayAvatar
prop is being passed.Summary of changes
onUserInput
code to properly pass thedisplayAvatar
prop in all scenarios.typeInField
insnaps-simulation
so that it properly attaches thechainId
to the input value.