MoralisWeb3 / Moralis-JS-SDK

Moralis Official Javascript SDK
https://docs.moralis.io
Other
368 stars 257 forks source link

Moralis.EvmApi.token.getWalletApprovals does not exist on evmapi.token #1236

Open shihao-guo opened 1 month ago

shihao-guo commented 1 month ago

New Bug Report

Checklist

Issue Description

Moralis.EvmApi.token.getWalletApprovals does not exist on evmapi.token, this is the current method list

    readonly token: {
        getTokenAllowance: (request: GetTokenAllowanceRequest) => Promise<GetTokenAllowanceResponseAdapter>;
        getTokenMetadataBySymbol: (request: GetTokenMetadataBySymbolRequest) => Promise<GetTokenMetadataBySymbolResponseAdapter>;
        getTokenMetadata: (request: GetTokenMetadataRequest) => Promise<GetTokenMetadataResponseAdapter>;
        getTokenPrice: (request: GetTokenPriceRequest) => Promise<GetTokenPriceResponseAdapter>;
        getTokenTransfers: (request: GetTokenTransfersRequest) => Promise<GetTokenTransfersResponseAdapter>;
        getWalletTokenBalances: (request: GetWalletTokenBalancesRequest) => Promise<GetWalletTokenBalancesResponseAdapter>;
        getWalletTokenTransfers: (request: GetWalletTokenTransfersRequest) => Promise<GetWalletTokenTransfersResponseAdapter>;
        getMultipleTokenPrices: (request: GetMultipleTokenPricesOperationRequest, body: GetMultipleTokenPricesOperationBody) => Promise<ResponseAdapter<GetMultipleTokenPricesOperationResponse, GetMultipleTokenPricesOperationResponseJSON>>;
        getTokenOwners: (request: GetTokenOwnersOperationRequest) => Promise<PaginatedResponseV3Adapter<GetTokenOwnersOperationResponse, GetTokenOwnersOperationResponseJSON>>;
        getTokenStats: (request: GetTokenStatsOperationRequest) => Promise<ResponseAdapter<GetTokenStatsOperationResponse, GetTokenStatsOperationResponseJSON>>;
        getTopProfitableWalletPerToken: (request: GetTopProfitableWalletPerTokenOperationRequest) => Promise<ResponseAdapter<GetTopProfitableWalletPerTokenOperationResponse, GetTopProfitableWalletPerTokenOperationResponseJSON>>;
    };

Steps + code to reproduce

import Moralis from 'moralis';
Moralis.EvmApi.token.getWalletApprovals

Actual Outcome

Typescript compile error

error TS2339: Property 'getWalletApprovals' does not exist on type '{ getTokenAllowance: (request: GetTokenAllowanceRequest) => Promise<GetTokenAllowanceResponseAdapter>; ... 9 more ...; getTopProfitableWalletPerToken: (request: GetTopProfitableWalletPerTokenOperationRequest) => Promise<...>; }'.

Expected Outcome

Expect the method to exist as indicated here https://docs.moralis.com/web3-data-api/evm/reference/wallet-api/get-wallet-token-approvals?address=0xcB1C1FdE09f811B294172696404e88E658659905&chain=eth

Environment

moralis@2.27.2 node@18.18.0 typescript@5.5.4 @moralisweb3/common-core@2.27.2 @moralisweb3/evm-api@2.27.2

Server

Client

Logs

error TS2339: Property 'getWalletApprovals' does not exist on type '{ getTokenAllowance: (request: GetTokenAllowanceRequest) => Promise<GetTokenAllowanceResponseAdapter>; ... 9 more ...; getTopProfitableWalletPerToken: (request: GetTopProfitableWalletPerTokenOperationRequest) => Promise<...>; }'.

4 Moralis.EvmApi.token.getWalletApprovals