-
Notifications
You must be signed in to change notification settings - Fork 7
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
NotEnoughBalanceOrAllowance when place order in fusion mode #88
Comments
Hi, the approval transaction for our router can be created using the aggregation API. Here is an example that checks allowance for a given amount and approves the token if needed: https://github.com/1inch/1inch-sdk-go/blob/ab94614df99977a526bfd7cc58e9dfb31eaa48b4/sdk-clients/aggregation/examples/approve/main.go I may add this functionality to the Wallet object directly if it makes sense, but for now, just pull in the aggregation API to get this functionality. |
the aggregation API need NodeUrl, but I don't have a NodeUrl, And if possible, I just want to use the 1inch api or the nodeurl provided by 1inch The NodeUrl may be multiple different chains currently supported by 1inch API |
|
Ok, thank you very much for your help,It's so kind of you, I will try it according to what you said. |
when I run the example https://github.com/1inch/1inch-sdk-go/blob/main/sdk-clients/fusion/examples/place_order/main.go#L72
I got the err: {"error":"Bad Request","description":"NotEnoughBalanceOrAllowance","statusCode":400,"meta":[]}
How I can approve the transaction using 1inch api, can you give me some advice, like 1inch api doc link or or a complete approve allowance and place order example?
Thanks a lot, I am new to defi.
The text was updated successfully, but these errors were encountered: