-
Notifications
You must be signed in to change notification settings - Fork 433
Add 'reason' context of a sync + add BridgeSync test #859
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
🦋 Changeset detectedLatest commit: f7cc2c8 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Screenshots: ✅
There are no changes in the screenshots for this PR. If this is expected, you are good to go. |
Codecov Report
@@ Coverage Diff @@
## develop #859 +/- ##
========================================
Coverage 47.50% 47.50%
========================================
Files 620 620
Lines 27867 27867
Branches 7174 7174
========================================
Hits 13237 13237
Misses 13497 13497
Partials 1133 1133
Flags with carried forward coverage won't be shown. Click here to find out more. Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
📝 Description
Ledger Live is producing a lot of synchronisation and in context of investing how to optimize them, I'm adding in the context of the trigger of a (re-)synchronisation the actual "reason".
Here are the reasons I have put in, it should cover all cases of sync():
initial
: sync accounts at bootbackground
: regularly synchronizing accounts in backgrounduser-click
: LLD action on the top bar to re-synchronizeview-account
: triggered when opening a given account (apparently only happening on LLD)user-pull-to-refresh-one-account
: on LLM, user pull to refresh on a given accountuser-pull-to-refresh
: on LLM, user pull to refresh all the accountstransaction-flow-init
: for any transactional flowpending-operations
: user just did a transaction, we're actively polling for an account updatetokens-ignore-list-change
: the list of tokens to ignore is changednew-accounts
: on LLM, new accounts are getting importedpolkadot-bond-loading
,tron-power-load
: some specific usecases of doing a sync for these coinsone-account
(fallback of using SyncOneAccountOnMount if the reason wasn't precised, not used yet)limitation: there is a built-in mechanics that debounce the events to analytics, we don't send a SyncSuccess again after 90s on a same accountId, it may false the statistics a bit.
The first
BridgeSync
test!This PR also introduces for the first time some tests on BridgeSync.tsx, component that we saw recently that was lacking of tests. I've been able to actually unit test the analytics usage of that component. I had to polyfill the jest jsdom environement (polkadot: requires to define TextEncoder, solana/celo: indirectly depends on 'uuid' which causes issue on Jest so i had to mock it)
❓ Context
all
LIVE-3236
✅ Checklist
📸 Demo
🚀 Expectations to reach
Please make sure you follow these Important Steps.
Pull Requests must pass the CI and be internally validated in order to be merged.