apenft-js-tron 2.1.3-beta.2 → 2.1.3-beta.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -3,6 +3,7 @@ export { APENFTQuery } from './src/queryAPI/index';
3
3
  export { initApprove } from './src/tradeAPI/approve';
4
4
  export { Network, MakeOrderType, APENFTSchemaName, OrderSide, AssetSortBy, CollectionTradeTrendFilterDays, EventType, CollectionSortBy, AssetListCollectionTypes, AssetStatus, Category, } from './src/utils/types';
5
5
  export { AssetFactory } from './src/tradeAPI/nft';
6
+ debugger;
6
7
  // for APENFT market
7
8
  export { toBaseUnitAmount, getSchemaList, makeBigNumber, } from './src/utils/helper';
8
9
  export { NULL_ADDRESS } from './src/utils/constants';
@@ -19,7 +19,8 @@ export class Account extends ContractSchemas {
19
19
  }
20
20
  async getTokenApprove(paymentToken, basePrice) {
21
21
  const allowance = await this.checkTokenTransferProxy(paymentToken.address);
22
- const isApprove = allowance.gte(basePrice);
22
+ debugger;
23
+ const isApprove = new BigNumber(allowance).gte(basePrice);
23
24
  const balances = await this.getTokenBalances(paymentToken.address);
24
25
  return {
25
26
  isApprove,
@@ -123,7 +123,7 @@ export async function checkOrder(contract, order) {
123
123
  return true;
124
124
  }
125
125
  export async function checkMatchOrder(contract, buy, sell) {
126
- const equalPrice = sell.basePrice.gte(buy.basePrice);
126
+ const equalPrice = new BigNumber(sell.basePrice).gte(buy.basePrice);
127
127
  if (!equalPrice) {
128
128
  throw new APENFTError({ code: '1201' });
129
129
  }
package/index.ts CHANGED
@@ -16,7 +16,6 @@ export {
16
16
  } from './src/utils/types'
17
17
  export { AssetFactory } from './src/tradeAPI/nft'
18
18
  export type { APIConfig } from './src/utils/types'
19
-
20
19
  // for APENFT market
21
20
  export {
22
21
  toBaseUnitAmount,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "apenft-js-tron",
3
- "version": "2.1.3-beta.2",
3
+ "version": "2.1.3-beta.4",
4
4
  "description": "Javascript SDK for the APENFT ",
5
5
  "main": "dist/index.js",
6
6
  "author": "Project APENFT Developers",