beethovenxfi / beethovenx-backend

MIT License
13 stars 15 forks source link

GraphQLError: Missing token from tokenService 0xccf3d1acf799bae67f6e354d685295557cf64761 #608

Closed sentry-io[bot] closed 11 months ago

sentry-io[bot] commented 11 months ago

Sentry Issue: BACKEND-V3-BALANCER-157

GraphQLError: Missing token from tokenService 0xccf3d1acf799bae67f6e354d685295557cf64761
  File "/var/app/current/dist/modules/sor/utils.js", line 31, in getToken
    throw Error(`Missing token from tokenService ${tokenAddr}`);
  File "/var/app/current/dist/modules/sor/utils.js", line 8, in getTokenAmountHuman
    const token = await (0, exports.getToken)(tokenAddr, chain);
  File "/var/app/current/dist/modules/beethoven/balancer-sdk.resolvers.js", line 25, in Object.sorGetSwaps
    const amount = await (0, utils_1.getTokenAmountHuman)(amountToken, args.swapAmount, args.chain);
franzns commented 11 months ago

not sure if this is just people pasting random token addresses or an actual error. the quote here is for fantom but the token 0xccf3d1acf799bae67f6e354d685295557cf64761 does not exist on fantom

franzns commented 11 months ago

should probably check whether the token exists in the DB before doing anything and not throwing an error

franzns commented 11 months ago

added check for tokens presence