@clonegod/ttd-sui-common 1.0.86 → 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.
|
@@ -99,12 +99,14 @@ class SuiTransactionParser {
|
|
|
99
99
|
const storageCost = new decimal_js_1.default(gasUsed.storage_cost || 0);
|
|
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
|
-
const
|
|
103
|
-
const
|
|
102
|
+
const actualStorageCost = storageCost.minus(storageRebate).plus(nonRefundableStorageFee);
|
|
103
|
+
const baseFee = actualStorageCost.div(Math.pow(10, 9));
|
|
104
|
+
const priorityFee = computationCost.div(Math.pow(10, 9));
|
|
105
|
+
const totalFee = baseFee.plus(priorityFee);
|
|
104
106
|
return {
|
|
105
|
-
base_fee:
|
|
106
|
-
priority_fee:
|
|
107
|
-
total_fee:
|
|
107
|
+
base_fee: baseFee.toNumber(),
|
|
108
|
+
priority_fee: priorityFee.toNumber(),
|
|
109
|
+
total_fee: totalFee.toNumber()
|
|
108
110
|
};
|
|
109
111
|
}
|
|
110
112
|
calc_tx_price(tokenAChange, tokenBChange, pool_info) {
|