@clonegod/ttd-sui-common 1.0.87 → 1.0.88

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.
@@ -100,13 +100,13 @@ class SuiTransactionParser {
100
100
  const storageRebate = new decimal_js_1.default(gasUsed.storage_rebate || 0);
101
101
  const nonRefundableStorageFee = new decimal_js_1.default(gasUsed.non_refundable_storage_fee || 0);
102
102
  const actualStorageCost = storageCost.minus(storageRebate).plus(nonRefundableStorageFee);
103
- const base_fee = actualStorageCost.div(Math.pow(10, 9)).toNumber();
104
- const priority_fee = computationCost.div(Math.pow(10, 9)).toNumber();
105
- const total_fee = base_fee + priority_fee;
103
+ const baseFee = actualStorageCost.div(Math.pow(10, 9));
104
+ const priorityFee = computationCost.div(Math.pow(10, 9));
105
+ const totalFee = baseFee.plus(priorityFee);
106
106
  return {
107
- base_fee,
108
- priority_fee,
109
- total_fee
107
+ base_fee: baseFee.toNumber(),
108
+ priority_fee: priorityFee.toNumber(),
109
+ total_fee: totalFee.toNumber()
110
110
  };
111
111
  }
112
112
  calc_tx_price(tokenAChange, tokenBChange, pool_info) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clonegod/ttd-sui-common",
3
- "version": "1.0.87",
3
+ "version": "1.0.88",
4
4
  "description": "Sui common library",
5
5
  "license": "UNLICENSED",
6
6
  "main": "dist/index.js",