Skip to content

Commit

Permalink
fix: execution reverted (#106)
Browse files Browse the repository at this point in the history
close #106 #104
  • Loading branch information
aahna-ashina committed Oct 11, 2023
1 parent c15a29b commit 4eec91b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion data-sources/citizens/generate-citizen-count-csv.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,12 @@ async function getNextId(): Promise<number> {

async function getTimestamp(id: number): Promise<number> {
console.info('getTimestamp, id:', id)
return await PassportContract.methods.timestampOf(id).call()
try {
return await PassportContract.methods.timestampOf(id).call()
} catch (err) {
console.error('err:', err)
return 0
}
}

function getTotalExpiredPassports(weekEndDate: Date, maxPassportID: number): number {
Expand Down

0 comments on commit 4eec91b

Please sign in to comment.