jon4hz / go-1inch

🦄 A Go wrapper for the 1Inch API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error getting quote from WTBC to USDC

garethschoeman opened this issue · comments

there seems to be an issue when you quote 1 wtbc from wbtc to usdc
oneInchclient.Quote(context.Background(), "matic","0x1bfd67037b42cf73acf2047067bd4f2c47d9bfd6","0x2791bca1f2de4661ed88a30c99a7a9449aa84174","100000000",nil)

with 0x1bfd67037b42cf73acf2047067bd4f2c47d9bfd6 being wbtc address. the # of decimals is 8

you get an error:
error: json: cannot unmarshal number 91.25 into Go struct field .protocols.part of type int64

the numbers do change in the error message

Hi @pancakestack-io , thanks for reporting the issue. I'll take a look at it this evening

release v0.0.6 should fix the issue

thanks for helping!