Skip to content

Commit

Permalink
Merge pull request #15 from kleros/fix/missing-caipaddress
Browse files Browse the repository at this point in the history
Handle missing caipAddress and other fields
  • Loading branch information
salgozino authored Jul 29, 2024
2 parents 003729f + 99c2fdf commit 1e1dd78
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/utils/get-tokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,10 @@ export default async function getTokens(): Promise<TokenInfo[]> {
const decimals = token?.metadata?.props.find((p) => p.label === 'Decimals')
?.value as string

if (!caipAddress || !name || !symbol || !decimals) {
continue
}

const [namespace] = caipAddress.split(':')
if (namespace !== 'eip155') {
nonEvmTokens.push(caipAddress)
Expand Down

0 comments on commit 1e1dd78

Please sign in to comment.