chore/nowarnings Solve some of the warnings we have on LLM #2732
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.
📝 Description
Today I sat down and actually read the warnings that get thrown when we launch Ledger Live Mobile instead of dismissing them. How hard can it be to have an app without warnings or at least without errors? Let's go deeper.
'deprecated-react-native-prop-types'
warning, it doesn't seem to be coming from us and according to some guy on github it's safe to silence them.remoteliveappprovider
because we launch some async task and the component gets unmounted before it completes yet we try to update the state afterwards. Simply using theuseIsMounted
hook that was already available we can prevent this leak.Failed to fetch Firebase remote config..
it's kinda similar, fetching is async, and it gets cancelled because it gets unmounted. Checking that it's not unmounted before logging the error, no error.native-ui
package. They seem to come from components importing from theindex
of a parent instead of the specific component they rely on, soTimelineItem
which is under theLayout
folder, importingFlex
from../..
instead of from../../Flex
. No idea if there's a better way but changing the import removed the warning.react-native-crypto -> react-native-randombytes -> sjcl -> react-native-crypto
but that's no on our codebase, not sure how to tackle it, any help on this one would be much appreciated.null is not a valid color or brush
. I actually looked into this a while ago and remember precisely what it was. It's usage of "null" inside svg files for some of our icons. Luckily I didn't have to spend time because I have good memory. Essentiallystroke="null"
is invalid yet present inSGB.svg
andFTM.svg
This gave a warning when listing all currencies, ie add accounts.❓ Context
ledger-live-mobile, ledger-live-desktop, ledger-live-common, native-ui
✅ Checklist
📸 Demo
No demo
🚀 Expectations to reach
App should behave the same as far as QA is concerned, but for developers it should show less warnings.