Skip to content

Commit

Permalink
fix: try name before hardcoded overrides
Browse files Browse the repository at this point in the history
  • Loading branch information
coreyar committed Dec 18, 2024
1 parent e1f4e1c commit 3b8ef07
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions subgraphs/isolated-pools/src/operations/create.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Address, BigInt, Bytes } from '@graphprotocol/graph-ts';
import { Address, BigInt, Bytes, log } from '@graphprotocol/graph-ts';

Check failure on line 1 in subgraphs/isolated-pools/src/operations/create.ts

View workflow job for this annotation

GitHub Actions / lint

'log' is defined but never used. Allowed unused vars must match /_/u

import { Comptroller as ComptrollerContract } from '../../generated/PoolRegistry/Comptroller';
import { PoolRegistry as PoolRegistryContract } from '../../generated/PoolRegistry/PoolRegistry';
Expand Down Expand Up @@ -112,7 +112,10 @@ export function createMarket(
market.address = vTokenAddress;
market.pool = comptroller;

market.name = vTokenContract.name();
const nameResult = vTokenContract.try_name();
if (!nameResult.reverted) {
market.name = nameResult.value;
}
market.isListed = true;
market.interestRateModelAddress = vTokenContract.interestRateModel();
market.symbol = vTokenContract.symbol();
Expand Down

0 comments on commit 3b8ef07

Please sign in to comment.