Skip to content

Commit

Permalink
fix: disable FF1 NAV (#242)
Browse files Browse the repository at this point in the history
* fix: use tryAggregate

* fix: update multicall address and abi

* fix: parsing multicall results

* fix: disable ff1 nav for a while

* fix: check address

---------

Co-authored-by: Filippo <[email protected]>
  • Loading branch information
hieronx and filo87 authored Oct 31, 2024
1 parent 7401c59 commit 187f497
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export const CPREC = (digits: number) => bnToBn(10).pow(bnToBn(digits))
export const DAIName = 'Dai Stablecoin'
export const DAISymbol = 'DAI'
export const DAIMainnetAddress = '0x6b175474e89094c44da98b954eedeac495271d0f'
export const multicallAddress = '0xeefba1e63905ef1d7acba5a8513c70307c1ce441'
export const multicallAddress = '0xcA11bde05977b3631167028862bE2a173976CA11'

export const tinlakePools = [
{
Expand Down
5 changes: 2 additions & 3 deletions src/mappings/handlers/ethHandlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ async function _handleEthBlock(block: EthereumBlock): Promise<void> {
result: '',
})
}
if (latestReserve) {
if (latestReserve?.address) {
poolUpdateCalls.push({
id: tinlakePool.id,
type: 'totalBalance',
Expand All @@ -104,7 +104,6 @@ async function _handleEthBlock(block: EthereumBlock): Promise<void> {
const latestReserve = getLatestContract(tinlakePool?.reserve, blockNumber)
const pool = await PoolService.getOrSeed(tinlakePool?.id, false, false, blockchain.id)

// Update pool
if (callResult.type === 'currentNAV' && latestNavFeed) {
const currentNAV =
tinlakePool.id === ALT_1_POOL_ID && blockNumber > ALT_1_END_BLOCK
Expand Down Expand Up @@ -136,7 +135,7 @@ async function _handleEthBlock(block: EthereumBlock): Promise<void> {
}

// Update loans (only index if fully synced)
if (latestNavFeed && date.toDateString() === new Date().toDateString()) {
if (latestNavFeed?.address && date.toDateString() === new Date().toDateString()) {
await updateLoans(
tinlakePool?.id as string,
date,
Expand Down

0 comments on commit 187f497

Please sign in to comment.