diff --git a/.changeset/six-bananas-crash.md b/.changeset/six-bananas-crash.md new file mode 100644 index 0000000000..77a6da8983 --- /dev/null +++ b/.changeset/six-bananas-crash.md @@ -0,0 +1,7 @@ +--- +'@moralisweb3/common-evm-utils': patch +'@moralisweb3/evm-api': patch +'moralis': patch +--- + +Added missing fields to the response of the `getWalletTokenBalancesPrice` endpoint. diff --git a/packages/common/evmUtils/src/generated/client/abstractClient.ts b/packages/common/evmUtils/src/generated/client/abstractClient.ts index 2bbdca9472..adb2aa0304 100644 --- a/packages/common/evmUtils/src/generated/client/abstractClient.ts +++ b/packages/common/evmUtils/src/generated/client/abstractClient.ts @@ -410,7 +410,6 @@ export abstract class AbstractClient { * * Provide the param 'to_block' or 'to_date' * * If 'to_date' and 'to_block' are provided, 'to_block' will be used. (optional) * @param {Boolean} [request.includeInternalTransactions] If the result should contain the internal transactions. (optional) - * @param {Boolean} [request.includeInputData] Set the input data from the result (optional) * @param {Boolean} [request.nftMetadata] If the result should contain the nft metadata. (optional) * @param {String} [request.cursor] The cursor returned in the previous response (used for getting the next page). (optional) * @param {Object} [request.order] The order of the result, in ascending (ASC) or descending (DESC) (optional) diff --git a/packages/common/evmUtils/src/generated/operations/GetWalletHistoryOperation.ts b/packages/common/evmUtils/src/generated/operations/GetWalletHistoryOperation.ts index 951517d984..ab715ff619 100644 --- a/packages/common/evmUtils/src/generated/operations/GetWalletHistoryOperation.ts +++ b/packages/common/evmUtils/src/generated/operations/GetWalletHistoryOperation.ts @@ -10,11 +10,10 @@ import { EvmWalletHistory, EvmWalletHistoryJSON } from '../types/EvmWalletHistor // - to_date ($ref: #/paths/~1wallets~1{address}~1history/get/parameters/4/schema) // - address ($ref: #/paths/~1wallets~1{address}~1history/get/parameters/5/schema) // - include_internal_transactions ($ref: #/paths/~1wallets~1{address}~1history/get/parameters/6/schema) -// - include_input_data ($ref: #/paths/~1wallets~1{address}~1history/get/parameters/7/schema) -// - nft_metadata ($ref: #/paths/~1wallets~1{address}~1history/get/parameters/8/schema) -// - cursor ($ref: #/paths/~1wallets~1{address}~1history/get/parameters/9/schema) +// - nft_metadata ($ref: #/paths/~1wallets~1{address}~1history/get/parameters/7/schema) +// - cursor ($ref: #/paths/~1wallets~1{address}~1history/get/parameters/8/schema) // - order ($ref: #/components/schemas/orderList) -// - limit ($ref: #/paths/~1wallets~1{address}~1history/get/parameters/11/schema) +// - limit ($ref: #/paths/~1wallets~1{address}~1history/get/parameters/10/schema) export interface GetWalletHistoryOperationRequest { /** @@ -53,10 +52,6 @@ export interface GetWalletHistoryOperationRequest { * @description If the result should contain the internal transactions. */ readonly includeInternalTransactions?: boolean; - /** - * @description Set the input data from the result - */ - readonly includeInputData?: boolean; /** * @description If the result should contain the nft metadata. */ @@ -83,7 +78,6 @@ export interface GetWalletHistoryOperationRequestJSON { readonly to_date?: string; readonly address: EvmAddressJSON; readonly include_internal_transactions?: boolean; - readonly include_input_data?: boolean; readonly nft_metadata?: boolean; readonly cursor?: string; readonly order?: EvmOrderListJSON; @@ -98,7 +92,7 @@ export const GetWalletHistoryOperation = { groupName: "wallets", httpMethod: "get", routePattern: "/wallets/{address}/history", - parameterNames: ["chain","from_block","to_block","from_date","to_date","address","include_internal_transactions","include_input_data","nft_metadata","cursor","order","limit"], + parameterNames: ["chain","from_block","to_block","from_date","to_date","address","include_internal_transactions","nft_metadata","cursor","order","limit"], hasResponse: true, hasBody: false, @@ -114,7 +108,6 @@ export const GetWalletHistoryOperation = { const toDate = request.toDate; const address = EvmAddress.create(request.address); const includeInternalTransactions = request.includeInternalTransactions; - const includeInputData = request.includeInputData; const nftMetadata = request.nftMetadata; const cursor = request.cursor; const order = request.order ? EvmOrderList.create(request.order) : undefined; @@ -127,7 +120,6 @@ export const GetWalletHistoryOperation = { to_date: toDate !== undefined ? toDate.toISOString() : undefined, address: address.toJSON(), include_internal_transactions: includeInternalTransactions, - include_input_data: includeInputData, nft_metadata: nftMetadata, cursor: cursor, order: order ? order : undefined, diff --git a/packages/common/evmUtils/src/generated/types/EvmErc20TokenBalanceWithPrice.ts b/packages/common/evmUtils/src/generated/types/EvmErc20TokenBalanceWithPrice.ts index e72daf05fb..db5af3cf23 100644 --- a/packages/common/evmUtils/src/generated/types/EvmErc20TokenBalanceWithPrice.ts +++ b/packages/common/evmUtils/src/generated/types/EvmErc20TokenBalanceWithPrice.ts @@ -20,6 +20,9 @@ import { EvmAddress, EvmAddressInput, EvmAddressJSON, EvmNative, EvmNativeInput, // - portfolio_percentage ($ref: #/components/schemas/erc20TokenBalanceWithPrice/properties/portfolio_percentage) // - balance_formatted ($ref: #/components/schemas/erc20TokenBalanceWithPrice/properties/balance_formatted) // - native_token ($ref: #/components/schemas/erc20TokenBalanceWithPrice/properties/native_token) +// - total_supply ($ref: #/components/schemas/erc20TokenBalanceWithPrice/properties/total_supply) +// - total_supply_formatted ($ref: #/components/schemas/erc20TokenBalanceWithPrice/properties/total_supply_formatted) +// - percentage_relative_to_total_supply ($ref: #/components/schemas/erc20TokenBalanceWithPrice/properties/percentage_relative_to_total_supply) export interface EvmErc20TokenBalanceWithPriceJSON { readonly token_address?: EvmAddressJSON; @@ -39,6 +42,9 @@ export interface EvmErc20TokenBalanceWithPriceJSON { readonly portfolio_percentage: number; readonly balance_formatted: string; readonly native_token: boolean; + readonly total_supply?: string; + readonly total_supply_formatted?: string; + readonly percentage_relative_to_total_supply?: number; } export interface EvmErc20TokenBalanceWithPriceInput { @@ -59,6 +65,9 @@ export interface EvmErc20TokenBalanceWithPriceInput { readonly portfolioPercentage: number; readonly balanceFormatted: string; readonly nativeToken: boolean; + readonly totalSupply?: string; + readonly totalSupplyFormatted?: string; + readonly percentageRelativeToTotalSupply?: number; } export class EvmErc20TokenBalanceWithPrice { @@ -88,6 +97,9 @@ export class EvmErc20TokenBalanceWithPrice { portfolioPercentage: json.portfolio_percentage, balanceFormatted: json.balance_formatted, nativeToken: json.native_token, + totalSupply: json.total_supply, + totalSupplyFormatted: json.total_supply_formatted, + percentageRelativeToTotalSupply: json.percentage_relative_to_total_supply, }; return EvmErc20TokenBalanceWithPrice.create(input); } @@ -160,6 +172,18 @@ export class EvmErc20TokenBalanceWithPrice { * @description Indicates if the token is a native coin */ public readonly nativeToken: boolean; + /** + * @description Total supply of the token + */ + public readonly totalSupply?: string; + /** + * @description Total supply of the token in decimal format + */ + public readonly totalSupplyFormatted?: string; + /** + * @description Percentage of the token in the total supply + */ + public readonly percentageRelativeToTotalSupply?: number; private constructor(input: EvmErc20TokenBalanceWithPriceInput) { this.tokenAddress = input.tokenAddress ? EvmAddress.create(input.tokenAddress) : undefined; @@ -179,6 +203,9 @@ export class EvmErc20TokenBalanceWithPrice { this.portfolioPercentage = input.portfolioPercentage; this.balanceFormatted = input.balanceFormatted; this.nativeToken = input.nativeToken; + this.totalSupply = input.totalSupply; + this.totalSupplyFormatted = input.totalSupplyFormatted; + this.percentageRelativeToTotalSupply = input.percentageRelativeToTotalSupply; } public toJSON(): EvmErc20TokenBalanceWithPriceJSON { @@ -200,6 +227,9 @@ export class EvmErc20TokenBalanceWithPrice { portfolio_percentage: this.portfolioPercentage, balance_formatted: this.balanceFormatted, native_token: this.nativeToken, + total_supply: this.totalSupply, + total_supply_formatted: this.totalSupplyFormatted, + percentage_relative_to_total_supply: this.percentageRelativeToTotalSupply, } } }