@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
|
|
104
|
-
const
|
|
105
|
-
const
|
|
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) {
|