Skip to content

Commit

Permalink
fix: duplicate latest migrate contract (#316)
Browse files Browse the repository at this point in the history
  • Loading branch information
phamphong9981 authored Aug 15, 2023
1 parent 4602472 commit ed3740d
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/services/crawl-cosmwasm/crawl_smart_contract.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -182,10 +182,12 @@ export default class CrawlSmartContractService extends BullableService {
'code_id',
codeContractValues.map((contract) => contract.codeId)
),
SmartContract.query().whereIn(
'address',
codeContractValues.map((contract) => contract.address)
),
SmartContract.query()
.whereIn(
'address',
codeContractValues.map((contract) => contract.address)
)
.andWhere('status', SmartContract.STATUS.LATEST),
]);
const codeContractsByKey = _.keyBy(contractsWithMigrateCode, 'code_id');

Expand Down

0 comments on commit ed3740d

Please sign in to comment.