-
Notifications
You must be signed in to change notification settings - Fork 119
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
feat: shielded sync improvements #1441
Conversation
a718ba8
to
9b164bd
Compare
65abd93
to
6138a70
Compare
@@ -75,13 +77,14 @@ export function shieldedSync( | |||
|
|||
export const fetchShieldedBalance = async ( | |||
viewingKey: DatedViewingKey, | |||
addresses: string[] | |||
addresses: string[], | |||
chainId: string | |||
): Promise<Balance> => { | |||
// TODO mock shielded balance |
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.
Can you delete from here as well?
@@ -73,13 +83,6 @@ export const ShieldedBalanceChart = (): JSX.Element => { | |||
|
|||
useEffect(() => { | |||
shieledSync(); | |||
|
|||
const timeoutId = setTimeout(() => { |
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 original idea here is to avoid flashing a "100%" in case it syncs quickly (less than 3s)
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.
Yeah! I changed it because I had some problems getting right behavior when navigating from settings. RIght now instead of timeout it does this:
// If total is more than one batch of 100, show progress
if (total > 100) {
setShowSyncProgress(true);
}
so we show progress immediately but only if there is more than 100 blocks to fetch and parse :)
This can probably be improved more, because it takes longer to fetch without masp indexer, but it should be fine for now
798eaaa
to
fe3723d
Compare
fe3723d
to
d086607
Compare
Resolves #1420 and #1439
invalidate.shielded.sync.mp4