issue-tracker
issue-tracker copied to clipboard
Documentation for the useMoralisWeb3Api is not the same with the typescript declaration file
In the documentation, useMoralisWeb3Api().defi.getPairAddress returns
{ "token0": { "address": "0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c", "name": "Wrapped BNB", "symbol": "WBNB", "logo": null, "logo_hash": null, "thumbnail": null, "decimals": "18", "block_number": "8242108", "validated": 1 }, "token1": { "address": "0xe9e7cea3dedca5984780bafc599bd69add087d56", "name": "BUSD Token", "symbol": "BUSD", "logo": null, "logo_hash": null, "thumbnail": null, "decimals": "18", "block_number": "8242108", "validated": 1 }, "pairAddress": "0x58f876857a02d6762e0101bb5c46a8c1ed44dc16" }
In useMoralisWeb3Api.d.ts, the return is:
getPairAddress: (options: { chain?: "eth" | "0x1" | "ropsten" | "0x3" | "rinkeby" | "0x4" | "goerli" | "0x5" | "kovan" | "0x2a" | "polygon" | "0x89" | "mumbai" | "0x13881" | "bsc" | "0x38" | "bsc testnet" | "0x61" | "avalanche" | "0xa86a" | "avalanche testnet" | "0xa869" | "fantom" | "0xfa" | undefined; to_block?: string | undefined; to_date?: string | undefined; exchange: "uniswapv2" | "uniswapv3" | "sushiswapv2" | "pancakeswapv2" | "pancakeswapv1" | "quickswap"; } & { token0_address: string; token1_address: string; }) => Promise<{ reserve0: string; reserve1: string; }>;