File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed
Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -147,6 +147,28 @@ const main = async () => {
147147 ) . output ;
148148 }
149149
150+ // For HOLD pools where the pool address (vault) isn't in the tokens list,
151+ // the symbol may reflect the underlying rather than the vault itself.
152+ // Resolve the vault's on-chain symbol for accurate representation.
153+ const tokenAddresses = new Set (
154+ pool . tokens . map ( ( t ) => t . address . toLowerCase ( ) )
155+ ) ;
156+ if (
157+ pool . action === 'HOLD' &&
158+ ! tokenAddresses . has ( poolAddress . toLowerCase ( ) )
159+ ) {
160+ try {
161+ const vaultSymbol = (
162+ await sdk . api . abi . call ( {
163+ target : poolAddress ,
164+ chain,
165+ abi : 'erc20:symbol' ,
166+ } )
167+ ) . output ;
168+ if ( vaultSymbol ) symbol = vaultSymbol ;
169+ } catch { }
170+ }
171+
150172 let underlyingTokens = getUnderlyingTokens ( pool ) ;
151173
152174 // For ERC-4626 vault pools where the only underlying is the vault itself,
You can’t perform that action at this time.
0 commit comments