Skip to content

Commit

Permalink
Skip tokens without data
Browse files Browse the repository at this point in the history
  • Loading branch information
skakac committed Oct 14, 2024
1 parent 3f76ec9 commit 7fe0132
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@solflare-wallet/utl-api",
"version": "1.0.4",
"version": "1.0.5",
"scripts": {
"start:api": "ts-node src/api.ts",
"dev:api": "nodemon src/api.ts",
Expand Down
5 changes: 4 additions & 1 deletion src/jobs/sync.job.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ async function handle() {
tokens: Token[]
}>(cdnUrl)

const newTokens = response.data.tokens
const newTokens = response.data.tokens.filter((token) => {
return token.address && token.chainId && token.name && token.symbol && token.decimals
})

const currentTokens = await TokenModel.find({})

LoggerUtil.info(
Expand Down

0 comments on commit 7fe0132

Please sign in to comment.