Skip to content

Commit

Permalink
feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
jsy1218 committed Jan 15, 2025
1 parent 6261df2 commit 953015a
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions src/providers/token-provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -898,26 +898,30 @@ export class TokenProvider implements ITokenProvider {
continue;
}

let symbol;

try {
isBytes32
symbol = isBytes32
? parseBytes32String(symbolResult.result[0]!)
: symbolResult.result[0]!;
} catch (error) {
if (error instanceof Error && error.message.includes('invalid bytes32 string - no null terminator')) {
if (
error instanceof Error &&
error.message.includes(
'invalid bytes32 string - no null terminator'
)
) {
log.error(
{
symbolResult,
error,
},
`invalid bytes32 string - no null terminator`
);
continue;
}
}

const symbol = isBytes32
? parseBytes32String(symbolResult.result[0]!)
: symbolResult.result[0]!;
throw error;
}
const decimal = decimalResult.result[0]!;

addressToToken[address.toLowerCase()] = new Token(
Expand Down

0 comments on commit 953015a

Please sign in to comment.