Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SDK] Not enough funds provides error on squid.isRouteApproved #221

Open
1 task
ecdsafu opened this issue Oct 19, 2023 · 0 comments
Open
1 task

[SDK] Not enough funds provides error on squid.isRouteApproved #221

ecdsafu opened this issue Oct 19, 2023 · 0 comments
Labels
bug Something isn't working sdk

Comments

@ecdsafu
Copy link
Contributor

ecdsafu commented Oct 19, 2023

Description / Steps to reproduce

We don't allow to check for approval using the SDK function if the user doesn't have enough funds in their account. This seems incorrect, we should return true or false, even if they don't have enough funds.

Error: Insufficient funds for account: 0x7dBd0F75aA91c757ae6564d41dd59669023D57a4 on chain 43114
    at EvmHandler.validateTokenBalance (/Users/fig/code/squid/examples/V2/sdk/swapAvalancheUsdcToMoonbeam/node_modules/@0xsquid/sdk/src/handlers/evm/utils.ts:45:13)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async EvmHandler.validateBalance (/Users/fig/code/squid/examples/V2/sdk/swapAvalancheUsdcToMoonbeam/node_modules/@0xsquid/sdk/src/handlers/evm/index.ts:85:14)
    at async EvmHandler.isRouteApproved (/Users/fig/code/squid/examples/V2/sdk/swapAvalancheUsdcToMoonbeam/node_modules/@0xsquid/sdk/src/handlers/evm/index.ts:194:20)
    at async Squid.isRouteApproved (/Users/fig/code/squid/examples/V2/sdk/swapAvalancheUsdcToMoonbeam/node_modules/@0xsquid/sdk/src/index.ts:183:16)
Waiting for the debugger to disconnect...
error Command failed with exit code 1.

Acceptance Criteria

  • Users of the SDK can use isRouteApproved even if a user doesn't have enough funds in their account.
@ecdsafu ecdsafu added sdk bug Something isn't working labels Oct 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working sdk
Projects
None yet
Development

No branches or pull requests

1 participant