Skip to content

Commit

Permalink
Log minimumLedgerVersion is not used anymore warning (#553)
Browse files Browse the repository at this point in the history
log minimumLedgerVersion is not used anymore warning
  • Loading branch information
0xmaayan authored Oct 23, 2024
1 parent b176c49 commit 7986463
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/api/account.ts
Original file line number Diff line number Diff line change
Expand Up @@ -675,7 +675,9 @@ export class Account {
* is specified.
* @param args.faMetadataAddress The fungible asset metadata address to query. Note: If not provided, it may be automatically
* populated if `coinType` is specified.
* @param args.minimumLedgerVersion Optional ledger version to sync up to before querying.
* @param args.minimumLedgerVersion Not used anymore, here for backward compatibility
* see https://github.com/aptos-labs/aptos-ts-sdk/pull/519, will be removed in the near future.
* Optional ledger version to sync up to before querying.
* @returns The current amount of the specified coin held by the account.
*
* @example
Expand Down Expand Up @@ -703,8 +705,16 @@ export class Account {
faMetadataAddress?: AccountAddressInput;
minimumLedgerVersion?: AnyNumber;
}): Promise<number> {
const { accountAddress, coinType, faMetadataAddress } = args;
const { accountAddress, coinType, faMetadataAddress, minimumLedgerVersion } = args;

if (minimumLedgerVersion) {
// eslint-disable-next-line no-console
console.warn(
`minimumLedgerVersion is not used anymore, here for backward
compatibility see https://github.com/aptos-labs/aptos-ts-sdk/pull/519,
will be removed in the near future`,
);
}
// Attempt to populate the CoinType field if the FA address is provided.
// We cannot do this internally due to dependency cycles issue.
let coinAssetType: MoveStructId | undefined = coinType;
Expand Down

0 comments on commit 7986463

Please sign in to comment.