Skip to content

Commit

Permalink
eslint: fix
Browse files Browse the repository at this point in the history
  • Loading branch information
nicov-iov committed Nov 28, 2024
1 parent 2dee946 commit 1b7958e
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions src/repositories/address.repository.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,18 @@ export function getAddressRepository (prismaClient) {

const prismaQuery = generateFindQuery(query, projection, include, sort, limit)
const rawAddresses = await prismaClient.address.findMany(prismaQuery)

return formatAddressesWithBalances(rawAddresses)
} else if (action === 'getTokens') {
const projection = {}
const include = {
[relatedTables.latestBalance]: true,
}

const prismaQuery = generateFindQuery(query, projection, include, sort, limit)
const rawTokens = await prismaClient.address.findMany(prismaQuery)
return formatAddressesWithBalances(rawTokens)
const projection = {}
const include = {
[relatedTables.latestBalance]: true
}

const prismaQuery = generateFindQuery(query, projection, include, sort, limit)
const rawTokens = await prismaClient.address.findMany(prismaQuery)

return formatAddressesWithBalances(rawTokens)
}
}

Expand Down Expand Up @@ -152,7 +152,6 @@ function generateSaveContractQueries (data, prismaClient, upserting) {
return transactionQueries
}


function formatAddressesWithBalances (rawAddresses) {
return rawAddresses.map(address => {
if (address[relatedTables.latestBalance]) {
Expand Down

0 comments on commit 1b7958e

Please sign in to comment.