Skip to content

Commit

Permalink
fix: skip failing calls for Fortunafi 1 (#243)
Browse files Browse the repository at this point in the history
  • Loading branch information
filo87 authored Aug 16, 2024
1 parent 42bc43c commit 0546595
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
14 changes: 14 additions & 0 deletions smoke-tests/snapshots.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,17 @@ describe('Entities snapshots', () => {
expect(totalCount).toBeGreaterThan(0)
})
})

describe('All SnapshotPeriods', () => {
test('should have pool snapshots', async () => {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const subqlResponse = await subql<any>(`{
snapshotPeriods(
orderBy: ID_ASC,
filter: {poolSnapshots: {aggregates: {distinctCount: {id: {equalTo: "0"}}}}})
{ totalCount }
}`)
const { totalCount } = subqlResponse.data['snapshotPeriods']
expect(totalCount).toBe(0)
})
})
1 change: 1 addition & 0 deletions src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ export const tinlakePools = [
startBlock: 11282587,
navFeed: [
{ address: '0xcAB9ed8e5EF4607A97f4e22Ad1D984ADB93ce890', startBlock: 11282611 },
{ address: null, startBlock: 16537499 },
{ address: '0x887db3ee1166ddaf5f7df96b195912594112431e', startBlock: 16799275 },
],
reserve: [
Expand Down
2 changes: 1 addition & 1 deletion src/mappings/handlers/ethHandlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ async function _handleEthBlock(block: EthereumBlock): Promise<void> {
const latestNavFeed = getLatestContract(tinlakePool.navFeed, blockNumber)
const latestReserve = getLatestContract(tinlakePool.reserve, blockNumber)

if (latestNavFeed) {
if (latestNavFeed && latestNavFeed.address) {
poolUpdateCalls.push({
id: tinlakePool.id,
type: 'currentNAV',
Expand Down

0 comments on commit 0546595

Please sign in to comment.