Skip to content

Commit

Permalink
get token symbol (#1923)
Browse files Browse the repository at this point in the history
  • Loading branch information
0xdavinchee authored Apr 8, 2024
1 parent a54b8d2 commit 60d8449
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/subgraph/src/mappingHelpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,12 @@ export function getOrInitSuperToken(
return token as Token;
}

if (token.symbol == "") {
const tokenContract = SuperToken.bind(tokenAddress);
const symbolResult = tokenContract.try_symbol();
token.symbol = symbolResult.reverted ? "" : symbolResult.value;
}

token.save();

return token as Token;
Expand Down

0 comments on commit 60d8449

Please sign in to comment.