Skip to content

Skipping transaction sync #5718

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

Merged
merged 2 commits into from
Aug 15, 2025
Merged

Skipping transaction sync #5718

merged 2 commits into from
Aug 15, 2025

Conversation

SeniorZhai
Copy link
Member

No description provided.

@SeniorZhai SeniorZhai requested a review from Copilot August 8, 2025 23:35
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a check to skip transaction synchronization when the destination address does not exist in the local database. The change prevents unnecessary database operations for addresses that are not tracked locally.

Key changes:

  • Added validation to check if address exists before syncing transactions
  • Early return mechanism to skip sync for non-existent addresses

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
RefreshWeb3TransactionsJob.kt Added address existence check before inserting transactions
Web3AddressDao.kt Added new query method to check if address exists in database

Comment on lines +57 to +60
if (!web3AddressDao.addressMatch(destination)) {
Timber.d("Address $destination does not exist in local database, skipping transaction sync")
return@requestRouteAPI null
}
Copy link
Preview

Copilot AI Aug 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The address existence check is performed after fetching transactions from the API. Consider moving this check before the API call to avoid unnecessary network requests for non-existent addresses.

Suggested change
if (!web3AddressDao.addressMatch(destination)) {
Timber.d("Address $destination does not exist in local database, skipping transaction sync")
return@requestRouteAPI null
}

Copilot uses AI. Check for mistakes.

@crossle crossle merged commit ad70844 into master Aug 15, 2025
1 check passed
@crossle crossle deleted the opt/skip_sync branch August 15, 2025 09:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants