vocdoni / census3

Golang library and a HTTP/API service that can be used to fetch an updated list of token holders for a Ethereum ERC20, ERC721, ERC777, or other external providers (ex. POAPs or GitcoinPassport).
GNU Affero General Public License v3.0
9 stars 2 forks source link

bug: newly created tokens with synced: true and no holders #166

Closed lucasmenendez closed 9 months ago

lucasmenendez commented 9 months ago

Solves #164.

Summary by CodeRabbit

github-actions[bot] commented 9 months ago

Image description CodeRabbit

Walkthrough

The changes primarily focus on enhancing the SaveHolders function in scanner.go. The modifications include reordering operations, refining debug logs, and updating token status in the database. The check for empty holders has been relocated to improve logic flow. Debug information printing has also been updated for better clarity.

Changes

File Summary
scanner/scanner.go Restructured SaveHolders function with improved operation ordering, refined debug logs, and updated token status handling in the database. Moved the check for empty holders for better logic flow and updated debug information printing.

🐇💻

In the land of code, where the functions play, A rabbit hopped by, making changes along the way. With a twitch of his nose, and a flick of his ear, He tidied up the code, making everything clear. Now the scanner scans, with nary a blunder, Thanks to our rabbit, it's no wonder! So let's hop together, in this coding endeavor, With every pull request, we're getting better and better! 🎉🥕


Uplevel your code reviews with CodeRabbit Pro ### CodeRabbit Pro If you like this project, please support us by purchasing the [Pro version](https://coderabbit.ai). The Pro version has advanced context, superior noise reduction and several proprietary improvements compared to the open source version. Moreover, CodeRabbit Pro is free for open source projects.