airswap-protocols icon indicating copy to clipboard operation
airswap-protocols copied to clipboard

Dependency looks for JS files but they are now TS files

Open Luiscmogrovejo opened this issue 2 years ago • 0 comments

Code in swap function gives this error unknown

import { Server, Swap, Registry } from '@airswap/libraries';

Also, when I call the contract via ethers directly I get the same error message using

    const serverPromises = await Promise.allSettled(
      quoteTokenURLs
        .filter((value) => baseTokenURLs.includes(value))
        .map((url) => {
          return Server.at(url, {
            swapContract:
              options?.swapContract || Swap.getAddress(this.chainId),
            initializeTimeout: options?.initializeTimeout,
          })
        })
    )

I get the Url for the quotes right but can't get to make this function work on my side or with the library. I think Server is looking for a js file instead of ts

image

Luiscmogrovejo avatar Jun 06 '22 15:06 Luiscmogrovejo