getting error while calling api getWalletTokenBalances from typescript sdk
code: ‘ERR_BAD_REQUEST’,
[nest] config: {
[nest] transitional: [Object],
[nest] adapter: [Array],
[nest] transformRequest: [Array],
[nest] transformResponse: [Array],
[nest] timeout: 20000,
[nest] xsrfCookieName: ‘XSRF-TOKEN’,
[nest] xsrfHeaderName: ‘X-XSRF-TOKEN’,
[nest] maxContentLength: Infinity,
[nest] maxBodyLength: Infinity,
[nest] env: [Object],
[nest] validateStatus: [Function: validateStatus],
[nest] headers: [AxiosHeaders],
[nest] method: ‘get’,
[nest] url: ‘domain/api/v2/0x0626bc398f8aaab506c4c621818958c92f38a8d3/erc20’,
[nest] params: [Object],
[nest] data: undefined
[nest] },
[nest] request: ClientRequest {
[nest] _events: [Object: null prototype],
[nest] _eventsCount: 10,
[nest] _maxListeners: undefined,
[nest] outputData: [],
[nest] outputSize: 0,
[nest] writable: true,
[nest] destroyed: false,
[nest] _last: true,
[nest] chunkedEncoding: false,
[nest] shouldKeepAlive: false,
[nest] maxRequestsOnConnectionReached: false,
[nest] _defaultKeepAlive: true,
[nest] useChunkedEncodingByDefault: false,
[nest] sendDate: false,
[nest] _removedConnection: false,
[nest] _removedContLen: false,
[nest] _removedTE: false,
[nest] strictContentLength: false,
[nest] _contentLength: 0,
[nest] _hasBody: true,
[nest] _trailer: ‘’,
[nest] finished: true,
[nest] _headerSent: true,
[nest] _closed: false,
[nest] socket: [TLSSocket],
[nest] _header: ‘GET /api/v2/0x0626bc398f8aaab506c4c621818958c92f38a8d3/erc20?chain=0x[object+Object] HTTP/1.1\r\n’ +
[nest] ‘Accept: application/json, text/plain, /\r\n’ +
[nest] ‘x-moralis-platform: NodeJS SDK\r\n’ +
[nest] ‘x-moralis-build-target: node\r\n’ +
[nest] ‘x-api-key: ps86aCwZwoWAdlbauKRyvTEw6gKHFftiKoR4Xz6oP2eFJevNKO9DJMttIR6bxkFk\r\n’ +
[nest] ‘User-Agent: axios/1.3.4\r\n’ +
[nest] ‘Accept-Encoding: gzip, compress, deflate, br\r\n’ +
[nest] ‘traceparent: 00-81897dafa55a3862a4b689009187bb20-363707a6b667f70e-01\r\n’ +
[nest] ‘Host: deep-index.moralis.io\r\n’ +
[nest] ‘Connection: close\r\n’ +
[nest] ‘\r\n’,
[nest] _keepAliveTimeout: 0,
[nest] _onPendingData: [Function: nop],
[nest] agent: [Agent],
[nest] socketPath: undefined,
[nest] method: ‘GET’,
[nest] maxHeaderSize: undefined,
[nest] insecureHTTPParser: undefined,
[nest] path: ‘/api/v2/0x0626bc398f8aaab506c4c621818958c92f38a8d3/erc20?chain=0x[object+Object]’,
[nest] _ended: true,
[nest] res: [IncomingMessage],
[nest] aborted: false,
[nest] timeoutCb: null,
[nest] upgradeOrConnect: false,
[nest] parser: null,
[nest] maxHeadersCount: null,
[nest] reusedSocket: false,
[nest] host: ‘deep-index.moralis.io’,
[nest] protocol: ‘https:’,
[nest] addListener: [Function (anonymous)],
[nest] on: [Function (anonymous)],
[nest] once: [Function (anonymous)],
[nest] prependListener: [Function (anonymous)],
[nest] prependOnceListener: [Function (anonymous)],
[nest] removeListener: [Function (anonymous)],
[nest] off: [Function (anonymous)],
[nest] removeAllListeners: [Function (anonymous)],
[nest] _redirectable: [Writable],
[nest] [Symbol(kCapture)]: false,
[nest] [Symbol(kBytesWritten)]: 0,
[nest] [Symbol(kEndCalled)]: true,
[nest] [Symbol(kNeedDrain)]: false,
[nest] [Symbol(corked)]: 0,
[nest] [Symbol(kOutHeaders)]: [Object: null prototype],
[nest] [Symbol(kUniqueHeaders)]: null,
[nest] [Symbol(OtListeners)]: [Object: null prototype]
[nest] },
[nest] response: {
[nest] status: 400,
[nest] statusText: ‘Bad Request’,
[nest] headers: [AxiosHeaders],
[nest] config: [Object],
[nest] request: [ClientRequest],
[nest] data: [Object]
[nest] }
[nest] }
[nest] }